aboutsummaryrefslogtreecommitdiff
path: root/paludis/package_database_TEST.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-30 22:22:54 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-30 22:22:54 +0000
commit904e31a92e816f47a6e2ba43375a837aa765c356 (patch)
tree088bdf2d19c0b557fd21d74e61a5b12c8260da49 /paludis/package_database_TEST.cc
parentbe6a82f5614b82b15c9a064608e38d79db01b65f (diff)
downloadpaludis-904e31a92e816f47a6e2ba43375a837aa765c356.tar.gz
paludis-904e31a92e816f47a6e2ba43375a837aa765c356.tar.xz
RepositoryName, and hence PackageDatabaseEntry, no longer define operator< . A new class, ArbitrarilyOrderedPackageDatabaseEntryCollection, is provided for where an arbitrary ordering is required.
Diffstat (limited to 'paludis/package_database_TEST.cc')
-rw-r--r--paludis/package_database_TEST.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/paludis/package_database_TEST.cc b/paludis/package_database_TEST.cc
index 568b22c11..142a9b86c 100644
--- a/paludis/package_database_TEST.cc
+++ b/paludis/package_database_TEST.cc
@@ -119,35 +119,35 @@ namespace test_cases
PackageDepAtom d1("r1c1/r1c1p1");
const PackageDatabaseEntryCollection::Pointer q1(p.query(d1, is_any));
- TEST_CHECK_EQUAL(q1->size(), 1);
+ TEST_CHECK_EQUAL(std::distance(q1->begin(), q1->end()), 1);
PackageDepAtom d2("r1c1/r1c1p2");
const PackageDatabaseEntryCollection::Pointer q2(p.query(d2, is_any));
- TEST_CHECK_EQUAL(q2->size(), 2);
+ TEST_CHECK_EQUAL(std::distance(q2->begin(), q2->end()), 2);
PackageDepAtom d3(">=r1c1/r1c1p2-1");
const PackageDatabaseEntryCollection::Pointer q3(p.query(d3, is_any));
- TEST_CHECK_EQUAL(q3->size(), 2);
+ TEST_CHECK_EQUAL(std::distance(q3->begin(), q3->end()), 2);
PackageDepAtom d4(">=r1c1/r1c1p2-2");
const PackageDatabaseEntryCollection::Pointer q4(p.query(d4, is_any));
- TEST_CHECK_EQUAL(q4->size(), 1);
+ TEST_CHECK_EQUAL(std::distance(q4->begin(), q4->end()), 1);
PackageDepAtom d5(">=r1c1/r1c1p2-3");
const PackageDatabaseEntryCollection::Pointer q5(p.query(d5, is_any));
- TEST_CHECK_EQUAL(q5->size(), 0);
+ TEST_CHECK_EQUAL(std::distance(q5->begin(), q5->end()), 0);
PackageDepAtom d6("<r1c1/r1c1p2-3");
const PackageDatabaseEntryCollection::Pointer q6(p.query(d6, is_any));
- TEST_CHECK_EQUAL(q6->size(), 2);
+ TEST_CHECK_EQUAL(std::distance(q6->begin(), q6->end()), 2);
PackageDepAtom d7("rac1/rac1pa");
const PackageDatabaseEntryCollection::Pointer q7(p.query(d7, is_any));
- TEST_CHECK_EQUAL(q7->size(), 4);
+ TEST_CHECK_EQUAL(std::distance(q7->begin(), q7->end()), 4);
PackageDepAtom d8("foo/bar");
const PackageDatabaseEntryCollection::Pointer q8(p.query(d8, is_any));
- TEST_CHECK_EQUAL(q8->size(), 0);
+ TEST_CHECK_EQUAL(std::distance(q8->begin(), q8->end()), 0);
}
} package_database_query_test;