summaryrefslogtreecommitdiff
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2013-07-18 00:40:56 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2013-07-18 00:40:56 +0200
commit98dc6d18c58148534a6b29803afd162e7496d816 (patch)
tree60c34079e95ce860c972103cbedfa5e067afbeaf
parentfd95f16ccd8032f8f7ce695ccaf711896bba3165 (diff)
TestTabIterator: ensure testing the correct area
(bzr r3427.1.9)
-rw-r--r--tests/test_tabiterator.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_tabiterator.cpp b/tests/test_tabiterator.cpp
index 049739ac2..b48dbb826 100644
--- a/tests/test_tabiterator.cpp
+++ b/tests/test_tabiterator.cpp
@@ -49,8 +49,7 @@ class TestTabIterator : public ::testing::Test
protected:
TestTabIterator() : Test(),
tab_iterator(new MockedTabIterator())
- {
- }
+ {}
std::unique_ptr<MockedTabIterator> tab_iterator;
@@ -289,6 +288,7 @@ TEST_F(TestTabIterator, KeyNavIterationNoCurrentSelectionAndNextMove)
nux::KEY_NAV_TAB_NEXT);
EXPECT_EQ(result, *tab_iterator->areas_.begin());
+ EXPECT_EQ(result, first_entry);
}
TEST_F(TestTabIterator, KeyNavIterationWithPreviousSelectionIsFirstArea)
@@ -298,7 +298,7 @@ TEST_F(TestTabIterator, KeyNavIterationWithPreviousSelectionIsFirstArea)
tab_iterator->areas_.push_front(second_entry);
tab_iterator->areas_.push_front(first_entry);
- nux::GetWindowCompositor().SetKeyFocusArea(*tab_iterator->areas_.begin());
+ nux::GetWindowCompositor().SetKeyFocusArea(first_entry);
unity::IMTextEntry* result = (unity::IMTextEntry*) tab_iterator->KeyNavIteration(
nux::KEY_NAV_TAB_PREVIOUS);
@@ -347,6 +347,7 @@ TEST_F(TestTabIterator, KeyNavIterationWithNextSelectionIsLast)
nux::KEY_NAV_TAB_NEXT);
EXPECT_EQ(result, *tab_iterator->areas_.begin());
+ EXPECT_EQ(result, first_entry);
}
TEST_F(TestTabIterator, KeyNavIterationWithNextSelectionIsNotLast)