Lines Matching refs:L

30 static void setList(ListT *L, ListItem *I1 = nullptr, ListItem *I2 = nullptr,  in setList()  argument
32 L->clear(); in setList()
34 L->push_back(I1); in setList()
36 L->push_back(I2); in setList()
38 L->push_back(I3); in setList()
42 static void checkList(ListT *L, ListItem *I1, ListItem *I2 = nullptr, in checkList() argument
46 EXPECT_EQ(L->front(), I1); in checkList()
47 L->pop_front(); in checkList()
50 EXPECT_EQ(L->front(), I2); in checkList()
51 L->pop_front(); in checkList()
54 EXPECT_EQ(L->front(), I3); in checkList()
55 L->pop_front(); in checkList()
58 EXPECT_EQ(L->front(), I4); in checkList()
59 L->pop_front(); in checkList()
62 EXPECT_EQ(L->front(), I5); in checkList()
63 L->pop_front(); in checkList()
66 EXPECT_EQ(L->front(), I6); in checkList()
67 L->pop_front(); in checkList()
69 EXPECT_TRUE(L->empty()); in checkList()
73 ListT L; in testListCommon() local
74 L.clear(); in testListCommon()
76 EXPECT_EQ(L.size(), 0U); in testListCommon()
77 L.push_back(X); in testListCommon()
78 EXPECT_EQ(L.size(), 1U); in testListCommon()
79 EXPECT_EQ(L.back(), X); in testListCommon()
80 EXPECT_EQ(L.front(), X); in testListCommon()
81 L.pop_front(); in testListCommon()
82 EXPECT_TRUE(L.empty()); in testListCommon()
83 L.checkConsistency(); in testListCommon()
85 L.push_front(X); in testListCommon()
86 EXPECT_EQ(L.size(), 1U); in testListCommon()
87 EXPECT_EQ(L.back(), X); in testListCommon()
88 EXPECT_EQ(L.front(), X); in testListCommon()
89 L.pop_front(); in testListCommon()
90 EXPECT_TRUE(L.empty()); in testListCommon()
91 L.checkConsistency(); in testListCommon()
93 L.push_front(X); in testListCommon()
94 L.push_front(Y); in testListCommon()
95 L.push_front(Z); in testListCommon()
96 EXPECT_EQ(L.size(), 3U); in testListCommon()
97 EXPECT_EQ(L.front(), Z); in testListCommon()
98 EXPECT_EQ(L.back(), X); in testListCommon()
99 L.checkConsistency(); in testListCommon()
101 L.pop_front(); in testListCommon()
102 EXPECT_EQ(L.size(), 2U); in testListCommon()
103 EXPECT_EQ(L.front(), Y); in testListCommon()
104 EXPECT_EQ(L.back(), X); in testListCommon()
105 L.pop_front(); in testListCommon()
106 L.pop_front(); in testListCommon()
107 EXPECT_TRUE(L.empty()); in testListCommon()
108 L.checkConsistency(); in testListCommon()
110 L.push_back(X); in testListCommon()
111 L.push_back(Y); in testListCommon()
112 L.push_back(Z); in testListCommon()
113 EXPECT_EQ(L.size(), 3U); in testListCommon()
114 EXPECT_EQ(L.front(), X); in testListCommon()
115 EXPECT_EQ(L.back(), Z); in testListCommon()
116 L.checkConsistency(); in testListCommon()
118 L.pop_front(); in testListCommon()
119 EXPECT_EQ(L.size(), 2U); in testListCommon()
120 EXPECT_EQ(L.front(), Y); in testListCommon()
121 EXPECT_EQ(L.back(), Z); in testListCommon()
122 L.pop_front(); in testListCommon()
123 L.pop_front(); in testListCommon()
124 EXPECT_TRUE(L.empty()); in testListCommon()
125 L.checkConsistency(); in testListCommon()
134 SLList L; in TEST() local
135 L.clear(); in TEST()
137 L.push_back(X); in TEST()
138 L.push_back(Y); in TEST()
139 L.push_back(Z); in TEST()
140 L.extract(X, Y); in TEST()
141 EXPECT_EQ(L.size(), 2U); in TEST()
142 EXPECT_EQ(L.front(), X); in TEST()
143 EXPECT_EQ(L.back(), Z); in TEST()
144 L.checkConsistency(); in TEST()
145 L.extract(X, Z); in TEST()
146 EXPECT_EQ(L.size(), 1U); in TEST()
147 EXPECT_EQ(L.front(), X); in TEST()
148 EXPECT_EQ(L.back(), X); in TEST()
149 L.checkConsistency(); in TEST()
150 L.pop_front(); in TEST()
151 EXPECT_TRUE(L.empty()); in TEST()
180 DLList L; in TEST() local
181 L.clear(); in TEST()
183 L.push_back(X); in TEST()
184 L.push_back(Y); in TEST()
185 L.push_back(Z); in TEST()
186 L.remove(Y); in TEST()
187 EXPECT_EQ(L.size(), 2U); in TEST()
188 EXPECT_EQ(L.front(), X); in TEST()
189 EXPECT_EQ(L.back(), Z); in TEST()
190 L.checkConsistency(); in TEST()
191 L.remove(Z); in TEST()
192 EXPECT_EQ(L.size(), 1U); in TEST()
193 EXPECT_EQ(L.front(), X); in TEST()
194 EXPECT_EQ(L.back(), X); in TEST()
195 L.checkConsistency(); in TEST()
196 L.pop_front(); in TEST()
197 EXPECT_TRUE(L.empty()); in TEST()
199 L.push_back(X); in TEST()
200 L.insert(Y, X); in TEST()
201 EXPECT_EQ(L.size(), 2U); in TEST()
202 EXPECT_EQ(L.front(), Y); in TEST()
203 EXPECT_EQ(L.back(), X); in TEST()
204 L.checkConsistency(); in TEST()
205 L.remove(Y); in TEST()
206 EXPECT_EQ(L.size(), 1U); in TEST()
207 EXPECT_EQ(L.front(), X); in TEST()
208 EXPECT_EQ(L.back(), X); in TEST()
209 L.checkConsistency(); in TEST()
210 L.pop_front(); in TEST()
211 EXPECT_TRUE(L.empty()); in TEST()