test/util/TestIntrusiveList: add tests for reverse iterators
This commit is contained in:
		| @@ -54,6 +54,20 @@ TEST(IntrusiveList, Basic) | ||||
| 	ASSERT_EQ(&*i, &c); | ||||
| 	++i; | ||||
| 	ASSERT_EQ(i, list.end()); | ||||
| 	++i; | ||||
| 	ASSERT_EQ(&*i, &a); | ||||
|  | ||||
| 	--i; | ||||
| 	ASSERT_EQ(i, list.end()); | ||||
| 	--i; | ||||
| 	ASSERT_EQ(&*i, &c); | ||||
| 	--i; | ||||
| 	ASSERT_EQ(&*i, &b); | ||||
| 	--i; | ||||
| 	ASSERT_EQ(&*i, &a); | ||||
| 	ASSERT_EQ(i, list.begin()); | ||||
| 	--i; | ||||
| 	ASSERT_EQ(i, list.end()); | ||||
|  | ||||
| 	b.unlink(); | ||||
|  | ||||
| @@ -63,6 +77,18 @@ TEST(IntrusiveList, Basic) | ||||
| 	ASSERT_EQ(&*i, &c); | ||||
| 	++i; | ||||
| 	ASSERT_EQ(i, list.end()); | ||||
| 	++i; | ||||
| 	ASSERT_EQ(&*i, &a); | ||||
|  | ||||
| 	--i; | ||||
| 	ASSERT_EQ(i, list.end()); | ||||
| 	--i; | ||||
| 	ASSERT_EQ(&*i, &c); | ||||
| 	--i; | ||||
| 	ASSERT_EQ(&*i, &a); | ||||
| 	ASSERT_EQ(i, list.begin()); | ||||
| 	--i; | ||||
| 	ASSERT_EQ(i, list.end()); | ||||
| } | ||||
|  | ||||
| TEST(IntrusiveList, SafeLink) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann