• Home
  • Raw
  • Download

Lines Matching refs:list

61 std::string test_list_to_string(test_list_t& list) {  in test_list_to_string()  argument
63 list.for_each([&] (const char* c) { in test_list_to_string()
74 test_list_t list; in TEST() local
75 ASSERT_EQ("", test_list_to_string(list)); in TEST()
78 list.push_front("a"); in TEST()
81 ASSERT_EQ("a", test_list_to_string(list)); in TEST()
82 list.push_front("b"); in TEST()
83 ASSERT_EQ("ba", test_list_to_string(list)); in TEST()
84 list.push_front("c"); in TEST()
85 list.push_front("d"); in TEST()
86 ASSERT_EQ("dcba", test_list_to_string(list)); in TEST()
90 list.remove_if([] (const char* c) { in TEST()
97 ASSERT_EQ("dba", test_list_to_string(list)); in TEST()
99 list.remove_if([] (const char* c) { in TEST()
104 ASSERT_EQ("dba", test_list_to_string(list)); in TEST()
105 list.clear(); in TEST()
108 ASSERT_EQ("", test_list_to_string(list)); in TEST()
112 test_list_t list; in TEST() local
113 list.push_front("b"); in TEST()
114 list.push_front("a"); in TEST()
115 ASSERT_EQ("ab", test_list_to_string(list)); in TEST()
116 list.push_back("c"); in TEST()
117 ASSERT_EQ("abc", test_list_to_string(list)); in TEST()
118 ASSERT_STREQ("a", list.pop_front()); in TEST()
119 ASSERT_EQ("bc", test_list_to_string(list)); in TEST()
120 ASSERT_STREQ("b", list.pop_front()); in TEST()
121 ASSERT_EQ("c", test_list_to_string(list)); in TEST()
122 ASSERT_STREQ("c", list.pop_front()); in TEST()
123 ASSERT_EQ("", test_list_to_string(list)); in TEST()
124 ASSERT_TRUE(list.pop_front() == nullptr); in TEST()
125 list.push_back("r"); in TEST()
126 ASSERT_EQ("r", test_list_to_string(list)); in TEST()
127 ASSERT_STREQ("r", list.pop_front()); in TEST()
128 ASSERT_TRUE(list.pop_front() == nullptr); in TEST()
132 test_list_t list; in TEST() local
133 list.push_back("a"); in TEST()
134 list.push_back("b"); in TEST()
135 list.push_back("c"); in TEST()
136 list.push_back("d"); in TEST()
137 list.remove_if([](const char* c) { in TEST()
141 ASSERT_EQ("ad", test_list_to_string(list)); in TEST()
142 ASSERT_STREQ("a", list.pop_front()); in TEST()
143 ASSERT_EQ("d", test_list_to_string(list)); in TEST()
144 ASSERT_STREQ("d", list.pop_front()); in TEST()
145 ASSERT_TRUE(list.pop_front() == nullptr); in TEST()
149 test_list_t list; in TEST() local
151 list.push_back("a"); in TEST()
152 list.push_back("b"); in TEST()
153 list.push_back("c"); in TEST()
154 list.push_back("d"); in TEST()
156 list.remove_if([](const char* c) { in TEST()
160 ASSERT_EQ("ab", test_list_to_string(list)); in TEST()
161 list.push_back("d"); in TEST()
162 ASSERT_EQ("abd", test_list_to_string(list)); in TEST()
166 test_list_t list; in TEST() local
171 ASSERT_EQ(0U, list.copy_to_array(buf, max_size)); in TEST()
174 list.push_back("a"); in TEST()
175 list.push_back("b"); in TEST()
176 list.push_back("c"); in TEST()
177 list.push_back("d"); in TEST()
180 ASSERT_EQ(2U, list.copy_to_array(buf, 2)); in TEST()
185 ASSERT_EQ(4U, list.copy_to_array(buf, max_size)); in TEST()
193 list.remove_if([](const char* c) { in TEST()
196 ASSERT_EQ(1U, list.copy_to_array(buf, max_size)); in TEST()
202 list.remove_if([](const char* c) { in TEST()
206 ASSERT_EQ(0U, list.copy_to_array(buf, max_size)); in TEST()
211 test_list_t list; in TEST() local
212 list.push_back("a"); in TEST()
213 list.push_back("b"); in TEST()
214 list.push_back("c"); in TEST()
215 list.push_back("d"); in TEST()
219 bool result = list.visit([&](const char* c) { in TEST()
232 result = list.visit([&](const char* c) { in TEST()