Lines Matching refs:il

78 void check_list_nodes( List& il, int value_step ) {  in check_list_nodes()  argument
79 REQUIRE_MESSAGE(il.size() == unsigned(NumElements / value_step), "Wrong size of the list"); in check_list_nodes()
80 REQUIRE_MESSAGE(!il.empty(), "Incorrect result of empty() or the list is corrupted"); in check_list_nodes()
83 Iterator it = il.begin(); in check_list_nodes()
88 for ( i = value_step - 1; it != il.end(); ++it, i += value_step ) { in check_list_nodes()
94 it = il.end(); in check_list_nodes()
96 for ( i = NumElements - 1, it--; it != il.end(); --it, i -= value_step ) { in check_list_nodes()
107 List il; in test_list_operations() local
110 il.push_front(*new Item(i)); in test_list_operations()
112 check_list_nodes<const List, typename List::const_iterator>(il, 1); in test_list_operations()
113 iterator it = il.begin(); in test_list_operations()
115 for (;it != il.end(); ++it) { in test_list_operations()
117 it = il.erase(it); // also advances the iterator in test_list_operations()
121 check_list_nodes<List, iterator>(il, 2); in test_list_operations()
122 for (it = il.begin(); it != il.end(); ++it) { in test_list_operations()
124 il.remove(*it++); // extra advance here as well in test_list_operations()
128 check_list_nodes<List, iterator>(il, 4); in test_list_operations()
129 for (it = il.begin(); it != il.end();) { in test_list_operations()
131 il.remove(item); in test_list_operations()
134 REQUIRE_MESSAGE(il.size() == 0, "The list has wrong size or not all items were removed"); in test_list_operations()
135 REQUIRE_MESSAGE(il.empty(), "Incorrect result of empty() or not all items were removed"); in test_list_operations()