• Home
  • Raw
  • Download

Lines Matching refs:list

13   list_t* list = list_new(NULL);  in TEST_F()  local
14 ASSERT_TRUE(list != NULL); in TEST_F()
15 list_free(list); in TEST_F()
24 list_t* list = list_new(NULL); in TEST_F() local
25 EXPECT_TRUE(list_is_empty(list)); in TEST_F()
26 list_free(list); in TEST_F()
30 list_t* list = list_new(NULL); in TEST_F() local
31 EXPECT_EQ(list_length(list), 0U); in TEST_F()
32 list_free(list); in TEST_F()
36 list_t* list = list_new(NULL); in TEST_F() local
37 EXPECT_TRUE(list_prepend(list, &list)); in TEST_F()
38 EXPECT_FALSE(list_is_empty(list)); in TEST_F()
39 EXPECT_EQ(list_length(list), 1U); in TEST_F()
40 list_free(list); in TEST_F()
44 list_t* list = list_new(NULL); in TEST_F() local
45 EXPECT_TRUE(list_append(list, &list)); in TEST_F()
46 EXPECT_FALSE(list_is_empty(list)); in TEST_F()
47 EXPECT_EQ(list_length(list), 1U); in TEST_F()
48 list_free(list); in TEST_F()
52 list_t* list = list_new(NULL); in TEST_F() local
53 list_append(list, &list); in TEST_F()
54 EXPECT_TRUE(list_remove(list, &list)); in TEST_F()
55 EXPECT_TRUE(list_is_empty(list)); in TEST_F()
56 EXPECT_EQ(list_length(list), 0U); in TEST_F()
57 list_free(list); in TEST_F()
62 list_t* list = list_new(NULL); in TEST_F() local
63 list_append(list, &list); in TEST_F()
64 EXPECT_FALSE(list_remove(list, &x)); in TEST_F()
65 EXPECT_FALSE(list_is_empty(list)); in TEST_F()
66 EXPECT_EQ(list_length(list), 1U); in TEST_F()
67 list_free(list); in TEST_F()
72 list_t* list = list_new(NULL); in TEST_F() local
74 for (size_t i = 0; i < ARRAY_SIZE(x); ++i) list_append(list, &x[i]); in TEST_F()
76 EXPECT_EQ(list_front(list), &x[0]); in TEST_F()
78 list_free(list); in TEST_F()
83 list_t* list = list_new(NULL); in TEST_F() local
85 for (size_t i = 0; i < ARRAY_SIZE(x); ++i) list_append(list, &x[i]); in TEST_F()
87 EXPECT_EQ(list_back(list), &x[ARRAY_SIZE(x) - 1]); in TEST_F()
89 list_free(list); in TEST_F()
94 list_t* list = list_new(NULL); in TEST_F() local
96 for (size_t i = 0; i < ARRAY_SIZE(x); ++i) list_append(list, &x[i]); in TEST_F()
98 list_clear(list); in TEST_F()
99 EXPECT_TRUE(list_is_empty(list)); in TEST_F()
100 EXPECT_EQ(list_length(list), 0U); in TEST_F()
102 list_free(list); in TEST_F()
107 list_t* list = list_new(NULL); in TEST_F() local
109 for (size_t i = 0; i < ARRAY_SIZE(x); ++i) list_append(list, &x[i]); in TEST_F()
112 for (const list_node_t *node = list_begin(list); node != list_end(list); in TEST_F()
116 list_free(list); in TEST_F()
121 list_t* list = list_new(NULL); in TEST_F() local
123 for (size_t i = 0; i < ARRAY_SIZE(x); ++i) list_prepend(list, &x[i]); in TEST_F()
126 for (const list_node_t *node = list_begin(list); node != list_end(list); in TEST_F()
130 list_free(list); in TEST_F()
134 list_t* list = list_new(NULL); in TEST_F() local
135 EXPECT_EQ(list_begin(list), list_end(list)); in TEST_F()
136 list_free(list); in TEST_F()
140 list_t* list = list_new(NULL); in TEST_F() local
141 list_append(list, &list); in TEST_F()
142 EXPECT_NE(list_begin(list), list_end(list)); in TEST_F()
143 EXPECT_EQ(list_next(list_begin(list)), list_end(list)); in TEST_F()
144 list_free(list); in TEST_F()
163 list_t* list = list_new(NULL); in TEST_F() local
167 for (size_t i = 0; i < ARRAY_SIZE(x); ++i) list_append(list, &x[i]); in TEST_F()
168 EXPECT_EQ(list_length(list), (size_t)5); in TEST_F()
172 list_node_t* rc = list_foreach(list, list_callback_sum, &sum); in TEST_F()
176 list_free(list); in TEST_F()
180 list_t* list = list_new(NULL); in TEST_F() local
184 for (size_t i = 0; i < ARRAY_SIZE(x); ++i) list_append(list, &x[i]); in TEST_F()
185 EXPECT_EQ(list_length(list), (size_t)5); in TEST_F()
189 list_node_t* rc = list_foreach(list, list_callback_find_int, &find); in TEST_F()
195 rc = list_foreach(list, list_callback_find_int, &find); in TEST_F()
201 rc = list_foreach(list, list_callback_find_int, &find); in TEST_F()
207 rc = list_foreach(list, list_callback_find_int, &find); in TEST_F()
210 list_free(list); in TEST_F()