Changeset 10920 for code/branches/cpp11_v2/test/core/object/IteratorTest.cc
- Timestamp:
- Dec 6, 2015, 2:51:14 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/test/core/object/IteratorTest.cc
r10846 r10920 55 55 TEST_F(IteratorTest, CanAssignIterator) 56 56 { 57 Iterator<TestInterface> it = ObjectList<TestInterface>::begin(); 57 ObjectList<TestInterface> list; 58 Iterator<TestInterface> it = list.begin(); 58 59 } 59 60 … … 61 62 { 62 63 size_t i = 0; 63 for (Iterator<TestInterface> it = ObjectList<TestInterface>::begin(); it != ObjectList<TestInterface>::end(); ++it) 64 ObjectList<TestInterface> list; 65 for (Iterator<TestInterface> it = list.begin(); it != list.end(); ++it) 64 66 ++i; 65 67 EXPECT_EQ(0u, i); … … 77 79 78 80 // iterate over interfaces but use a TestClass iterator - now we can call TestClass::test() 79 for (Iterator<TestClass> it = ObjectList<TestInterface>::begin(); it != ObjectList<TestInterface>::end(); ++it) 81 ObjectList<TestInterface> list; 82 for (Iterator<TestClass> it = list.begin(); it != list.end(); ++it) 80 83 it->test(); 81 84 } … … 87 90 88 91 size_t i = 0; 89 for (Iterator<TestInterface> it = ObjectList<TestInterface>::begin(); it != ObjectList<TestInterface>::end(); ++it) 92 ObjectList<TestInterface> list; 93 for (Iterator<TestInterface> it = list.begin(); it != list.end(); ++it) 90 94 { 91 95 ++i; … … 102 106 103 107 size_t i = 0; 104 for (Iterator<TestClass> it = ObjectList<TestClass>::begin(); it != ObjectList<TestClass>::end(); ++it) 108 ObjectList<TestClass> list; 109 for (Iterator<TestClass> it = list.begin(); it != list.end(); ++it) 105 110 { 106 111 ++i; … … 116 121 117 122 size_t i = 0; 118 for (Iterator<TestClass> it = ObjectList<TestInterface>::begin(); it != ObjectList<TestInterface>::end(); ++it) 123 ObjectList<TestInterface> list; 124 for (Iterator<TestClass> it = list.begin(); it != list.end(); ++it) 119 125 { 120 126 ++i; … … 131 137 132 138 size_t i = 0; 133 for (Iterator<TestInterface> it = ObjectList<TestClass>::begin(); it != ObjectList<TestClass>::end(); ++it) 139 ObjectList<TestClass> list; 140 for (Iterator<TestInterface> it = list.begin(); it != list.end(); ++it) 134 141 { 135 142 ++i;
Note: See TracChangeset
for help on using the changeset viewer.