diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-10-31 21:38:19 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-11-02 20:08:21 +0200 |
commit | 4993f11bf464c9aee0e3fd5965f4a8258cbe8b30 (patch) | |
tree | 0abdc530e0a95dc6c6b4e40068be7d8554bca686 /tests/loader/driver.cxx | |
parent | 5b336ac46f60606cdcf77889d624ce15cdd62530 (diff) |
Bug fix in latest_packages() PostgreSQL function
Diffstat (limited to 'tests/loader/driver.cxx')
-rw-r--r-- | tests/loader/driver.cxx | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/tests/loader/driver.cxx b/tests/loader/driver.cxx index 40d9b13..6d9b950 100644 --- a/tests/loader/driver.cxx +++ b/tests/loader/driver.cxx @@ -90,7 +90,7 @@ main (int argc, char* argv[]) transaction t (db.begin ()); assert (db.query<repository> ().size () == 3); - assert (db.query<package> ().size () == 9); + assert (db.query<package> ().size () == 10); shared_ptr<repository> sr (db.load<repository> ("cppget.org/stable")); shared_ptr<repository> mr (db.load<repository> ("cppget.org/math")); @@ -451,6 +451,10 @@ main (int argc, char* argv[]) db.load<package> (package_id ("libfoo", version ("0.1")))); assert (check_location (fpv0)); + shared_ptr<package> fpv6 ( + db.load<package> (package_id ("libfoo", version ("1.2.4-2")))); + assert (check_location (fpv6)); + // Verify libbar package version. // // libbar-2.3.5 @@ -486,7 +490,7 @@ main (int argc, char* argv[]) assert (fpv0->email.empty ()); assert (!fpv0->package_email); - assert (fpv0->internal_repository.load () == nullptr); + assert (fpv0->internal_repository == nullptr); assert (fpv0->external_repositories.size () == 1); assert (fpv0->external_repositories[0].load () == cr); assert (fpv0->priority == priority::low); @@ -497,6 +501,27 @@ main (int argc, char* argv[]) assert (fpv0->dependencies.empty ()); assert (fpv0->requirements.empty ()); + // libfoo-1.2.4-2 + // + assert (fpv6->summary.empty ()); + assert (fpv6->tags.empty ()); + assert (!fpv6->description); + assert (fpv6->url.empty ()); + assert (!fpv6->package_url); + assert (fpv6->email.empty ()); + assert (!fpv6->package_email); + + assert (fpv6->internal_repository == nullptr); + assert (fpv6->external_repositories.size () == 1); + assert (fpv6->external_repositories[0].load () == cr); + assert (fpv6->priority == priority::low); + assert (fpv6->changes.empty ()); + + assert (fpv6->license_alternatives.empty ()); + + assert (fpv6->dependencies.empty ()); + assert (fpv6->requirements.empty ()); + // Change package summary, update the object persistent state, rerun // loader and ensure the model were not rebuilt. // |