Now uses new SinglyLinkedList template parameters.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4602 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -116,7 +116,7 @@ private:
|
|||||||
CachedBlock fData;
|
CachedBlock fData;
|
||||||
status_t fInitStatus;
|
status_t fInitStatus;
|
||||||
vnode_id fId;
|
vnode_id fId;
|
||||||
SinglyLinkedList<Strategy::SinglyLinkedList::Auto<DirectoryIterator*> > fIteratorList;
|
SinglyLinkedList<DirectoryIterator*> fIteratorList;
|
||||||
FileEntry<udf_file_icb_entry> fFileEntry;
|
FileEntry<udf_file_icb_entry> fFileEntry;
|
||||||
FileEntry<udf_extended_file_icb_entry> fExtendedEntry;
|
FileEntry<udf_extended_file_icb_entry> fExtendedEntry;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -63,9 +63,11 @@ SinglyLinkedListTest::TestList(List &list, typename List::ValueType *values, int
|
|||||||
CHK(list.Count() == i+1);
|
CHK(list.Count() == i+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
// Prefix increment
|
// Prefix increment
|
||||||
int preIndex = valueCount-1;
|
int preIndex = valueCount-1;
|
||||||
for (typename List::Iterator iterator = list.Begin(); iterator != list.End(); --preIndex) {
|
typename List::Iterator iterator;
|
||||||
|
for (iterator = list.Begin(); iterator != list.End(); --preIndex) {
|
||||||
NextSubTest();
|
NextSubTest();
|
||||||
// printf("(%p, %ld) %s (%p, %ld)\n", iterator->next, iterator->data, ((*iterator == values[preIndex]) ? "==" : "!="), values[preIndex].next, values[preIndex].data);
|
// printf("(%p, %ld) %s (%p, %ld)\n", iterator->next, iterator->data, ((*iterator == values[preIndex]) ? "==" : "!="), values[preIndex].next, values[preIndex].data);
|
||||||
CHK(*iterator == values[preIndex]);
|
CHK(*iterator == values[preIndex]);
|
||||||
@@ -74,7 +76,7 @@ SinglyLinkedListTest::TestList(List &list, typename List::ValueType *values, int
|
|||||||
CHK(copy != ++iterator);
|
CHK(copy != ++iterator);
|
||||||
}
|
}
|
||||||
CHK(preIndex == -1);
|
CHK(preIndex == -1);
|
||||||
|
}
|
||||||
list.MakeEmpty();
|
list.MakeEmpty();
|
||||||
|
|
||||||
// PushBack
|
// PushBack
|
||||||
@@ -102,7 +104,7 @@ SinglyLinkedListTest::TestList(List &list, typename List::ValueType *values, int
|
|||||||
//! Test using the User strategy with the default NextMember.
|
//! Test using the User strategy with the default NextMember.
|
||||||
void
|
void
|
||||||
SinglyLinkedListTest::UserDefaultTest() {
|
SinglyLinkedListTest::UserDefaultTest() {
|
||||||
SinglyLinkedList<User<Link> > list;
|
SinglyLinkedList<Link, User<Link> > list;
|
||||||
const int valueCount = 10;
|
const int valueCount = 10;
|
||||||
Link values[valueCount];
|
Link values[valueCount];
|
||||||
for (int i = 0; i < valueCount; i++) {
|
for (int i = 0; i < valueCount; i++) {
|
||||||
@@ -117,7 +119,7 @@ SinglyLinkedListTest::UserDefaultTest() {
|
|||||||
//! Test using the User strategy with a custom NextMember.
|
//! Test using the User strategy with a custom NextMember.
|
||||||
void
|
void
|
||||||
SinglyLinkedListTest::UserCustomTest() {
|
SinglyLinkedListTest::UserCustomTest() {
|
||||||
SinglyLinkedList<User<MyLink, &MyLink::mynext> > list;
|
SinglyLinkedList<MyLink, User<MyLink, &MyLink::mynext> > list;
|
||||||
const int valueCount = 10;
|
const int valueCount = 10;
|
||||||
MyLink values[valueCount];
|
MyLink values[valueCount];
|
||||||
for (int i = 0; i < valueCount; i++) {
|
for (int i = 0; i < valueCount; i++) {
|
||||||
@@ -132,7 +134,7 @@ SinglyLinkedListTest::UserCustomTest() {
|
|||||||
//! Test using the Auto strategy.
|
//! Test using the Auto strategy.
|
||||||
void
|
void
|
||||||
SinglyLinkedListTest::AutoTest() {
|
SinglyLinkedListTest::AutoTest() {
|
||||||
SinglyLinkedList<Auto<long> > list;
|
SinglyLinkedList<long> list;
|
||||||
const int valueCount = 10;
|
const int valueCount = 10;
|
||||||
long values[valueCount];
|
long values[valueCount];
|
||||||
for (int i = 0; i < valueCount; i++) {
|
for (int i = 0; i < valueCount; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user