aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-22 18:34:00 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-22 18:55:26 +0100
commit8603d3262180a2771947801ce1d80cbd5092c989 (patch)
tree85f5265b67dc94b063b320870a8ea8588999593e
parentf7be9952e67a5cdad6f3531a22654db198e7d106 (diff)
downloadpaludis-8603d3262180a2771947801ce1d80cbd5092c989.tar.gz
paludis-8603d3262180a2771947801ce1d80cbd5092c989.tar.xz
shared_ptr<> no longer implicitly bools
-rw-r--r--paludis/environments/no_config/no_config_environment_TEST.cc2
-rw-r--r--paludis/environments/paludis/paludis_environment_TEST.cc12
-rw-r--r--paludis/filter_TEST.cc4
-rw-r--r--paludis/generator_TEST.cc4
-rw-r--r--paludis/ndbam.cc4
-rw-r--r--paludis/package_database_TEST.cc10
-rw-r--r--paludis/package_dep_spec_properties.cc24
-rw-r--r--paludis/range_rewriter_TEST.cc4
-rw-r--r--paludis/repositories/accounts/accounts_repository.cc2
-rw-r--r--paludis/repositories/cran/cran_package_id.cc6
-rw-r--r--paludis/repositories/e/dep_parser.cc2
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc38
-rw-r--r--paludis/repositories/e/e_repository_TEST_0.cc48
-rw-r--r--paludis/repositories/e/e_repository_TEST_1.cc10
-rw-r--r--paludis/repositories/e/e_repository_TEST_2.cc16
-rw-r--r--paludis/repositories/e/e_repository_TEST_3.cc2
-rw-r--r--paludis/repositories/e/e_repository_TEST_4.cc24
-rw-r--r--paludis/repositories/e/e_repository_TEST_dependencies_rewriter.cc6
-rw-r--r--paludis/repositories/e/e_repository_TEST_ever.cc2
-rw-r--r--paludis/repositories/e/e_repository_TEST_exheres_0.cc108
-rw-r--r--paludis/repositories/e/e_repository_TEST_exlibs.cc2
-rw-r--r--paludis/repositories/e/e_repository_TEST_pbin.cc4
-rw-r--r--paludis/repositories/e/e_repository_TEST_phases.cc2
-rw-r--r--paludis/repositories/e/e_repository_TEST_replacing.cc2
-rw-r--r--paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc2
-rw-r--r--paludis/repositories/e/e_repository_sets_TEST.cc2
-rw-r--r--paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc90
-rw-r--r--paludis/repositories/e/vdb_repository_TEST.cc32
-rw-r--r--paludis/repositories/e/xml_things_TEST.cc6
-rw-r--r--paludis/repositories/gems/gem_specification_TEST.cc6
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_TEST.cc4
-rw-r--r--paludis/repositories/unpackaged/installed_repository_TEST.cc8
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository_TEST.cc2
-rw-r--r--paludis/repositories/unwritten/unwritten_repository_TEST.cc2
-rw-r--r--paludis/repositories/virtuals/virtuals_repository_TEST.cc2
-rw-r--r--paludis/repository_name_cache_TEST.cc8
-rw-r--r--paludis/resolver/decider.cc2
-rw-r--r--paludis/resolver/resolver_TEST_blockers.cc6
-rw-r--r--paludis/user_dep_spec_TEST.cc20
-rw-r--r--ruby/dep_spec.cc16
-rw-r--r--ruby/repository.cc2
-rw-r--r--src/clients/cave/resolve_common.cc4
42 files changed, 276 insertions, 276 deletions
diff --git a/paludis/environments/no_config/no_config_environment_TEST.cc b/paludis/environments/no_config/no_config_environment_TEST.cc
index d3de816..1a987bf 100644
--- a/paludis/environments/no_config/no_config_environment_TEST.cc
+++ b/paludis/environments/no_config/no_config_environment_TEST.cc
@@ -48,7 +48,7 @@ namespace test_cases
n::write_cache() = FSEntry("/var/empty")
));
- TEST_CHECK(e.package_database());
+ TEST_CHECK(bool(e.package_database()));
}
} test_no_config_environment;
}
diff --git a/paludis/environments/paludis/paludis_environment_TEST.cc b/paludis/environments/paludis/paludis_environment_TEST.cc
index 919bf0e..d619a97 100644
--- a/paludis/environments/paludis/paludis_environment_TEST.cc
+++ b/paludis/environments/paludis/paludis_environment_TEST.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -188,11 +188,11 @@ namespace test_cases
std::shared_ptr<Environment> env(new PaludisEnvironment(""));
- TEST_CHECK(env->package_database()->fetch_repository(RepositoryName("first")));
- TEST_CHECK(env->package_database()->fetch_repository(RepositoryName("second")));
- TEST_CHECK(env->package_database()->fetch_repository(RepositoryName("third")));
- TEST_CHECK(env->package_database()->fetch_repository(RepositoryName("fourth")));
- TEST_CHECK(env->package_database()->fetch_repository(RepositoryName("fifth")));
+ TEST_CHECK(bool(env->package_database()->fetch_repository(RepositoryName("first"))));
+ TEST_CHECK(bool(env->package_database()->fetch_repository(RepositoryName("second"))));
+ TEST_CHECK(bool(env->package_database()->fetch_repository(RepositoryName("third"))));
+ TEST_CHECK(bool(env->package_database()->fetch_repository(RepositoryName("fourth"))));
+ TEST_CHECK(bool(env->package_database()->fetch_repository(RepositoryName("fifth"))));
TEST_CHECK(env->package_database()->more_important_than(RepositoryName("first"), RepositoryName("second")));
TEST_CHECK(env->package_database()->more_important_than(RepositoryName("second"), RepositoryName("third")));
diff --git a/paludis/filter_TEST.cc b/paludis/filter_TEST.cc
index d83ff9c..df9f3ab 100644
--- a/paludis/filter_TEST.cc
+++ b/paludis/filter_TEST.cc
@@ -91,13 +91,13 @@ namespace test_cases
const std::string expected(get_expected());
std::shared_ptr<const PackageIDSequence> got(env[selection::AllVersionsSorted(generator::All() | filter)]);
- TEST_CHECK(got);
+ TEST_CHECK(bool(got));
TEST_CHECK_EQUAL(join(indirect_iterator(got->begin()), indirect_iterator(got->end()), ", "), expected);
std::shared_ptr<const PackageIDSequence> got_none(env[selection::AllVersionsSorted(
generator::Matches(parse_user_package_dep_spec("not/exist", &env,
UserPackageDepSpecOptions()), MatchPackageOptions()) | filter)]);
- TEST_CHECK(got_none);
+ TEST_CHECK(bool(got_none));
TEST_CHECK_EQUAL(join(indirect_iterator(got_none->begin()), indirect_iterator(got_none->end()), ", "), "");
}
};
diff --git a/paludis/generator_TEST.cc b/paludis/generator_TEST.cc
index 01748d6..ad4314d 100644
--- a/paludis/generator_TEST.cc
+++ b/paludis/generator_TEST.cc
@@ -89,12 +89,12 @@ namespace test_cases
const std::string expected(get_expected());
std::shared_ptr<const PackageIDSequence> got(env[selection::AllVersionsSorted(generator)]);
- TEST_CHECK(got);
+ TEST_CHECK(bool(got));
TEST_CHECK_EQUAL(join(indirect_iterator(got->begin()), indirect_iterator(got->end()), ", "), expected);
std::shared_ptr<const PackageIDSequence> got_none(env[selection::AllVersionsSorted(generator |
filter::SupportsAction<InstallAction>() | filter::SupportsAction<UninstallAction>())]);
- TEST_CHECK(got_none);
+ TEST_CHECK(bool(got_none));
TEST_CHECK_EQUAL(join(indirect_iterator(got_none->begin()), indirect_iterator(got_none->end()), ", "), "");
}
};
diff --git a/paludis/ndbam.cc b/paludis/ndbam.cc
index 0728888..61a4b46 100644
--- a/paludis/ndbam.cc
+++ b/paludis/ndbam.cc
@@ -224,7 +224,7 @@ NDBAM::has_category_named(const CategoryNamePart & c)
Lock l(_imp->category_names_mutex);
CategoryContentsMap::const_iterator it(_imp->category_contents_map.find(c));
if (it != _imp->category_contents_map.end())
- return it->second;
+ return bool(it->second);
if (! _imp->category_names)
{
@@ -255,7 +255,7 @@ NDBAM::has_package_named(const QualifiedPackageName & q)
PackageContentsMap::const_iterator it(cc.package_contents_map.find(q));
if (it != cc.package_contents_map.end())
- return it->second;
+ return bool(it->second);
if (! cc.package_names)
{
diff --git a/paludis/package_database_TEST.cc b/paludis/package_database_TEST.cc
index a4dec42..206a0fb 100644
--- a/paludis/package_database_TEST.cc
+++ b/paludis/package_database_TEST.cc
@@ -65,7 +65,7 @@ namespace test_cases
TEST_CHECK_THROWS(p.fetch_repository(RepositoryName("repo2")), NoSuchRepositoryError);
p.add_repository(10, r1);
- TEST_CHECK(p.fetch_repository(RepositoryName("repo1")));
+ TEST_CHECK(bool(p.fetch_repository(RepositoryName("repo1"))));
TEST_CHECK_EQUAL(p.fetch_repository(RepositoryName("repo1"))->name(),
RepositoryName("repo1"));
TEST_CHECK_THROWS(p.fetch_repository(RepositoryName("repo2")), NoSuchRepositoryError);
@@ -73,20 +73,20 @@ namespace test_cases
TEST_CHECK_THROWS(p.add_repository(10, r1), DuplicateRepositoryError);
p.add_repository(11, r2);
- TEST_CHECK(p.fetch_repository(RepositoryName("repo1")));
+ TEST_CHECK(bool(p.fetch_repository(RepositoryName("repo1"))));
TEST_CHECK_EQUAL(p.fetch_repository(RepositoryName("repo1"))->name(),
RepositoryName("repo1"));
- TEST_CHECK(p.fetch_repository(RepositoryName("repo2")));
+ TEST_CHECK(bool(p.fetch_repository(RepositoryName("repo2"))));
TEST_CHECK_EQUAL(p.fetch_repository(RepositoryName("repo2"))->name(),
RepositoryName("repo2"));
TEST_CHECK_THROWS(p.add_repository(10, r1), DuplicateRepositoryError);
TEST_CHECK_THROWS(p.add_repository(5, r2), DuplicateRepositoryError);
- TEST_CHECK(p.fetch_repository(RepositoryName("repo1")));
+ TEST_CHECK(bool(p.fetch_repository(RepositoryName("repo1"))));
TEST_CHECK_EQUAL(p.fetch_repository(RepositoryName("repo1"))->name(),
RepositoryName("repo1"));
- TEST_CHECK(p.fetch_repository(RepositoryName("repo2")));
+ TEST_CHECK(bool(p.fetch_repository(RepositoryName("repo2"))));
TEST_CHECK_EQUAL(p.fetch_repository(RepositoryName("repo2"))->name(),
RepositoryName("repo2"));
diff --git a/paludis/package_dep_spec_properties.cc b/paludis/package_dep_spec_properties.cc
index 1393227..667fdc2 100644
--- a/paludis/package_dep_spec_properties.cc
+++ b/paludis/package_dep_spec_properties.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2009 Ciaran McCreesh
+ * Copyright (c) 2009, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -41,17 +41,17 @@ paludis::package_dep_spec_has_properties(const PackageDepSpec & spec, const Pack
{
bool result(true);
- result = result && check(spec.additional_requirements_ptr() && ! spec.additional_requirements_ptr()->empty(), properties.has_additional_requirements());
- result = result && check(spec.category_name_part_ptr(), properties.has_category_name_part());
- result = result && check(spec.from_repository_ptr(), properties.has_from_repository());
- result = result && check(spec.in_repository_ptr(), properties.has_in_repository());
- result = result && check(spec.installable_to_path_ptr(), properties.has_installable_to_path());
- result = result && check(spec.installable_to_repository_ptr(), properties.has_installable_to_repository());
- result = result && check(spec.installed_at_path_ptr(), properties.has_installed_at_path());
- result = result && check(spec.package_ptr(), properties.has_package());
- result = result && check(spec.package_name_part_ptr(), properties.has_package_name_part());
- result = result && check(spec.slot_requirement_ptr(), properties.has_slot_requirement());
- result = result && check(spec.tag(), properties.has_tag());
+ result = result && check(bool(spec.additional_requirements_ptr()) && ! spec.additional_requirements_ptr()->empty(), properties.has_additional_requirements());
+ result = result && check(bool(spec.category_name_part_ptr()), properties.has_category_name_part());
+ result = result && check(bool(spec.from_repository_ptr()), properties.has_from_repository());
+ result = result && check(bool(spec.in_repository_ptr()), properties.has_in_repository());
+ result = result && check(bool(spec.installable_to_path_ptr()), properties.has_installable_to_path());
+ result = result && check(bool(spec.installable_to_repository_ptr()), properties.has_installable_to_repository());
+ result = result && check(bool(spec.installed_at_path_ptr()), properties.has_installed_at_path());
+ result = result && check(bool(spec.package_ptr()), properties.has_package());
+ result = result && check(bool(spec.package_name_part_ptr()), properties.has_package_name_part());
+ result = result && check(bool(spec.slot_requirement_ptr()), properties.has_slot_requirement());
+ result = result && check(bool(spec.tag()), properties.has_tag());
result = result && check(spec.version_requirements_ptr() && ! spec.version_requirements_ptr()->empty(), properties.has_version_requirements());
return result;
diff --git a/paludis/range_rewriter_TEST.cc b/paludis/range_rewriter_TEST.cc
index 4f00125..77763af 100644
--- a/paludis/range_rewriter_TEST.cc
+++ b/paludis/range_rewriter_TEST.cc
@@ -51,9 +51,9 @@ namespace test_cases
RangeRewriter r;
TEST_CHECK(! r.spec());
std::for_each(indirect_iterator(a->root()->begin()), indirect_iterator(a->root()->end()), accept_visitor(r));
- TEST_CHECK(r.spec());
+ TEST_CHECK(bool(r.spec()));
- TEST_CHECK(r.spec());
+ TEST_CHECK(bool(r.spec()));
TEST_CHECK_STRINGIFY_EQUAL(*r.spec(), "a/b[=1|=2] (rewritten from { =a/b-1, =a/b-2 })");
}
} test_range_rewriter;
diff --git a/paludis/repositories/accounts/accounts_repository.cc b/paludis/repositories/accounts/accounts_repository.cc
index ae53bff..fd12970 100644
--- a/paludis/repositories/accounts/accounts_repository.cc
+++ b/paludis/repositories/accounts/accounts_repository.cc
@@ -390,7 +390,7 @@ namespace
bool
AccountsRepository::some_ids_might_support_action(const SupportsActionTestBase & a) const
{
- SupportsActionQuery q(_imp->params_if_installed);
+ SupportsActionQuery q(bool(_imp->params_if_installed));
return a.accept_returning<bool>(q);
}
diff --git a/paludis/repositories/cran/cran_package_id.cc b/paludis/repositories/cran/cran_package_id.cc
index 7ddb4d3..3bff511 100644
--- a/paludis/repositories/cran/cran_package_id.cc
+++ b/paludis/repositories/cran/cran_package_id.cc
@@ -480,17 +480,17 @@ namespace
bool visit(const SupportsActionTest<FetchAction> &) const
{
- return cran_repository;
+ return bool(cran_repository);
}
bool visit(const SupportsActionTest<PretendFetchAction> &) const
{
- return cran_repository;
+ return bool(cran_repository);
}
bool visit(const SupportsActionTest<InstallAction> &) const
{
- return cran_repository;
+ return bool(cran_repository);
}
bool visit(const SupportsActionTest<ConfigAction> &) const
diff --git a/paludis/repositories/e/dep_parser.cc b/paludis/repositories/e/dep_parser.cc
index 70f8dbc..b200d6b 100644
--- a/paludis/repositories/e/dep_parser.cc
+++ b/paludis/repositories/e/dep_parser.cc
@@ -265,7 +265,7 @@ namespace
const std::shared_ptr<const PackageID> & id)
{
std::shared_ptr<ConditionalDepSpec> spec(new ConditionalDepSpec(parse_elike_conditional_dep_spec(
- u, env, id, id->repository()->installed_root_key())));
+ u, env, id, bool(id->repository()->installed_root_key()))));
stack.push_front(make_named_values<typename ParseStackTypes<T_>::Item>(
n::item() = stack.begin()->item()->append(spec),
n::spec() = spec
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 8683ff7..fe5dc0d 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -500,15 +500,15 @@ namespace test_cases
TEST_CHECK(id1->end_metadata() != id1->find_metadata("EAPI"));
TEST_CHECK(simple_visitor_cast<const MetadataValueKey<std::string> >(**id1->find_metadata("EAPI")));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id1->find_metadata("EAPI"))->value(), "0");
- TEST_CHECK(id1->short_description_key());
+ TEST_CHECK(bool(id1->short_description_key()));
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Description");
StringifyFormatter ff;
erepository::DepSpecPrettyPrinter pd(0, std::shared_ptr<const PackageID>(), ff, 0, false, false);
- TEST_CHECK(id1->build_dependencies_key());
+ TEST_CHECK(bool(id1->build_dependencies_key()));
id1->build_dependencies_key()->value()->root()->accept(pd);
TEST_CHECK_STRINGIFY_EQUAL(pd, "foo/bar");
erepository::DepSpecPrettyPrinter pr(0, std::shared_ptr<const PackageID>(), ff, 0, false, false);
- TEST_CHECK(id1->run_dependencies_key());
+ TEST_CHECK(bool(id1->run_dependencies_key()));
id1->run_dependencies_key()->value()->root()->accept(pr);
TEST_CHECK_STRINGIFY_EQUAL(pr, "foo/bar");
@@ -517,14 +517,14 @@ namespace test_cases
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id2->end_metadata() != id2->find_metadata("EAPI"));
- TEST_CHECK(id2->short_description_key());
+ TEST_CHECK(bool(id2->short_description_key()));
TEST_CHECK_EQUAL(id2->short_description_key()->value(), "dquote \" squote ' backslash \\ dollar $");
erepository::DepSpecPrettyPrinter pd2(0, std::shared_ptr<const PackageID>(), ff, 0, false, false);
- TEST_CHECK(id2->build_dependencies_key());
+ TEST_CHECK(bool(id2->build_dependencies_key()));
id2->build_dependencies_key()->value()->root()->accept(pd2);
TEST_CHECK_STRINGIFY_EQUAL(pd2, "foo/bar bar/baz");
erepository::DepSpecPrettyPrinter pr2(0, std::shared_ptr<const PackageID>(), ff, 0, false, false);
- TEST_CHECK(id2->run_dependencies_key());
+ TEST_CHECK(bool(id2->run_dependencies_key()));
id2->run_dependencies_key()->value()->root()->accept(pr2);
TEST_CHECK_STRINGIFY_EQUAL(pr2, "foo/bar");
@@ -533,9 +533,9 @@ namespace test_cases
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
TEST_CHECK(id3->end_metadata() != id3->find_metadata("EAPI"));
- TEST_CHECK(id3->short_description_key());
+ TEST_CHECK(bool(id3->short_description_key()));
TEST_CHECK_EQUAL(id3->short_description_key()->value(), "This is the short description");
- TEST_CHECK(id3->long_description_key());
+ TEST_CHECK(bool(id3->long_description_key()));
TEST_CHECK_EQUAL(id3->long_description_key()->value(), "This is the long description");
}
}
@@ -594,7 +594,7 @@ namespace test_cases
{
TestMessageSuffix s(stringify(*p) + "[" + n + "]", true);
std::shared_ptr<const ChoiceValue> choice(p->choices_key()->value()->find_by_name_with_prefix(ChoiceNameWithPrefix(n)));
- TEST_CHECK(choice);
+ TEST_CHECK(bool(choice));
TEST_CHECK_EQUAL(choice->unprefixed_name(), UnprefixedChoiceName(u.empty() ? n : u));
TEST_CHECK_EQUAL(choice->enabled(), enabled);
TEST_CHECK_EQUAL(choice->enabled_by_default(), enabled_by_default);
@@ -950,8 +950,8 @@ namespace test_cases
const std::shared_ptr<const PackageID> no_files_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/no-files",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(no_files_id);
- TEST_CHECK(no_files_id->short_description_key());
+ TEST_CHECK(bool(no_files_id));
+ TEST_CHECK(bool(no_files_id->short_description_key()));
TEST_CHECK_EQUAL(no_files_id->short_description_key()->value(), "The Short Description");
no_files_id->perform_action(action);
}
@@ -961,7 +961,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> fetched_files_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/fetched-files",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(fetched_files_id);
+ TEST_CHECK(bool(fetched_files_id));
TEST_CHECK((FSEntry("e_repository_TEST_dir") / "distdir" / "already-fetched.txt").is_regular_file());
fetched_files_id->perform_action(action);
TEST_CHECK((FSEntry("e_repository_TEST_dir") / "distdir" / "already-fetched.txt").is_regular_file());
@@ -973,7 +973,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> fetchable_files_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/fetchable-files",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(fetchable_files_id);
+ TEST_CHECK(bool(fetchable_files_id));
fetchable_files_id->perform_action(action);
TEST_CHECK((FSEntry("e_repository_TEST_dir") / "distdir" / "fetchable-1.txt").is_regular_file());
}
@@ -984,7 +984,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> arrow_files_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/arrow-files",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(arrow_files_id);
+ TEST_CHECK(bool(arrow_files_id));
arrow_files_id->perform_action(action);
TEST_CHECK((FSEntry("e_repository_TEST_dir") / "distdir" / "arrowed.txt").is_regular_file());
}
@@ -994,7 +994,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> unfetchable_files_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/unfetchable-files",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(unfetchable_files_id);
+ TEST_CHECK(bool(unfetchable_files_id));
TEST_CHECK_THROWS(unfetchable_files_id->perform_action(action), ActionFailedError);
}
@@ -1002,7 +1002,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> no_files_restricted_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/no-files-restricted",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(no_files_restricted_id);
+ TEST_CHECK(bool(no_files_restricted_id));
no_files_restricted_id->perform_action(action);
}
@@ -1010,7 +1010,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> fetched_files_restricted_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/fetched-files-restricted",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(fetched_files_restricted_id);
+ TEST_CHECK(bool(fetched_files_restricted_id));
fetched_files_restricted_id->perform_action(action);
}
@@ -1018,7 +1018,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> fetchable_files_restricted_id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/fetchable-files-restricted",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(fetchable_files_restricted_id);
+ TEST_CHECK(bool(fetchable_files_restricted_id));
TEST_CHECK_THROWS(fetchable_files_restricted_id->perform_action(action), ActionFailedError);
}
}
@@ -1057,7 +1057,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::AllVersionsSorted(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("category/package",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
repo->make_manifest(id->name());
id->perform_action(action);
}
diff --git a/paludis/repositories/e/e_repository_TEST_0.cc b/paludis/repositories/e/e_repository_TEST_0.cc
index 85711c2..7d4c73a 100644
--- a/paludis/repositories/e/e_repository_TEST_0.cc
+++ b/paludis/repositories/e/e_repository_TEST_0.cc
@@ -162,7 +162,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=virtual/virtual-pretend-installed-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
}
#endif
@@ -171,7 +171,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/in-ebuild-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -180,7 +180,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/in-subshell-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -189,7 +189,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/success",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -198,7 +198,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/unpack-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -207,7 +207,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/econf-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -216,7 +216,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/emake-fail",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -225,7 +225,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/emake-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -234,7 +234,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/einstall-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -243,7 +243,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/keepdir-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -252,7 +252,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/dobin-fail",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -261,7 +261,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/dobin-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -270,7 +270,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/fperms-fail",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -279,7 +279,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/fperms-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -288,7 +288,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-source-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -298,7 +298,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/doman-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
id->perform_action(action);
}
@@ -308,7 +308,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/src_prepare-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
id->perform_action(action);
}
@@ -318,7 +318,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/src_configure-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
id->perform_action(action);
}
@@ -328,7 +328,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/best-version-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -337,7 +337,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/has-version-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -346,7 +346,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/match-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -355,7 +355,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/vars-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -364,7 +364,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/expand-vars-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -373,7 +373,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-disable-dependency-tracking-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "0");
id->perform_action(action);
}
diff --git a/paludis/repositories/e/e_repository_TEST_1.cc b/paludis/repositories/e/e_repository_TEST_1.cc
index 1bfbec5..291a366 100644
--- a/paludis/repositories/e/e_repository_TEST_1.cc
+++ b/paludis/repositories/e/e_repository_TEST_1.cc
@@ -141,7 +141,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-source-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
}
@@ -151,7 +151,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/dosym-success-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
}
@@ -161,7 +161,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/doman-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
}
@@ -171,7 +171,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/src_prepare-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
}
@@ -181,7 +181,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/src_configure-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "1");
id->perform_action(action);
}
diff --git a/paludis/repositories/e/e_repository_TEST_2.cc b/paludis/repositories/e/e_repository_TEST_2.cc
index 617c2fb..a1b5cdb 100644
--- a/paludis/repositories/e/e_repository_TEST_2.cc
+++ b/paludis/repositories/e/e_repository_TEST_2.cc
@@ -141,7 +141,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-source-2",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
id->perform_action(action);
}
@@ -151,7 +151,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/doman-2",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
id->perform_action(action);
}
@@ -161,7 +161,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/src_prepare-2",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -171,7 +171,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/src_configure-2",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -181,7 +181,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/default-src_configure-2",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
id->perform_action(action);
}
@@ -191,7 +191,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/default-src_compile-2",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
id->perform_action(action);
}
@@ -201,7 +201,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/default_src_compile-2",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
id->perform_action(action);
}
@@ -211,7 +211,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/src_compile-via-default-func-2",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "2");
id->perform_action(action);
}
diff --git a/paludis/repositories/e/e_repository_TEST_3.cc b/paludis/repositories/e/e_repository_TEST_3.cc
index 636f7bb..a7aa0fb 100644
--- a/paludis/repositories/e/e_repository_TEST_3.cc
+++ b/paludis/repositories/e/e_repository_TEST_3.cc
@@ -141,7 +141,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/prefix-3",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "3");
id->perform_action(action);
}
diff --git a/paludis/repositories/e/e_repository_TEST_4.cc b/paludis/repositories/e/e_repository_TEST_4.cc
index 0bfd6d4..dc597c9 100644
--- a/paludis/repositories/e/e_repository_TEST_4.cc
+++ b/paludis/repositories/e/e_repository_TEST_4.cc
@@ -145,7 +145,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/pkg_pretend-4",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(pretend_action);
TEST_CHECK(! pretend_action.failed());
@@ -156,7 +156,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/pkg_pretend-failure-4",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(pretend_action);
TEST_CHECK(pretend_action.failed());
@@ -167,7 +167,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/default_src_install-4",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(action);
}
@@ -177,7 +177,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/docompress-4",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(action);
}
@@ -187,7 +187,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/dodoc-r-4",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(action);
}
@@ -197,7 +197,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/doins-symlink-4",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(action);
}
@@ -207,7 +207,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/banned-functions-4",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -217,7 +217,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-disable-dependency-tracking-4",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(action);
}
@@ -227,7 +227,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/strict-use-4",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(action);
}
@@ -237,7 +237,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/strict-use-fail-4",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -247,7 +247,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/strict-use-injection-4",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(action);
}
@@ -257,7 +257,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/global-scope-use-4",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), "4");
id->perform_action(action);
}
diff --git a/paludis/repositories/e/e_repository_TEST_dependencies_rewriter.cc b/paludis/repositories/e/e_repository_TEST_dependencies_rewriter.cc
index 2ea7689..338f4a4 100644
--- a/paludis/repositories/e/e_repository_TEST_dependencies_rewriter.cc
+++ b/paludis/repositories/e/e_repository_TEST_dependencies_rewriter.cc
@@ -112,17 +112,17 @@ namespace test_cases
StringifyFormatter ff;
erepository::DepSpecPrettyPrinter pd(0, std::shared_ptr<const PackageID>(), ff, 0, false, false);
- TEST_CHECK(id->build_dependencies_key());
+ TEST_CHECK(bool(id->build_dependencies_key()));
id->build_dependencies_key()->value()->root()->accept(pd);
TEST_CHECK_STRINGIFY_EQUAL(pd, "( cat/pkg1 build: cat/pkg2 build+run: cat/pkg3 suggestion: post: )");
erepository::DepSpecPrettyPrinter pr(0, std::shared_ptr<const PackageID>(), ff, 0, false, false);
- TEST_CHECK(id->run_dependencies_key());
+ TEST_CHECK(bool(id->run_dependencies_key()));
id->run_dependencies_key()->value()->root()->accept(pr);
TEST_CHECK_STRINGIFY_EQUAL(pr, "( cat/pkg1 build: build+run: cat/pkg3 suggestion: post: )");
erepository::DepSpecPrettyPrinter pp(0, std::shared_ptr<const PackageID>(), ff, 0, false, false);
- TEST_CHECK(id->post_dependencies_key());
+ TEST_CHECK(bool(id->post_dependencies_key()));
id->post_dependencies_key()->value()->root()->accept(pp);
TEST_CHECK_STRINGIFY_EQUAL(pp, "( build: build+run: suggestion: cat/pkg4 post: cat/pkg5 )");
}
diff --git a/paludis/repositories/e/e_repository_TEST_ever.cc b/paludis/repositories/e/e_repository_TEST_ever.cc
index 9a7fdc5..a3a573e 100644
--- a/paludis/repositories/e/e_repository_TEST_ever.cc
+++ b/paludis/repositories/e/e_repository_TEST_ever.cc
@@ -161,7 +161,7 @@ namespace
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/" + test,
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
};
diff --git a/paludis/repositories/e/e_repository_TEST_exheres_0.cc b/paludis/repositories/e/e_repository_TEST_exheres_0.cc
index 8bd2a07..55f4f5b 100644
--- a/paludis/repositories/e/e_repository_TEST_exheres_0.cc
+++ b/paludis/repositories/e/e_repository_TEST_exheres_0.cc
@@ -160,7 +160,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/in-ebuild-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -169,7 +169,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/in-subshell-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -178,7 +178,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/success",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -187,7 +187,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/expatch-success",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -196,7 +196,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/expatch-success-dir",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -205,7 +205,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/expatch-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -214,7 +214,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/expatch-unrecognised",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -223,7 +223,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-expatch-fail",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -232,7 +232,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-expatch-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -241,7 +241,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/unpack-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -250,7 +250,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-unpack-fail",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -259,7 +259,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-unpack-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -268,7 +268,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/econf-fail",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -277,7 +277,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-econf",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -286,7 +286,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-econf-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -295,7 +295,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/emake-fail",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -304,7 +304,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-emake",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -313,7 +313,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-emake-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -322,7 +322,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/einstall-fail",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -331,7 +331,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-einstall",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -340,7 +340,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-einstall-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -349,7 +349,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/keepdir-success",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -358,7 +358,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/keepdir-fail",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -367,7 +367,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-keepdir",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -376,7 +376,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-keepdir-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -385,7 +385,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/dobin-success",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -394,7 +394,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/dobin-fail",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -403,7 +403,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-dobin-success",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -412,7 +412,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-dobin-fail",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -421,7 +421,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/nonfatal-dobin-die",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -430,7 +430,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/herebin-success",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -439,7 +439,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/herebin-fail",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -448,7 +448,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/hereconfd-success",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -457,7 +457,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/hereconfd-fail",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -466,7 +466,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/hereenvd-success",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -475,7 +475,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/hereenvd-fail",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -484,7 +484,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/hereinitd-success",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -493,7 +493,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/hereinitd-fail",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -502,7 +502,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/hereins-success",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -511,7 +511,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/hereins-fail",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -520,7 +520,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/heresbin-success",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -529,7 +529,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/heresbin-fail",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -538,7 +538,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/best-version-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -547,7 +547,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/has-version-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -556,7 +556,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/match-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -565,7 +565,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-phase-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -574,7 +574,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/econf-vars-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -583,7 +583,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/expand-vars-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -592,7 +592,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/doman-success-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -601,7 +601,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/doman-nonfatal-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -610,7 +610,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/doman-failure-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -619,7 +619,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/change-globals-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
@@ -628,7 +628,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/install-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
@@ -637,7 +637,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/install-s-0",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_THROWS(id->perform_action(action), ActionFailedError);
}
}
diff --git a/paludis/repositories/e/e_repository_TEST_exlibs.cc b/paludis/repositories/e/e_repository_TEST_exlibs.cc
index a678bba..4d79a9f 100644
--- a/paludis/repositories/e/e_repository_TEST_exlibs.cc
+++ b/paludis/repositories/e/e_repository_TEST_exlibs.cc
@@ -155,7 +155,7 @@ namespace
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/" + test,
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
switch (expected_result)
{
case success:
diff --git a/paludis/repositories/e/e_repository_TEST_pbin.cc b/paludis/repositories/e/e_repository_TEST_pbin.cc
index 7be5f65..ecc4200 100644
--- a/paludis/repositories/e/e_repository_TEST_pbin.cc
+++ b/paludis/repositories/e/e_repository_TEST_pbin.cc
@@ -171,7 +171,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/simple-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(), base_eapi);
id->perform_action(bin_action);
}
@@ -192,7 +192,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/simple-1::binrepo" + base_eapi,
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(simple_visitor_cast<const MetadataValueKey<std::string> >(**id->find_metadata("EAPI"))->value(),
"pbin-1+" + base_eapi);
id->perform_action(install_action);
diff --git a/paludis/repositories/e/e_repository_TEST_phases.cc b/paludis/repositories/e/e_repository_TEST_phases.cc
index 2bfdd6c..e0aaaeb 100644
--- a/paludis/repositories/e/e_repository_TEST_phases.cc
+++ b/paludis/repositories/e/e_repository_TEST_phases.cc
@@ -171,7 +171,7 @@ namespace
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/" + test,
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
TEST_CHECK_EQUAL(!! id->choices_key()->value()->find_by_name_with_prefix(
ChoiceNameWithPrefix("build_options:expensive_tests")), expect_expensive_test);
diff --git a/paludis/repositories/e/e_repository_TEST_replacing.cc b/paludis/repositories/e/e_repository_TEST_replacing.cc
index 47f121a..3cf2076 100644
--- a/paludis/repositories/e/e_repository_TEST_replacing.cc
+++ b/paludis/repositories/e/e_repository_TEST_replacing.cc
@@ -158,7 +158,7 @@ namespace
PackageDepSpec(parse_user_package_dep_spec("cat/" + test,
&env, UserPackageDepSpecOptions())), MatchPackageOptions()) |
filter::SupportsAction<InstallAction>())]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
}
};
diff --git a/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc b/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc
index d37e71e..47b11b6 100644
--- a/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc
+++ b/paludis/repositories/e/e_repository_TEST_symlink_rewriting.cc
@@ -143,7 +143,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("cat/pkg",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->last());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(action);
TEST_CHECK_EQUAL(FSEntry(stringify(FSEntry::cwd() / "e_repository_TEST_symlink_rewriting_dir" / "root/bar")).readlink(), "/foo");
diff --git a/paludis/repositories/e/e_repository_sets_TEST.cc b/paludis/repositories/e/e_repository_sets_TEST.cc
index 59ceb00..40d58df 100644
--- a/paludis/repositories/e/e_repository_sets_TEST.cc
+++ b/paludis/repositories/e/e_repository_sets_TEST.cc
@@ -102,7 +102,7 @@ namespace test_cases
env.package_database()->add_repository(1, repo);
std::shared_ptr<const SetSpecTree> set1(env.set(SetName("set1::test-repo-1")));
- TEST_CHECK(set1);
+ TEST_CHECK(bool(set1));
StringifyFormatter ff;
erepository::DepSpecPrettyPrinter pretty(0, std::shared_ptr<const PackageID>(), ff, 0, false, false);
set1->root()->accept(pretty);
diff --git a/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc b/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc
index d596073..0c98360 100644
--- a/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc
+++ b/paludis/repositories/e/ebuild_flat_metadata_cache_TEST.cc
@@ -79,7 +79,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_list");
}
} test_metadata_flat_list_cached;
@@ -107,7 +107,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-stale-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id1->short_description_key());
+ TEST_CHECK(bool(id1->short_description_key()));
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_list-stale");
}
} test_metadata_flat_list_stale;
@@ -136,7 +136,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-guessed-eapi-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id1->short_description_key());
+ TEST_CHECK(bool(id1->short_description_key()));
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_list-guessed-eapi");
}
} test_metadata_flat_list_guessed_eapi;
@@ -164,7 +164,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-eclass-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_list-eclass");
TEST_CHECK_EQUAL(join(
simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->begin(),
@@ -195,7 +195,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-eclass-stale-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id1->short_description_key());
+ TEST_CHECK(bool(id1->short_description_key()));
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_list-eclass-stale");
}
} test_metadata_flat_list_eclass_stale;
@@ -223,7 +223,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-eclass-wrong-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id1->short_description_key());
+ TEST_CHECK(bool(id1->short_description_key()));
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_list-eclass-wrong");
}
} test_metadata_flat_list_eclass_wrong;
@@ -251,7 +251,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-eclass-gone-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id1->short_description_key());
+ TEST_CHECK(bool(id1->short_description_key()));
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_list-eclass-gone");
}
} test_metadata_flat_list_eclass_gone;
@@ -279,7 +279,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_list-detection-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_list-detection");
}
} test_metadata_flat_list_detection;
@@ -307,7 +307,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_hash");
}
} test_metadata_flat_hash_cached;
@@ -336,7 +336,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-guessed-eapi-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id1->short_description_key());
+ TEST_CHECK(bool(id1->short_description_key()));
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_hash-guessed-eapi");
}
} test_metadata_flat_hash_guessed_eapi;
@@ -364,7 +364,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-guessed-eapi-extension-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id1->short_description_key());
+ TEST_CHECK(bool(id1->short_description_key()));
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_hash-guessed-eapi-extension");
}
} test_metadata_flat_hash_guessed_eapi_extension;
@@ -392,7 +392,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-no-guessed-eapi-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_hash-no-guessed-eapi");
}
} test_metadata_flat_hash_cached_no_guessed_eapi;
@@ -420,7 +420,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-empty-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "");
TEST_CHECK_STRINGIFY_EQUAL(id->slot_key()->value(), "the-slot");
}
@@ -449,7 +449,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-stale-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id1->short_description_key());
+ TEST_CHECK(bool(id1->short_description_key()));
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_hash-stale");
}
} test_metadata_flat_hash_stale;
@@ -477,7 +477,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-no-mtime-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id1->short_description_key());
+ TEST_CHECK(bool(id1->short_description_key()));
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "the-description-flat_hash-no-mtime");
}
} test_metadata_flat_hash_no_mtime;
@@ -505,7 +505,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-no-mtime-stale-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id1->short_description_key());
+ TEST_CHECK(bool(id1->short_description_key()));
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_hash-no-mtime-stale");
}
} test_metadata_flat_hash_no_mtime_stale;
@@ -533,7 +533,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-bad-mtime-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id1->short_description_key());
+ TEST_CHECK(bool(id1->short_description_key()));
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_hash-bad-mtime");
}
} test_metadata_flat_hash_bad_mtime;
@@ -561,7 +561,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-no-eapi-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id1->short_description_key());
+ TEST_CHECK(bool(id1->short_description_key()));
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_hash-no-eapi");
}
} test_metadata_flat_hash_no_eapi;
@@ -589,7 +589,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-duplicate-key-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id1->short_description_key());
+ TEST_CHECK(bool(id1->short_description_key()));
TEST_CHECK_EQUAL(id1->short_description_key()->value(), "The Generated Description flat_hash-duplicate-key");
}
} test_metadata_flat_hash_duplicate_key;
@@ -617,7 +617,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_hash-eclass");
TEST_CHECK_EQUAL(join(
simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->begin(),
@@ -648,7 +648,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-stale-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-eclass-stale");
}
} test_metadata_flat_hash_eclass_stale;
@@ -676,7 +676,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-wrong-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-eclass-wrong");
}
} test_metadata_flat_hash_eclass_wrong;
@@ -703,7 +703,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclass-gone-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-eclass-gone");
}
} test_metadata_flat_hash_eclass_gone;
@@ -731,7 +731,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_hash-full-eclass");
TEST_CHECK_EQUAL(join(
simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->begin(),
@@ -762,7 +762,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-nonstandard-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_hash-full-eclass-nonstandard");
TEST_CHECK_EQUAL(join(
simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->begin(),
@@ -793,7 +793,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-stale-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-full-eclass-stale");
}
} test_metadata_flat_hash_full_eclass_stale;
@@ -821,7 +821,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-wrong-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-full-eclass-wrong");
}
} test_metadata_flat_hash_full_eclass_wrong;
@@ -849,7 +849,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-full-eclass-gone-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-full-eclass-gone");
}
} test_metadata_flat_hash_full_eclass_gone;
@@ -877,14 +877,14 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclasses-truncated-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-eclasses-truncated");
std::shared_ptr<const PackageID> id2(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclasses-truncated-2",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id2->short_description_key());
+ TEST_CHECK(bool(id2->short_description_key()));
TEST_CHECK_EQUAL(id2->short_description_key()->value(), "The Generated Description flat_hash-eclasses-truncated-2");
}
} test_metadata_flat_hash_eclasses_truncated;
@@ -912,7 +912,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclasses-bad-mtime-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-eclasses-bad-mtime");
}
} test_metadata_flat_hash_eclasses_bad_mtime;
@@ -940,7 +940,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-eclasses-spaces-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-eclasses-spaces");
}
} test_metadata_flat_hash_eclasses_spaces;
@@ -969,7 +969,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_hash-exlib");
TEST_CHECK_EQUAL(join(
simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->begin(),
@@ -1001,7 +1001,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-percat-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "the-description-flat_hash-exlib-percat");
TEST_CHECK_EQUAL(join(
simple_visitor_cast<const MetadataCollectionKey<Set<std::string> > >(**id->find_metadata("INHERITED"))->value()->begin(),
@@ -1033,7 +1033,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-stale-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-exlib-stale");
}
} test_metadata_flat_hash_exlib_stale;
@@ -1062,7 +1062,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-wrong-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-exlib-wrong");
}
} test_metadata_flat_hash_exlib_wrong;
@@ -1091,7 +1091,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlib-gone-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-exlib-gone");
}
} test_metadata_flat_hash_exlib_gone;
@@ -1120,14 +1120,14 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlibs-truncated-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-exlibs-truncated");
std::shared_ptr<const PackageID> id2(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlibs-truncated-2",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id2->short_description_key());
+ TEST_CHECK(bool(id2->short_description_key()));
TEST_CHECK_EQUAL(id2->short_description_key()->value(), "The Generated Description flat_hash-exlibs-truncated-2");
}
} test_metadata_flat_hash_exlibs_truncated;
@@ -1156,7 +1156,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlibs-bad-mtime-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-exlibs-bad-mtime");
}
} test_metadata_flat_hash_exlibs_bad_mtime;
@@ -1185,7 +1185,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/flat_hash-exlibs-spaces-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(id->short_description_key()->value(), "The Generated Description flat_hash-exlibs-spaces");
}
} test_metadata_flat_hash_exlibs_spaces;
@@ -1220,7 +1220,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/write-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(contents("ebuild_flat_metadata_cache_TEST_dir/cache/test-repo/cat/write-1"), contents("ebuild_flat_metadata_cache_TEST_dir/cache/expected/cat/write-1"));
TEST_CHECK_EQUAL(FSEntry("ebuild_flat_metadata_cache_TEST_dir/cache/test-repo/cat/write-1").mtim().seconds(), 60);
}
@@ -1256,7 +1256,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/write-eapi1-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(contents("ebuild_flat_metadata_cache_TEST_dir/cache/test-repo/cat/write-eapi1-1"), contents("ebuild_flat_metadata_cache_TEST_dir/cache/expected/cat/write-eapi1-1"));
TEST_CHECK_EQUAL(FSEntry("ebuild_flat_metadata_cache_TEST_dir/cache/test-repo/cat/write-eapi1-1").mtim().seconds(), 60);
}
@@ -1294,7 +1294,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/write-eclasses-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(contents("ebuild_flat_metadata_cache_TEST_dir/cache/test-repo/cat/write-eclasses-1"), contents("ebuild_flat_metadata_cache_TEST_dir/cache/expected/cat/write-eclasses-1"));
TEST_CHECK_EQUAL(FSEntry("ebuild_flat_metadata_cache_TEST_dir/cache/test-repo/cat/write-eclasses-1").mtim().seconds(), 60);
}
@@ -1331,7 +1331,7 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat/write-exlibs-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id->short_description_key());
+ TEST_CHECK(bool(id->short_description_key()));
TEST_CHECK_EQUAL(contents("ebuild_flat_metadata_cache_TEST_dir/cache/test-repo/cat/write-exlibs-1"), contents("ebuild_flat_metadata_cache_TEST_dir/cache/expected/cat/write-exlibs-1"));
TEST_CHECK_EQUAL(FSEntry("ebuild_flat_metadata_cache_TEST_dir/cache/test-repo/cat/write-exlibs-1").mtim().seconds(), 60);
}
diff --git a/paludis/repositories/e/vdb_repository_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc
index 83e9a28..def11e7 100644
--- a/paludis/repositories/e/vdb_repository_TEST.cc
+++ b/paludis/repositories/e/vdb_repository_TEST.cc
@@ -155,9 +155,9 @@ namespace test_cases
PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(e1->choices_key());
- TEST_CHECK(e1->choices_key()->value());
- TEST_CHECK(e1->choices_key()->value()->find_by_name_with_prefix(ChoiceNameWithPrefix("flag1")));
+ TEST_CHECK(bool(e1->choices_key()));
+ TEST_CHECK(bool(e1->choices_key()->value()));
+ TEST_CHECK(bool(e1->choices_key()->value()->find_by_name_with_prefix(ChoiceNameWithPrefix("flag1"))));
TEST_CHECK(e1->choices_key()->value()->find_by_name_with_prefix(ChoiceNameWithPrefix("flag1"))->enabled());
TEST_CHECK(e1->choices_key()->value()->find_by_name_with_prefix(ChoiceNameWithPrefix("flag2"))->enabled());
TEST_CHECK(! e1->choices_key()->value()->find_by_name_with_prefix(ChoiceNameWithPrefix("flag3"))->enabled());
@@ -284,17 +284,17 @@ namespace test_cases
StringifyFormatter ff;
erepository::DepSpecPrettyPrinter pd(0, std::shared_ptr<const PackageID>(), ff, 0, false, false);
- TEST_CHECK(id->build_dependencies_key());
+ TEST_CHECK(bool(id->build_dependencies_key()));
id->build_dependencies_key()->value()->root()->accept(pd);
TEST_CHECK_STRINGIFY_EQUAL(pd, "( cat/pkg1 build: cat/pkg2 build+run: cat/pkg3 suggestion: post: )");
erepository::DepSpecPrettyPrinter pr(0, std::shared_ptr<const PackageID>(), ff, 0, false, false);
- TEST_CHECK(id->run_dependencies_key());
+ TEST_CHECK(bool(id->run_dependencies_key()));
id->run_dependencies_key()->value()->root()->accept(pr);
TEST_CHECK_STRINGIFY_EQUAL(pr, "( cat/pkg1 build: build+run: cat/pkg3 suggestion: post: )");
erepository::DepSpecPrettyPrinter pp(0, std::shared_ptr<const PackageID>(), ff, 0, false, false);
- TEST_CHECK(id->post_dependencies_key());
+ TEST_CHECK(bool(id->post_dependencies_key()));
id->post_dependencies_key()->value()->root()->accept(pp);
TEST_CHECK_STRINGIFY_EQUAL(pp, "( build: build+run: suggestion: cat/pkg4 post: cat/pkg5 )");
}
@@ -383,7 +383,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::srcrepo",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(install_action);
}
@@ -394,7 +394,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::srcrepo",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(install_action);
}
@@ -405,7 +405,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::installed",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(info_action);
}
@@ -414,7 +414,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::installed",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(config_action);
}
@@ -423,7 +423,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::installed",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(uninstall_action);
}
}
@@ -513,7 +513,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::srcrepo",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(install_action);
}
@@ -524,7 +524,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::srcrepo",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(install_action);
}
@@ -535,7 +535,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::installed",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(info_action);
}
@@ -544,7 +544,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::installed",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(config_action);
}
@@ -553,7 +553,7 @@ namespace test_cases
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/target-" + eapi + "::installed",
&env, UserPackageDepSpecOptions())), MatchPackageOptions()))]->begin());
- TEST_CHECK(id);
+ TEST_CHECK(bool(id));
id->perform_action(uninstall_action);
}
}
diff --git a/paludis/repositories/e/xml_things_TEST.cc b/paludis/repositories/e/xml_things_TEST.cc
index 706918e..4813340 100644
--- a/paludis/repositories/e/xml_things_TEST.cc
+++ b/paludis/repositories/e/xml_things_TEST.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -35,7 +35,7 @@ namespace test_cases
void run()
{
std::shared_ptr<GLSA> glsa(GLSA::create_from_xml_file("xml_things_TEST_dir/glsa-123456-78.xml"));
- TEST_CHECK(glsa);
+ TEST_CHECK(bool(glsa));
TEST_CHECK_EQUAL("123456-78", glsa->id());
TEST_CHECK_EQUAL("Kittens: Too Adorable", glsa->title());
@@ -65,7 +65,7 @@ namespace test_cases
void run()
{
std::shared_ptr<GLSA> glsa(GLSA::create_from_xml_file("xml_things_TEST_dir/glsa-987654-32.xml"));
- TEST_CHECK(glsa);
+ TEST_CHECK(bool(glsa));
TEST_CHECK_EQUAL("987654-32", glsa->id());
TEST_CHECK_EQUAL("Python: Retarded", glsa->title());
diff --git a/paludis/repositories/gems/gem_specification_TEST.cc b/paludis/repositories/gems/gem_specification_TEST.cc
index b91ea9f..6d96d7f 100644
--- a/paludis/repositories/gems/gem_specification_TEST.cc
+++ b/paludis/repositories/gems/gem_specification_TEST.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -61,12 +61,12 @@ namespace test_cases
TestEnvironment env;
GemSpecification spec(&env, std::shared_ptr<Repository>(), *spec_doc.top());
- TEST_CHECK(spec.short_description_key());
+ TEST_CHECK(bool(spec.short_description_key()));
TEST_CHECK_EQUAL(spec.short_description_key()->value(), "This is the summary");
TEST_CHECK_EQUAL(spec.name(), QualifiedPackageName("gems/demo"));
TEST_CHECK_EQUAL(spec.version(), VersionSpec("1.2.3", VersionSpecOptions()));
TEST_CHECK(spec.find_metadata("rubyforge_project") == spec.end_metadata());
- TEST_CHECK(spec.long_description_key());
+ TEST_CHECK(bool(spec.long_description_key()));
TEST_CHECK_EQUAL(spec.long_description_key()->value(), "A longer description");
TEST_CHECK(spec.find_metadata("authors") != spec.end_metadata());
diff --git a/paludis/repositories/unavailable/unavailable_repository_TEST.cc b/paludis/repositories/unavailable/unavailable_repository_TEST.cc
index 1339a64..7b19f34 100644
--- a/paludis/repositories/unavailable/unavailable_repository_TEST.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_TEST.cc
@@ -81,7 +81,7 @@ namespace test_cases
std::shared_ptr<const PackageIDSequence> contents(
env[selection::AllVersionsSorted(generator::All())]);
- TEST_CHECK(contents);
+ TEST_CHECK(bool(contents));
TEST_CHECK_EQUAL(
join(indirect_iterator(contents->begin()), indirect_iterator(contents->end()), " "),
@@ -107,7 +107,7 @@ namespace test_cases
std::shared_ptr<const PackageIDSequence> contents_without_bar(
env[selection::AllVersionsSorted(generator::All())]);
- TEST_CHECK(contents);
+ TEST_CHECK(bool(contents));
TEST_CHECK_EQUAL(
join(indirect_iterator(contents_without_bar->begin()),
diff --git a/paludis/repositories/unpackaged/installed_repository_TEST.cc b/paludis/repositories/unpackaged/installed_repository_TEST.cc
index c6ea021..8c42442 100644
--- a/paludis/repositories/unpackaged/installed_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/installed_repository_TEST.cc
@@ -142,11 +142,11 @@ namespace test_cases
TEST_CHECK_EQUAL(id1->slot_key()->value(), SlotName("0"));
TEST_CHECK_EQUAL(id1->name(), QualifiedPackageName("cat-one/foo"));
TEST_CHECK_EQUAL(id1->repository()->name(), RepositoryName("installed-unpackaged"));
- TEST_CHECK(id1->fs_location_key());
+ TEST_CHECK(bool(id1->fs_location_key()));
TEST_CHECK_EQUAL(id1->fs_location_key()->value(),
FSEntry::cwd() / "installed_repository_TEST_dir/repo1/data/giant-space-weasel/1:0:foo/");
- TEST_CHECK(id1->contents_key());
+ TEST_CHECK(bool(id1->contents_key()));
ContentsDumper d1;
std::for_each(indirect_iterator(id1->contents_key()->value()->begin()),
indirect_iterator(id1->contents_key()->value()->end()), accept_visitor(d1));
@@ -160,11 +160,11 @@ namespace test_cases
TEST_CHECK_EQUAL(id2->slot_key()->value(), SlotName("1"));
TEST_CHECK_EQUAL(id2->name(), QualifiedPackageName("cat-one/foo"));
TEST_CHECK_EQUAL(id2->repository()->name(), RepositoryName("installed-unpackaged"));
- TEST_CHECK(id2->fs_location_key());
+ TEST_CHECK(bool(id2->fs_location_key()));
TEST_CHECK_EQUAL(id2->fs_location_key()->value(),
FSEntry::cwd() / "installed_repository_TEST_dir/repo1/data/giant-space-weasel/2:1:bar/");
- TEST_CHECK(id2->contents_key());
+ TEST_CHECK(bool(id2->contents_key()));
ContentsDumper d2;
std::for_each(indirect_iterator(id2->contents_key()->value()->begin()),
indirect_iterator(id2->contents_key()->value()->end()), accept_visitor(d2));
diff --git a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
index 3815578..e817412 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
@@ -125,7 +125,7 @@ namespace test_cases
TEST_CHECK_EQUAL(id->slot_key()->value(), SlotName("foo"));
TEST_CHECK_EQUAL(id->name(), QualifiedPackageName("cat/pkg"));
TEST_CHECK_EQUAL(id->repository()->name(), RepositoryName("unpackaged"));
- TEST_CHECK(id->fs_location_key());
+ TEST_CHECK(bool(id->fs_location_key()));
TEST_CHECK_EQUAL(id->fs_location_key()->value(), FSEntry("unpackaged_repository_TEST_dir/pkg"));
}
} test_metadata;
diff --git a/paludis/repositories/unwritten/unwritten_repository_TEST.cc b/paludis/repositories/unwritten/unwritten_repository_TEST.cc
index b51afb3..3e118e2 100644
--- a/paludis/repositories/unwritten/unwritten_repository_TEST.cc
+++ b/paludis/repositories/unwritten/unwritten_repository_TEST.cc
@@ -80,7 +80,7 @@ namespace test_cases
std::shared_ptr<const PackageIDSequence> contents(
env[selection::AllVersionsSorted(generator::All())]);
- TEST_CHECK(contents);
+ TEST_CHECK(bool(contents));
TEST_CHECK_EQUAL(
join(indirect_iterator(contents->begin()), indirect_iterator(contents->end()), " "),
diff --git a/paludis/repositories/virtuals/virtuals_repository_TEST.cc b/paludis/repositories/virtuals/virtuals_repository_TEST.cc
index e7aece2..c2ba62b 100644
--- a/paludis/repositories/virtuals/virtuals_repository_TEST.cc
+++ b/paludis/repositories/virtuals/virtuals_repository_TEST.cc
@@ -73,7 +73,7 @@ namespace test_cases
repo->add_virtual_package(QualifiedPackageName("virtual/pkg"), std::make_shared<PackageDepSpec>(
parse_user_package_dep_spec(">=cat/pkg-2", &env, UserPackageDepSpecOptions())));
- TEST_CHECK(repo->virtual_packages());
+ TEST_CHECK(bool(repo->virtual_packages()));
TEST_CHECK_EQUAL(std::distance(repo->virtual_packages()->begin(), repo->virtual_packages()->end()), 1);
TEST_CHECK(virtuals->has_category_named(CategoryNamePart("virtual")));
diff --git a/paludis/repository_name_cache_TEST.cc b/paludis/repository_name_cache_TEST.cc
index 6d4916b..5bc095f 100644
--- a/paludis/repository_name_cache_TEST.cc
+++ b/paludis/repository_name_cache_TEST.cc
@@ -150,12 +150,12 @@ namespace test_cases
std::shared_ptr<const CategoryNamePartSet> foo(cache.category_names_containing_package(PackageNamePart("foo")));
TEST_CHECK(cache.usable());
- TEST_CHECK(foo);
+ TEST_CHECK(bool(foo));
TEST_CHECK_EQUAL(join(foo->begin(), foo->end(), " "), "bar baz");
std::shared_ptr<const CategoryNamePartSet> moo(cache.category_names_containing_package(PackageNamePart("moo")));
TEST_CHECK(cache.usable());
- TEST_CHECK(moo);
+ TEST_CHECK(bool(moo));
TEST_CHECK(moo->empty());
}
} test_names_cache_good;
@@ -183,12 +183,12 @@ namespace test_cases
std::shared_ptr<const CategoryNamePartSet> foo(cache.category_names_containing_package(PackageNamePart("foo")));
TEST_CHECK(cache.usable());
- TEST_CHECK(foo);
+ TEST_CHECK(bool(foo));
TEST_CHECK_EQUAL(join(foo->begin(), foo->end(), " "), "bar baz");
std::shared_ptr<const CategoryNamePartSet> moo(cache.category_names_containing_package(PackageNamePart("moo")));
TEST_CHECK(cache.usable());
- TEST_CHECK(moo);
+ TEST_CHECK(bool(moo));
TEST_CHECK(moo->empty());
}
} test_names_cache_generate;
diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc
index 0ecd82c..e3d130d 100644
--- a/paludis/resolver/decider.cc
+++ b/paludis/resolver/decider.cc
@@ -1988,7 +1988,7 @@ Decider::_already_met(const SanitisedDependency & dep) const
MatchPackageOptions()) |
filter::InstalledAtRoot(FSEntry("/")))]);
if (installed_ids->empty())
- return dep.spec().if_block();
+ return bool(dep.spec().if_block());
else
{
if (dep.spec().if_block())
diff --git a/paludis/resolver/resolver_TEST_blockers.cc b/paludis/resolver/resolver_TEST_blockers.cc
index f58ab04..f155b90 100644
--- a/paludis/resolver/resolver_TEST_blockers.cc
+++ b/paludis/resolver/resolver_TEST_blockers.cc
@@ -389,9 +389,9 @@ namespace test_cases
.finished());
}
- TEST_CHECK(checks);
- TEST_CHECK(u_checks);
- TEST_CHECK(o_checks);
+ TEST_CHECK(bool(checks));
+ TEST_CHECK(bool(u_checks));
+ TEST_CHECK(bool(o_checks));
check_resolved(resolved,
n::taken_change_or_remove_decisions() = checks,
diff --git a/paludis/user_dep_spec_TEST.cc b/paludis/user_dep_spec_TEST.cc
index df32627..91e0acd 100644
--- a/paludis/user_dep_spec_TEST.cc
+++ b/paludis/user_dep_spec_TEST.cc
@@ -72,7 +72,7 @@ namespace
TEST_CHECK(! spec.package_ptr());
else
{
- TEST_CHECK(spec.package_ptr());
+ TEST_CHECK(bool(spec.package_ptr()));
TEST_CHECK_STRINGIFY_EQUAL(*spec.package_ptr(), package);
}
@@ -80,7 +80,7 @@ namespace
TEST_CHECK(! spec.category_name_part_ptr());
else
{
- TEST_CHECK(spec.category_name_part_ptr());
+ TEST_CHECK(bool(spec.category_name_part_ptr()));
TEST_CHECK_STRINGIFY_EQUAL(*spec.category_name_part_ptr(), category_name_part);
}
@@ -88,7 +88,7 @@ namespace
TEST_CHECK(! spec.package_name_part_ptr());
else
{
- TEST_CHECK(spec.package_name_part_ptr());
+ TEST_CHECK(bool(spec.package_name_part_ptr()));
TEST_CHECK_STRINGIFY_EQUAL(*spec.package_name_part_ptr(), package_name_part);
}
@@ -99,7 +99,7 @@ namespace
TEST_CHECK((! spec.version_requirements_ptr()) || spec.version_requirements_ptr()->empty());
else
{
- TEST_CHECK(spec.version_requirements_ptr());
+ TEST_CHECK(bool(spec.version_requirements_ptr()));
TEST_CHECK_STRINGIFY_EQUAL(join(spec.version_requirements_ptr()->begin(),
spec.version_requirements_ptr()->end(), ", ", &dump_version_requirement),
version_requirements);
@@ -109,7 +109,7 @@ namespace
TEST_CHECK(! spec.slot_requirement_ptr());
else
{
- TEST_CHECK(spec.slot_requirement_ptr());
+ TEST_CHECK(bool(spec.slot_requirement_ptr()));
TEST_CHECK_STRINGIFY_EQUAL(*spec.slot_requirement_ptr(), slot_requirement);
}
@@ -117,7 +117,7 @@ namespace
TEST_CHECK(! spec.from_repository_ptr());
else
{
- TEST_CHECK(spec.from_repository_ptr());
+ TEST_CHECK(bool(spec.from_repository_ptr()));
TEST_CHECK_STRINGIFY_EQUAL(*spec.from_repository_ptr(), from_repository);
}
@@ -125,7 +125,7 @@ namespace
TEST_CHECK(! spec.in_repository_ptr());
else
{
- TEST_CHECK(spec.in_repository_ptr());
+ TEST_CHECK(bool(spec.in_repository_ptr()));
TEST_CHECK_STRINGIFY_EQUAL(*spec.in_repository_ptr(), in_repository);
}
@@ -133,7 +133,7 @@ namespace
TEST_CHECK((! spec.additional_requirements_ptr()) || spec.additional_requirements_ptr()->empty());
else
{
- TEST_CHECK(spec.additional_requirements_ptr());
+ TEST_CHECK(bool(spec.additional_requirements_ptr()));
TEST_CHECK_STRINGIFY_EQUAL(join(indirect_iterator(spec.additional_requirements_ptr()->begin()),
indirect_iterator(spec.additional_requirements_ptr()->end()), ", "),
additional_requirement);
@@ -143,7 +143,7 @@ namespace
TEST_CHECK(! spec.installed_at_path_ptr());
else
{
- TEST_CHECK(spec.installed_at_path_ptr());
+ TEST_CHECK(bool(spec.installed_at_path_ptr()));
TEST_CHECK_STRINGIFY_EQUAL(*spec.installed_at_path_ptr(),
installed_at_path);
}
@@ -152,7 +152,7 @@ namespace
TEST_CHECK(! spec.installable_to_path_ptr());
else
{
- TEST_CHECK(spec.installable_to_path_ptr());
+ TEST_CHECK(bool(spec.installable_to_path_ptr()));
TEST_CHECK_STRINGIFY_EQUAL(spec.installable_to_path_ptr()->path(), installable_to_path_f);
TEST_CHECK_EQUAL(spec.installable_to_path_ptr()->include_masked(), installable_to_path_s);
}
diff --git a/ruby/dep_spec.cc b/ruby/dep_spec.cc
index 668f5b7..689954d 100644
--- a/ruby/dep_spec.cc
+++ b/ruby/dep_spec.cc
@@ -573,7 +573,7 @@ namespace
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- if (0 == std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->tag())
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->tag()))
return Qnil;
return dep_tag_to_value(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->tag());
}
@@ -604,7 +604,7 @@ namespace
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- if (0 == std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->package_ptr())
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->package_ptr()))
return Qnil;
return qualified_package_name_to_value(*std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->package_ptr());
}
@@ -620,7 +620,7 @@ namespace
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- if (0 == std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->package_name_part_ptr())
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->package_name_part_ptr()))
return Qnil;
return rb_str_new2(stringify(*std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->
package_name_part_ptr()).c_str());
@@ -637,7 +637,7 @@ namespace
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- if (0 == std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->category_name_part_ptr())
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->category_name_part_ptr()))
return Qnil;
return rb_str_new2(stringify(*std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->
category_name_part_ptr()).c_str());
@@ -769,7 +769,7 @@ namespace
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- if (0 == std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->slot_requirement_ptr())
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->slot_requirement_ptr()))
return Qnil;
return slot_requirement_to_value(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->slot_requirement_ptr());
}
@@ -785,7 +785,7 @@ namespace
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- if (0 == std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->in_repository_ptr())
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->in_repository_ptr()))
return Qnil;
return rb_str_new2(stringify((*std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->in_repository_ptr())).c_str());
}
@@ -801,7 +801,7 @@ namespace
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- if (0 == std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->from_repository_ptr())
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->from_repository_ptr()))
return Qnil;
return rb_str_new2(stringify((*std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->from_repository_ptr())).c_str());
}
@@ -839,7 +839,7 @@ namespace
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- if (0 == std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installed_at_path_ptr())
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installed_at_path_ptr()))
return Qnil;
return rb_str_new2(stringify((*std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installed_at_path_ptr())).c_str());
}
diff --git a/ruby/repository.cc b/ruby/repository.cc
index 440df5a..ff5d090 100644
--- a/ruby/repository.cc
+++ b/ruby/repository.cc
@@ -701,7 +701,7 @@ VALUE repo_to_value(T_ m, VALUE * klass)
VALUE
paludis::ruby::repository_to_value(std::shared_ptr<Repository> m)
{
- if (0 == m)
+ if (! m)
return Qnil;
else
return repo_to_value<std::shared_ptr<Repository> >(m, &c_repository);
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index 0beaabc..608f0cb 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -715,7 +715,7 @@ namespace
bool visit(const ExistingNoChangeDecision & decision) const
{
if (ignore_dep_from(env, resolution_options, no_blockers_from, no_dependencies_from,
- decision.existing_id(), dep.spec().if_block()))
+ decision.existing_id(), bool(dep.spec().if_block())))
return false;
if (! is_enabled_dep(dep))
@@ -770,7 +770,7 @@ namespace
bool visit(const ChangesToMakeDecision & decision) const
{
if (ignore_dep_from(env, resolution_options, no_blockers_from,
- no_dependencies_from, decision.origin_id(), dep.spec().if_block()))
+ no_dependencies_from, decision.origin_id(), bool(dep.spec().if_block())))
return false;
if (is_enabled_dep(dep))