aboutsummaryrefslogtreecommitdiff
path: root/tests/loader
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-11-11 15:50:48 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-11-11 17:53:08 +0200
commite80ebd1c1a6fe7749c1565c4a9e2fccaa07d5d95 (patch)
tree6cc8e8d6f65d3cd631e458e62c9c74ed9de29411 /tests/loader
parentaacff79e854d6d4eb22540339bc88c3efab353a2 (diff)
Add package::internal() predicate
Diffstat (limited to 'tests/loader')
-rw-r--r--tests/loader/driver.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/loader/driver.cxx b/tests/loader/driver.cxx
index 2222fde..881a2db 100644
--- a/tests/loader/driver.cxx
+++ b/tests/loader/driver.cxx
@@ -38,11 +38,11 @@ operator== (const dependency& a, const dependency& b)
static bool
check_location (shared_ptr<package>& p)
{
- if (p->internal_repository == nullptr)
- return !p->location;
- else
+ if (p->internal ())
return p->location && *p->location ==
path (p->id.name + "-" + p->version.string () + ".tar.gz");
+ else
+ return !p->location;
}
static bool
@@ -50,7 +50,7 @@ check_external (const package& p)
{
return p.summary.empty () && p.tags.empty () && !p.description &&
p.url.empty () && !p.package_url && p.email.empty () && !p.package_email &&
- p.internal_repository == nullptr && p.other_repositories.size () > 0 &&
+ !p.internal () && p.other_repositories.size () > 0 &&
p.priority == priority () && p.changes.empty () &&
p.license_alternatives.empty () && p.dependencies.empty () &&
p.requirements.empty ();