27 Item a1(1, 11), a2(2, 12), a3(3, 13);
38 EXPECT_EQ(
all.First()->item, 11);
39 EXPECT_EQ(
all.Last()->item, 13);
43 EXPECT_EQ(ready.
First()->item, 11);
44 EXPECT_EQ(ready.
Last()->item, 12);
47 for (
auto it =
all.Begin(); it !=
all.End(); ++it) {
49 EXPECT_EQ(it->base,
i);
50 EXPECT_EQ((*it)->base,
i);
51 EXPECT_EQ(it->item, 10 +
i);
52 EXPECT_EQ((*it)->item, 10 +
i);
57 for (
auto it = ready.
Begin(); it != ready.
End(); ++it) {
59 EXPECT_EQ(it->base,
i);
60 EXPECT_EQ((*it)->base,
i);
61 EXPECT_EQ(it->item, 10 +
i);
62 EXPECT_EQ((*it)->item, 10 +
i);
78 Item a1(1, 11), a2(2, 12), a3(3, 13);
86 EXPECT_EQ(&a1,
all.RemoveFirst());
87 EXPECT_EQ(&a2,
all.RemoveFirst());
88 EXPECT_EQ(&a3,
all.RemoveFirst());
94 Item a1(1, 11), a2(2, 12), a3(3, 13);
102 EXPECT_EQ(&a3,
all.RemoveLast());
103 EXPECT_EQ(&a2,
all.RemoveLast());
104 EXPECT_EQ(&a1,
all.RemoveLast());
109 Item a1(1, 11), a2(2, 12), a3(3, 13);
121 EXPECT_EQ(&a1,
all.RemoveFirst());
123 EXPECT_EQ(&a3,
all.RemoveLast());
125 EXPECT_EQ(&a2,
all.RemoveFirst());
132 Item a1(1, 11), a2(2, 12), a3(3, 13);
140 auto it =
all.Begin();
141 it =
all.Erase(++it);
143 EXPECT_EQ(*it,
all.Last());
145 it =
all.Erase(
all.Begin());
147 EXPECT_EQ(*it,
all.First());
148 EXPECT_EQ(*it,
all.Last());
150 it =
all.Erase(
all.Begin());
161 Item a1(1, 11), a2(2, 12);
169 EXPECT_EQ(&a1, other.
First());
170 EXPECT_EQ(&a2, other.
Last());
172 auto it = other.
Begin();
174 it = other.
Erase(it);
176 it = other.
Erase(it);
184 Item a1(1, 11), a2(2, 12);
195 EXPECT_EQ(&o1, other.
First());
196 EXPECT_EQ(&a2, other.
Last());
198 auto it = other.
Begin();
200 it = other.
Erase(it);
202 it = other.
Erase(it);
204 it = other.
Erase(it);
void AppendList(IntrusiveDList< T, N > *other)
Iterator< T, N > Erase(const Iterator< T, N > &iterator)
UNIT_TEST_CASE(PRIORITY_HEAP_WITH_INDEX__INCREASING)
SIT bool all(const Vec< 1, T > &x)