aboutsummaryrefslogtreecommitdiff
path: root/paludis/elike_use_requirement_TEST.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/elike_use_requirement_TEST.cc')
-rw-r--r--paludis/elike_use_requirement_TEST.cc262
1 files changed, 128 insertions, 134 deletions
diff --git a/paludis/elike_use_requirement_TEST.cc b/paludis/elike_use_requirement_TEST.cc
index 1eb117c78..c3d32bbc3 100644
--- a/paludis/elike_use_requirement_TEST.cc
+++ b/paludis/elike_use_requirement_TEST.cc
@@ -72,25 +72,25 @@ namespace test_cases
set_conditionals(id, "enabled disabled");
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req1(
- parse_elike_use_requirement("enabled", std::shared_ptr<const PackageID>(), { euro_strict_parsing }));
+ parse_elike_use_requirement("enabled", { euro_strict_parsing }));
TEST_CHECK_EQUAL(req1->as_raw_string(), "[enabled]");
TEST_CHECK_EQUAL(req1->as_human_string(make_null_shared_ptr()), "Flag 'enabled' enabled");
TEST_CHECK(req1->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req2(
- parse_elike_use_requirement("disabled", std::shared_ptr<const PackageID>(), { euro_strict_parsing }));
+ parse_elike_use_requirement("disabled", { euro_strict_parsing }));
TEST_CHECK_EQUAL(req2->as_raw_string(), "[disabled]");
TEST_CHECK_EQUAL(req2->as_human_string(make_null_shared_ptr()), "Flag 'disabled' enabled");
TEST_CHECK(! req2->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req3(
- parse_elike_use_requirement("-enabled", std::shared_ptr<const PackageID>(), { euro_strict_parsing }));
+ parse_elike_use_requirement("-enabled", { euro_strict_parsing }));
TEST_CHECK_EQUAL(req3->as_raw_string(), "[-enabled]");
TEST_CHECK_EQUAL(req3->as_human_string(make_null_shared_ptr()), "Flag 'enabled' disabled");
TEST_CHECK(! req3->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req4(
- parse_elike_use_requirement("-disabled", std::shared_ptr<const PackageID>(), { euro_strict_parsing }));
+ parse_elike_use_requirement("-disabled", { euro_strict_parsing }));
TEST_CHECK_EQUAL(req4->as_raw_string(), "[-disabled]");
TEST_CHECK_EQUAL(req4->as_human_string(make_null_shared_ptr()), "Flag 'disabled' disabled");
TEST_CHECK(req4->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first);
@@ -113,25 +113,25 @@ namespace test_cases
set_conditionals(id, "enabled disabled");
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req1(
- parse_elike_use_requirement("enabled", std::shared_ptr<const PackageID>(), { euro_portage_syntax, euro_strict_parsing }));
+ parse_elike_use_requirement("enabled", { euro_portage_syntax, euro_strict_parsing }));
TEST_CHECK_EQUAL(req1->as_raw_string(), "[enabled]");
TEST_CHECK_EQUAL(req1->as_human_string(make_null_shared_ptr()), "Flag 'enabled' enabled");
TEST_CHECK(req1->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req2(
- parse_elike_use_requirement("disabled", std::shared_ptr<const PackageID>(), { euro_portage_syntax, euro_strict_parsing }));
+ parse_elike_use_requirement("disabled", { euro_portage_syntax, euro_strict_parsing }));
TEST_CHECK_EQUAL(req2->as_raw_string(), "[disabled]");
TEST_CHECK_EQUAL(req2->as_human_string(make_null_shared_ptr()), "Flag 'disabled' enabled");
TEST_CHECK(! req2->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req3(
- parse_elike_use_requirement("-enabled", std::shared_ptr<const PackageID>(), { euro_portage_syntax, euro_strict_parsing }));
+ parse_elike_use_requirement("-enabled", { euro_portage_syntax, euro_strict_parsing }));
TEST_CHECK_EQUAL(req3->as_raw_string(), "[-enabled]");
TEST_CHECK_EQUAL(req3->as_human_string(make_null_shared_ptr()), "Flag 'enabled' disabled");
TEST_CHECK(! req3->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req4(
- parse_elike_use_requirement("-disabled", std::shared_ptr<const PackageID>(), { euro_portage_syntax, euro_strict_parsing }));
+ parse_elike_use_requirement("-disabled", { euro_portage_syntax, euro_strict_parsing }));
TEST_CHECK_EQUAL(req4->as_raw_string(), "[-disabled]");
TEST_CHECK_EQUAL(req4->as_human_string(make_null_shared_ptr()), "Flag 'disabled' disabled");
TEST_CHECK(req4->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first);
@@ -154,31 +154,31 @@ namespace test_cases
set_conditionals(id, "enabled disabled");
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req1(
- parse_elike_use_requirement("enabled,-disabled", std::shared_ptr<const PackageID>(), { euro_portage_syntax, euro_strict_parsing }));
+ parse_elike_use_requirement("enabled,-disabled", { euro_portage_syntax, euro_strict_parsing }));
TEST_CHECK_EQUAL(req1->as_raw_string(), "[enabled,-disabled]");
TEST_CHECK_EQUAL(req1->as_human_string(make_null_shared_ptr()), "Flag 'enabled' enabled; Flag 'disabled' disabled");
TEST_CHECK(req1->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req2(
- parse_elike_use_requirement("enabled,disabled", std::shared_ptr<const PackageID>(), { euro_portage_syntax, euro_strict_parsing }));
+ parse_elike_use_requirement("enabled,disabled", { euro_portage_syntax, euro_strict_parsing }));
TEST_CHECK_EQUAL(req2->as_raw_string(), "[enabled,disabled]");
TEST_CHECK_EQUAL(req2->as_human_string(make_null_shared_ptr()), "Flag 'enabled' enabled; Flag 'disabled' enabled");
TEST_CHECK(! req2->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req3(
- parse_elike_use_requirement("-enabled,-disabled", std::shared_ptr<const PackageID>(), { euro_portage_syntax, euro_strict_parsing }));
+ parse_elike_use_requirement("-enabled,-disabled", { euro_portage_syntax, euro_strict_parsing }));
TEST_CHECK_EQUAL(req3->as_raw_string(), "[-enabled,-disabled]");
TEST_CHECK_EQUAL(req3->as_human_string(make_null_shared_ptr()), "Flag 'enabled' disabled; Flag 'disabled' disabled");
TEST_CHECK(! req3->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req4(
- parse_elike_use_requirement("enabled,-disabled,-enabled", std::shared_ptr<const PackageID>(), { euro_portage_syntax, euro_strict_parsing }));
+ parse_elike_use_requirement("enabled,-disabled,-enabled", { euro_portage_syntax, euro_strict_parsing }));
TEST_CHECK_EQUAL(req4->as_raw_string(), "[enabled,-disabled,-enabled]");
TEST_CHECK_EQUAL(req4->as_human_string(make_null_shared_ptr()), "Flag 'enabled' enabled; Flag 'disabled' disabled; Flag 'enabled' disabled");
TEST_CHECK(! req4->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req5(
- parse_elike_use_requirement("enabled,-disabled,enabled", std::shared_ptr<const PackageID>(), { euro_portage_syntax, euro_strict_parsing }));
+ parse_elike_use_requirement("enabled,-disabled,enabled", { euro_portage_syntax, euro_strict_parsing }));
TEST_CHECK_EQUAL(req5->as_raw_string(), "[enabled,-disabled,enabled]");
TEST_CHECK_EQUAL(req5->as_human_string(make_null_shared_ptr()), "Flag 'enabled' enabled; Flag 'disabled' disabled; Flag 'enabled' enabled");
TEST_CHECK(req5->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first);
@@ -203,84 +203,84 @@ namespace test_cases
set_conditionals(id2, "pkgname");
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req1(
- parse_elike_use_requirement("pkgname?", id, { euro_allow_self_deps, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname?", { euro_allow_self_deps, euro_strict_parsing }));
TEST_CHECK_EQUAL(req1->as_raw_string(), "[pkgname?]");
TEST_CHECK_EQUAL(req1->as_human_string(id), "Flag 'pkgname' enabled if it is enabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(req1->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(! req1->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req2(
- parse_elike_use_requirement("pkgname?", id2, { euro_allow_self_deps, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname?", { euro_allow_self_deps, euro_strict_parsing }));
TEST_CHECK_EQUAL(req2->as_raw_string(), "[pkgname?]");
TEST_CHECK_EQUAL(req2->as_human_string(id2), "Flag 'pkgname' enabled if it is enabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(req2->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req2->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req3(
- parse_elike_use_requirement("-pkgname?", id, { euro_allow_self_deps, euro_strict_parsing }));
+ parse_elike_use_requirement("-pkgname?", { euro_allow_self_deps, euro_strict_parsing }));
TEST_CHECK_EQUAL(req3->as_raw_string(), "[-pkgname?]");
TEST_CHECK_EQUAL(req3->as_human_string(id), "Flag 'pkgname' disabled if it is enabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(! req3->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req3->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req4(
- parse_elike_use_requirement("-pkgname?", id2, { euro_allow_self_deps, euro_strict_parsing }));
+ parse_elike_use_requirement("-pkgname?", { euro_allow_self_deps, euro_strict_parsing }));
TEST_CHECK_EQUAL(req4->as_raw_string(), "[-pkgname?]");
TEST_CHECK_EQUAL(req4->as_human_string(id2), "Flag 'pkgname' disabled if it is enabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(req4->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req4->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req5(
- parse_elike_use_requirement("pkgname!?", id, { euro_allow_self_deps, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname!?", { euro_allow_self_deps, euro_strict_parsing }));
TEST_CHECK_EQUAL(req5->as_raw_string(), "[pkgname!?]");
TEST_CHECK_EQUAL(req5->as_human_string(id), "Flag 'pkgname' enabled if it is disabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(req5->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req5->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req6(
- parse_elike_use_requirement("pkgname!?", id2, { euro_allow_self_deps, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname!?", { euro_allow_self_deps, euro_strict_parsing }));
TEST_CHECK_EQUAL(req6->as_raw_string(), "[pkgname!?]");
TEST_CHECK_EQUAL(req6->as_human_string(id2), "Flag 'pkgname' enabled if it is disabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(req6->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(! req6->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req7(
- parse_elike_use_requirement("-pkgname!?", id, { euro_allow_self_deps, euro_strict_parsing }));
+ parse_elike_use_requirement("-pkgname!?", { euro_allow_self_deps, euro_strict_parsing }));
TEST_CHECK_EQUAL(req7->as_raw_string(), "[-pkgname!?]");
TEST_CHECK_EQUAL(req7->as_human_string(id), "Flag 'pkgname' disabled if it is disabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(req7->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req7->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req8(
- parse_elike_use_requirement("-pkgname!?", id2, { euro_allow_self_deps, euro_strict_parsing }));
+ parse_elike_use_requirement("-pkgname!?", { euro_allow_self_deps, euro_strict_parsing }));
TEST_CHECK_EQUAL(req8->as_raw_string(), "[-pkgname!?]");
TEST_CHECK_EQUAL(req8->as_human_string(id2), "Flag 'pkgname' disabled if it is disabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(! req8->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req8->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req9(
- parse_elike_use_requirement("pkgname=", id, { euro_allow_self_deps, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname=", { euro_allow_self_deps, euro_strict_parsing }));
TEST_CHECK_EQUAL(req9->as_raw_string(), "[pkgname=]");
TEST_CHECK_EQUAL(req9->as_human_string(id), "Flag 'pkgname' enabled or disabled like it is for 'cat/enabled-1:0::fake'");
TEST_CHECK(req9->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(! req9->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req10(
- parse_elike_use_requirement("pkgname=", id2, { euro_allow_self_deps, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname=", { euro_allow_self_deps, euro_strict_parsing }));
TEST_CHECK_EQUAL(req10->as_raw_string(), "[pkgname=]");
TEST_CHECK_EQUAL(req10->as_human_string(id2), "Flag 'pkgname' enabled or disabled like it is for 'cat/disabled-1:0::fake'");
TEST_CHECK(! req10->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req10->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req11(
- parse_elike_use_requirement("pkgname!=", id, { euro_allow_self_deps, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname!=", { euro_allow_self_deps, euro_strict_parsing }));
TEST_CHECK_EQUAL(req11->as_raw_string(), "[pkgname!=]");
TEST_CHECK_EQUAL(req11->as_human_string(id), "Flag 'pkgname' enabled or disabled opposite to how it is for 'cat/enabled-1:0::fake'");
TEST_CHECK(! req11->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req11->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req12(
- parse_elike_use_requirement("pkgname!=", id2, { euro_allow_self_deps, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname!=", { euro_allow_self_deps, euro_strict_parsing }));
TEST_CHECK_EQUAL(req12->as_raw_string(), "[pkgname!=]");
TEST_CHECK_EQUAL(req12->as_human_string(id2), "Flag 'pkgname' enabled or disabled opposite to how it is for 'cat/disabled-1:0::fake'");
TEST_CHECK(req12->requirement_met(&env, 0, id, id2, 0).first);
@@ -306,56 +306,56 @@ namespace test_cases
set_conditionals(id2, "pkgname");
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req1(
- parse_elike_use_requirement("pkgname?", id, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname?", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }));
TEST_CHECK_EQUAL(req1->as_raw_string(), "[pkgname?]");
TEST_CHECK_EQUAL(req1->as_human_string(id), "Flag 'pkgname' enabled if it is enabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(req1->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(! req1->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req2(
- parse_elike_use_requirement("pkgname?", id2, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname?", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }));
TEST_CHECK_EQUAL(req2->as_raw_string(), "[pkgname?]");
TEST_CHECK_EQUAL(req2->as_human_string(id2), "Flag 'pkgname' enabled if it is enabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(req2->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req2->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req7(
- parse_elike_use_requirement("!pkgname?", id, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }));
+ parse_elike_use_requirement("!pkgname?", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }));
TEST_CHECK_EQUAL(req7->as_raw_string(), "[!pkgname?]");
TEST_CHECK_EQUAL(req7->as_human_string(id), "Flag 'pkgname' disabled if it is disabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(req7->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req7->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req8(
- parse_elike_use_requirement("!pkgname?", id2, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }));
+ parse_elike_use_requirement("!pkgname?", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }));
TEST_CHECK_EQUAL(req8->as_raw_string(), "[!pkgname?]");
TEST_CHECK_EQUAL(req8->as_human_string(id2), "Flag 'pkgname' disabled if it is disabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(! req8->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req8->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req9(
- parse_elike_use_requirement("pkgname=", id, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname=", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }));
TEST_CHECK_EQUAL(req9->as_raw_string(), "[pkgname=]");
TEST_CHECK_EQUAL(req9->as_human_string(id), "Flag 'pkgname' enabled or disabled like it is for 'cat/enabled-1:0::fake'");
TEST_CHECK(req9->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(! req9->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req10(
- parse_elike_use_requirement("pkgname=", id2, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname=", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }));
TEST_CHECK_EQUAL(req10->as_raw_string(), "[pkgname=]");
TEST_CHECK_EQUAL(req10->as_human_string(id2), "Flag 'pkgname' enabled or disabled like it is for 'cat/disabled-1:0::fake'");
TEST_CHECK(! req10->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req10->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req11(
- parse_elike_use_requirement("!pkgname=", id, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }));
+ parse_elike_use_requirement("!pkgname=", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }));
TEST_CHECK_EQUAL(req11->as_raw_string(), "[!pkgname=]");
TEST_CHECK_EQUAL(req11->as_human_string(id), "Flag 'pkgname' enabled or disabled opposite to how it is for 'cat/enabled-1:0::fake'");
TEST_CHECK(! req11->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req11->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req12(
- parse_elike_use_requirement("!pkgname=", id2, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }));
+ parse_elike_use_requirement("!pkgname=", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }));
TEST_CHECK_EQUAL(req12->as_raw_string(), "[!pkgname=]");
TEST_CHECK_EQUAL(req12->as_human_string(id2), "Flag 'pkgname' enabled or disabled opposite to how it is for 'cat/disabled-1:0::fake'");
TEST_CHECK(req12->requirement_met(&env, 0, id, id2, 0).first);
@@ -381,112 +381,112 @@ namespace test_cases
set_conditionals(id2, "pkgname");
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req1(
- parse_elike_use_requirement("pkgname?", id, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname?", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
TEST_CHECK_EQUAL(req1->as_raw_string(), "[pkgname?]");
TEST_CHECK_EQUAL(req1->as_human_string(id), "Flag 'pkgname' enabled if it is enabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(req1->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(! req1->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req2(
- parse_elike_use_requirement("pkgname?", id2, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname?", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
TEST_CHECK_EQUAL(req2->as_raw_string(), "[pkgname?]");
TEST_CHECK_EQUAL(req2->as_human_string(id2), "Flag 'pkgname' enabled if it is enabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(req2->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req2->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req7(
- parse_elike_use_requirement("!pkgname?", id, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
+ parse_elike_use_requirement("!pkgname?", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
TEST_CHECK_EQUAL(req7->as_raw_string(), "[!pkgname?]");
TEST_CHECK_EQUAL(req7->as_human_string(id), "Flag 'pkgname' disabled if it is disabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(req7->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req7->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req8(
- parse_elike_use_requirement("!pkgname?", id2, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
+ parse_elike_use_requirement("!pkgname?", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
TEST_CHECK_EQUAL(req8->as_raw_string(), "[!pkgname?]");
TEST_CHECK_EQUAL(req8->as_human_string(id2), "Flag 'pkgname' disabled if it is disabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(! req8->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req8->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req9(
- parse_elike_use_requirement("pkgname=", id, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname=", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
TEST_CHECK_EQUAL(req9->as_raw_string(), "[pkgname=]");
TEST_CHECK_EQUAL(req9->as_human_string(id), "Flag 'pkgname' enabled or disabled like it is for 'cat/enabled-1:0::fake'");
TEST_CHECK(req9->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(! req9->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req10(
- parse_elike_use_requirement("pkgname=", id2, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname=", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
TEST_CHECK_EQUAL(req10->as_raw_string(), "[pkgname=]");
TEST_CHECK_EQUAL(req10->as_human_string(id2), "Flag 'pkgname' enabled or disabled like it is for 'cat/disabled-1:0::fake'");
TEST_CHECK(! req10->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req10->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req11(
- parse_elike_use_requirement("!pkgname=", id, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
+ parse_elike_use_requirement("!pkgname=", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
TEST_CHECK_EQUAL(req11->as_raw_string(), "[!pkgname=]");
TEST_CHECK_EQUAL(req11->as_human_string(id), "Flag 'pkgname' enabled or disabled opposite to how it is for 'cat/enabled-1:0::fake'");
TEST_CHECK(! req11->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req11->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req12(
- parse_elike_use_requirement("!pkgname=", id2, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
+ parse_elike_use_requirement("!pkgname=", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
TEST_CHECK_EQUAL(req12->as_raw_string(), "[!pkgname=]");
TEST_CHECK_EQUAL(req12->as_human_string(id2), "Flag 'pkgname' enabled or disabled opposite to how it is for 'cat/disabled-1:0::fake'");
TEST_CHECK(req12->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(! req12->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req13(
- parse_elike_use_requirement("-pkgname?", id, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
+ parse_elike_use_requirement("-pkgname?", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
TEST_CHECK_EQUAL(req13->as_raw_string(), "[-pkgname?]");
TEST_CHECK_EQUAL(req13->as_human_string(id), "Flag 'pkgname' disabled if it is enabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(! req13->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req13->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req14(
- parse_elike_use_requirement("-pkgname?", id2, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
+ parse_elike_use_requirement("-pkgname?", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
TEST_CHECK_EQUAL(req14->as_raw_string(), "[-pkgname?]");
TEST_CHECK_EQUAL(req14->as_human_string(id2), "Flag 'pkgname' disabled if it is enabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(req14->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req14->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req15(
- parse_elike_use_requirement("pkgname!?", id, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname!?", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
TEST_CHECK_EQUAL(req15->as_raw_string(), "[pkgname!?]");
TEST_CHECK_EQUAL(req15->as_human_string(id), "Flag 'pkgname' enabled if it is disabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(req15->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req15->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req16(
- parse_elike_use_requirement("pkgname!?", id2, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname!?", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
TEST_CHECK_EQUAL(req16->as_raw_string(), "[pkgname!?]");
TEST_CHECK_EQUAL(req16->as_human_string(id2), "Flag 'pkgname' enabled if it is disabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(req16->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(! req16->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req17(
- parse_elike_use_requirement("-pkgname!?", id, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
+ parse_elike_use_requirement("-pkgname!?", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
TEST_CHECK_EQUAL(req17->as_raw_string(), "[-pkgname!?]");
TEST_CHECK_EQUAL(req17->as_human_string(id), "Flag 'pkgname' disabled if it is disabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(req17->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req17->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req18(
- parse_elike_use_requirement("-pkgname!?", id2, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
+ parse_elike_use_requirement("-pkgname!?", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
TEST_CHECK_EQUAL(req18->as_raw_string(), "[-pkgname!?]");
TEST_CHECK_EQUAL(req18->as_human_string(id2), "Flag 'pkgname' disabled if it is disabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(! req18->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req18->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req19(
- parse_elike_use_requirement("pkgname!=", id, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname!=", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
TEST_CHECK_EQUAL(req19->as_raw_string(), "[pkgname!=]");
TEST_CHECK_EQUAL(req19->as_human_string(id), "Flag 'pkgname' enabled or disabled opposite to how it is for 'cat/enabled-1:0::fake'");
TEST_CHECK(! req19->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req19->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req20(
- parse_elike_use_requirement("pkgname!=", id2, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
+ parse_elike_use_requirement("pkgname!=", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }));
TEST_CHECK_EQUAL(req20->as_raw_string(), "[pkgname!=]");
TEST_CHECK_EQUAL(req20->as_human_string(id2), "Flag 'pkgname' enabled or disabled opposite to how it is for 'cat/disabled-1:0::fake'");
TEST_CHECK(req20->requirement_met(&env, 0, id, id2, 0).first);
@@ -509,18 +509,18 @@ namespace test_cases
std::shared_ptr<FakePackageID> id(fake->add_version("cat", "enabled", "1"));
set_conditionals(id, "pkgname");
- TEST_CHECK_THROWS(parse_elike_use_requirement("", id, { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("-", id, { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("?", id, { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("-?", id, { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("!?", id, { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("-!?", id, { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("=", id, { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("!=", id, { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
-
- TEST_CHECK_THROWS(parse_elike_use_requirement("!test?", id, { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("!test=", id, { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("test1,test2", id, { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("", { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("-", { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("?", { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("-?", { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("!?", { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("-!?", { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("=", { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("!=", { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
+
+ TEST_CHECK_THROWS(parse_elike_use_requirement("!test?", { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("!test=", { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("test1,test2", { euro_allow_self_deps, euro_strict_parsing }), ELikeUseRequirementError);
}
} test_malformed_use_requirements;
@@ -539,22 +539,22 @@ namespace test_cases
std::shared_ptr<FakePackageID> id(fake->add_version("cat", "enabled", "1"));
set_conditionals(id, "pkgname");
- TEST_CHECK_THROWS(parse_elike_use_requirement("", id, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("-", id, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("?", id, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("!?", id, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("=", id, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("!=", id, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
-
- TEST_CHECK_THROWS(parse_elike_use_requirement(",", id, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("test,", id, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement(",test", id, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("test,,test", id, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
-
- TEST_CHECK_THROWS(parse_elike_use_requirement("test!?", id, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("-test?", id, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("-test!?", id, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("test!=", id, { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("-", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("?", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("!?", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("=", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("!=", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
+
+ TEST_CHECK_THROWS(parse_elike_use_requirement(",", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("test,", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement(",test", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("test,,test", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
+
+ TEST_CHECK_THROWS(parse_elike_use_requirement("test!?", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("-test?", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("-test!?", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("test!=", { euro_allow_self_deps, euro_portage_syntax, euro_strict_parsing }), ELikeUseRequirementError);
}
} test_malformed_use_requirements_portage_syntax;
@@ -573,17 +573,17 @@ namespace test_cases
std::shared_ptr<FakePackageID> id(fake->add_version("cat", "enabled", "1"));
set_conditionals(id, "pkgname");
- TEST_CHECK_THROWS(parse_elike_use_requirement("", id, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("-", id, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("?", id, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("!?", id, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("=", id, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("!=", id, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
-
- TEST_CHECK_THROWS(parse_elike_use_requirement(",", id, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("test,", id, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement(",test", id, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
- TEST_CHECK_THROWS(parse_elike_use_requirement("test,,test", id, { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("-", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("?", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("!?", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("=", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("!=", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
+
+ TEST_CHECK_THROWS(parse_elike_use_requirement(",", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("test,", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement(",test", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
+ TEST_CHECK_THROWS(parse_elike_use_requirement("test,,test", { euro_allow_self_deps, euro_both_syntaxes, euro_strict_parsing }), ELikeUseRequirementError);
}
} test_malformed_use_requirements_both_syntaxes;
@@ -605,112 +605,112 @@ namespace test_cases
set_conditionals(id2, "pkgname");
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req1(
- parse_elike_use_requirement("pkgname?", id, { euro_allow_self_deps }));
+ parse_elike_use_requirement("pkgname?", { euro_allow_self_deps }));
TEST_CHECK_EQUAL(req1->as_raw_string(), "[pkgname?]");
TEST_CHECK_EQUAL(req1->as_human_string(id), "Flag 'pkgname' enabled if it is enabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(req1->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(! req1->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req2(
- parse_elike_use_requirement("pkgname?", id2, { euro_allow_self_deps }));
+ parse_elike_use_requirement("pkgname?", { euro_allow_self_deps }));
TEST_CHECK_EQUAL(req2->as_raw_string(), "[pkgname?]");
TEST_CHECK_EQUAL(req2->as_human_string(id2), "Flag 'pkgname' enabled if it is enabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(req2->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req2->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req7(
- parse_elike_use_requirement("!pkgname?", id, { euro_allow_self_deps }));
+ parse_elike_use_requirement("!pkgname?", { euro_allow_self_deps }));
TEST_CHECK_EQUAL(req7->as_raw_string(), "[!pkgname?]");
TEST_CHECK_EQUAL(req7->as_human_string(id), "Flag 'pkgname' disabled if it is disabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(req7->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req7->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req8(
- parse_elike_use_requirement("!pkgname?", id2, { euro_allow_self_deps }));
+ parse_elike_use_requirement("!pkgname?", { euro_allow_self_deps }));
TEST_CHECK_EQUAL(req8->as_raw_string(), "[!pkgname?]");
TEST_CHECK_EQUAL(req8->as_human_string(id2), "Flag 'pkgname' disabled if it is disabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(! req8->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req8->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req9(
- parse_elike_use_requirement("pkgname=", id, { euro_allow_self_deps }));
+ parse_elike_use_requirement("pkgname=", { euro_allow_self_deps }));
TEST_CHECK_EQUAL(req9->as_raw_string(), "[pkgname=]");
TEST_CHECK_EQUAL(req9->as_human_string(id), "Flag 'pkgname' enabled or disabled like it is for 'cat/enabled-1:0::fake'");
TEST_CHECK(req9->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(! req9->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req10(
- parse_elike_use_requirement("pkgname=", id2, { euro_allow_self_deps }));
+ parse_elike_use_requirement("pkgname=", { euro_allow_self_deps }));
TEST_CHECK_EQUAL(req10->as_raw_string(), "[pkgname=]");
TEST_CHECK_EQUAL(req10->as_human_string(id2), "Flag 'pkgname' enabled or disabled like it is for 'cat/disabled-1:0::fake'");
TEST_CHECK(! req10->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req10->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req11(
- parse_elike_use_requirement("!pkgname=", id, { euro_allow_self_deps }));
+ parse_elike_use_requirement("!pkgname=", { euro_allow_self_deps }));
TEST_CHECK_EQUAL(req11->as_raw_string(), "[!pkgname=]");
TEST_CHECK_EQUAL(req11->as_human_string(id), "Flag 'pkgname' enabled or disabled opposite to how it is for 'cat/enabled-1:0::fake'");
TEST_CHECK(! req11->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req11->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req12(
- parse_elike_use_requirement("!pkgname=", id2, { euro_allow_self_deps }));
+ parse_elike_use_requirement("!pkgname=", { euro_allow_self_deps }));
TEST_CHECK_EQUAL(req12->as_raw_string(), "[!pkgname=]");
TEST_CHECK_EQUAL(req12->as_human_string(id2), "Flag 'pkgname' enabled or disabled opposite to how it is for 'cat/disabled-1:0::fake'");
TEST_CHECK(req12->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(! req12->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req13(
- parse_elike_use_requirement("-pkgname?", id, { euro_allow_self_deps }));
+ parse_elike_use_requirement("-pkgname?", { euro_allow_self_deps }));
TEST_CHECK_EQUAL(req13->as_raw_string(), "[-pkgname?]");
TEST_CHECK_EQUAL(req13->as_human_string(id), "Flag 'pkgname' disabled if it is enabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(! req13->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req13->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req14(
- parse_elike_use_requirement("-pkgname?", id2, { euro_allow_self_deps }));
+ parse_elike_use_requirement("-pkgname?", { euro_allow_self_deps }));
TEST_CHECK_EQUAL(req14->as_raw_string(), "[-pkgname?]");
TEST_CHECK_EQUAL(req14->as_human_string(id2), "Flag 'pkgname' disabled if it is enabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(req14->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req14->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req15(
- parse_elike_use_requirement("pkgname!?", id, { euro_allow_self_deps }));
+ parse_elike_use_requirement("pkgname!?", { euro_allow_self_deps }));
TEST_CHECK_EQUAL(req15->as_raw_string(), "[pkgname!?]");
TEST_CHECK_EQUAL(req15->as_human_string(id), "Flag 'pkgname' enabled if it is disabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(req15->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req15->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req16(
- parse_elike_use_requirement("pkgname!?", id2, { euro_allow_self_deps }));
+ parse_elike_use_requirement("pkgname!?", { euro_allow_self_deps }));
TEST_CHECK_EQUAL(req16->as_raw_string(), "[pkgname!?]");
TEST_CHECK_EQUAL(req16->as_human_string(id2), "Flag 'pkgname' enabled if it is disabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(req16->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(! req16->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req17(
- parse_elike_use_requirement("-pkgname!?", id, { euro_allow_self_deps }));
+ parse_elike_use_requirement("-pkgname!?", { euro_allow_self_deps }));
TEST_CHECK_EQUAL(req17->as_raw_string(), "[-pkgname!?]");
TEST_CHECK_EQUAL(req17->as_human_string(id), "Flag 'pkgname' disabled if it is disabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(req17->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req17->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req18(
- parse_elike_use_requirement("-pkgname!?", id2, { euro_allow_self_deps }));
+ parse_elike_use_requirement("-pkgname!?", { euro_allow_self_deps }));
TEST_CHECK_EQUAL(req18->as_raw_string(), "[-pkgname!?]");
TEST_CHECK_EQUAL(req18->as_human_string(id2), "Flag 'pkgname' disabled if it is disabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(! req18->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req18->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req19(
- parse_elike_use_requirement("pkgname!=", id, { euro_allow_self_deps }));
+ parse_elike_use_requirement("pkgname!=", { euro_allow_self_deps }));
TEST_CHECK_EQUAL(req19->as_raw_string(), "[pkgname!=]");
TEST_CHECK_EQUAL(req19->as_human_string(id), "Flag 'pkgname' enabled or disabled opposite to how it is for 'cat/enabled-1:0::fake'");
TEST_CHECK(! req19->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req19->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req20(
- parse_elike_use_requirement("pkgname!=", id2, { euro_allow_self_deps }));
+ parse_elike_use_requirement("pkgname!=", { euro_allow_self_deps }));
TEST_CHECK_EQUAL(req20->as_raw_string(), "[pkgname!=]");
TEST_CHECK_EQUAL(req20->as_human_string(id2), "Flag 'pkgname' enabled or disabled opposite to how it is for 'cat/disabled-1:0::fake'");
TEST_CHECK(req20->requirement_met(&env, 0, id, id2, 0).first);
@@ -736,112 +736,112 @@ namespace test_cases
set_conditionals(id2, "pkgname");
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req1(
- parse_elike_use_requirement("pkgname?", id, { euro_allow_self_deps, euro_portage_syntax }));
+ parse_elike_use_requirement("pkgname?", { euro_allow_self_deps, euro_portage_syntax }));
TEST_CHECK_EQUAL(req1->as_raw_string(), "[pkgname?]");
TEST_CHECK_EQUAL(req1->as_human_string(id), "Flag 'pkgname' enabled if it is enabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(req1->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(! req1->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req2(
- parse_elike_use_requirement("pkgname?", id2, { euro_allow_self_deps, euro_portage_syntax }));
+ parse_elike_use_requirement("pkgname?", { euro_allow_self_deps, euro_portage_syntax }));
TEST_CHECK_EQUAL(req2->as_raw_string(), "[pkgname?]");
TEST_CHECK_EQUAL(req2->as_human_string(id2), "Flag 'pkgname' enabled if it is enabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(req2->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req2->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req7(
- parse_elike_use_requirement("!pkgname?", id, { euro_allow_self_deps, euro_portage_syntax }));
+ parse_elike_use_requirement("!pkgname?", { euro_allow_self_deps, euro_portage_syntax }));
TEST_CHECK_EQUAL(req7->as_raw_string(), "[!pkgname?]");
TEST_CHECK_EQUAL(req7->as_human_string(id), "Flag 'pkgname' disabled if it is disabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(req7->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req7->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req8(
- parse_elike_use_requirement("!pkgname?", id2, { euro_allow_self_deps, euro_portage_syntax }));
+ parse_elike_use_requirement("!pkgname?", { euro_allow_self_deps, euro_portage_syntax }));
TEST_CHECK_EQUAL(req8->as_raw_string(), "[!pkgname?]");
TEST_CHECK_EQUAL(req8->as_human_string(id2), "Flag 'pkgname' disabled if it is disabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(! req8->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req8->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req9(
- parse_elike_use_requirement("pkgname=", id, { euro_allow_self_deps, euro_portage_syntax }));
+ parse_elike_use_requirement("pkgname=", { euro_allow_self_deps, euro_portage_syntax }));
TEST_CHECK_EQUAL(req9->as_raw_string(), "[pkgname=]");
TEST_CHECK_EQUAL(req9->as_human_string(id), "Flag 'pkgname' enabled or disabled like it is for 'cat/enabled-1:0::fake'");
TEST_CHECK(req9->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(! req9->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req10(
- parse_elike_use_requirement("pkgname=", id2, { euro_allow_self_deps, euro_portage_syntax }));
+ parse_elike_use_requirement("pkgname=", { euro_allow_self_deps, euro_portage_syntax }));
TEST_CHECK_EQUAL(req10->as_raw_string(), "[pkgname=]");
TEST_CHECK_EQUAL(req10->as_human_string(id2), "Flag 'pkgname' enabled or disabled like it is for 'cat/disabled-1:0::fake'");
TEST_CHECK(! req10->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req10->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req11(
- parse_elike_use_requirement("!pkgname=", id, { euro_allow_self_deps, euro_portage_syntax }));
+ parse_elike_use_requirement("!pkgname=", { euro_allow_self_deps, euro_portage_syntax }));
TEST_CHECK_EQUAL(req11->as_raw_string(), "[!pkgname=]");
TEST_CHECK_EQUAL(req11->as_human_string(id), "Flag 'pkgname' enabled or disabled opposite to how it is for 'cat/enabled-1:0::fake'");
TEST_CHECK(! req11->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req11->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req12(
- parse_elike_use_requirement("!pkgname=", id2, { euro_allow_self_deps, euro_portage_syntax }));
+ parse_elike_use_requirement("!pkgname=", { euro_allow_self_deps, euro_portage_syntax }));
TEST_CHECK_EQUAL(req12->as_raw_string(), "[!pkgname=]");
TEST_CHECK_EQUAL(req12->as_human_string(id2), "Flag 'pkgname' enabled or disabled opposite to how it is for 'cat/disabled-1:0::fake'");
TEST_CHECK(req12->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(! req12->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req13(
- parse_elike_use_requirement("-pkgname?", id, { euro_allow_self_deps, euro_portage_syntax }));
+ parse_elike_use_requirement("-pkgname?", { euro_allow_self_deps, euro_portage_syntax }));
TEST_CHECK_EQUAL(req13->as_raw_string(), "[-pkgname?]");
TEST_CHECK_EQUAL(req13->as_human_string(id), "Flag 'pkgname' disabled if it is enabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(! req13->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req13->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req14(
- parse_elike_use_requirement("-pkgname?", id2, { euro_allow_self_deps, euro_portage_syntax }));
+ parse_elike_use_requirement("-pkgname?", { euro_allow_self_deps, euro_portage_syntax }));
TEST_CHECK_EQUAL(req14->as_raw_string(), "[-pkgname?]");
TEST_CHECK_EQUAL(req14->as_human_string(id2), "Flag 'pkgname' disabled if it is enabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(req14->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req14->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req15(
- parse_elike_use_requirement("pkgname!?", id, { euro_allow_self_deps, euro_portage_syntax }));
+ parse_elike_use_requirement("pkgname!?", { euro_allow_self_deps, euro_portage_syntax }));
TEST_CHECK_EQUAL(req15->as_raw_string(), "[pkgname!?]");
TEST_CHECK_EQUAL(req15->as_human_string(id), "Flag 'pkgname' enabled if it is disabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(req15->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req15->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req16(
- parse_elike_use_requirement("pkgname!?", id2, { euro_allow_self_deps, euro_portage_syntax }));
+ parse_elike_use_requirement("pkgname!?", { euro_allow_self_deps, euro_portage_syntax }));
TEST_CHECK_EQUAL(req16->as_raw_string(), "[pkgname!?]");
TEST_CHECK_EQUAL(req16->as_human_string(id2), "Flag 'pkgname' enabled if it is disabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(req16->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(! req16->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req17(
- parse_elike_use_requirement("-pkgname!?", id, { euro_allow_self_deps, euro_portage_syntax }));
+ parse_elike_use_requirement("-pkgname!?", { euro_allow_self_deps, euro_portage_syntax }));
TEST_CHECK_EQUAL(req17->as_raw_string(), "[-pkgname!?]");
TEST_CHECK_EQUAL(req17->as_human_string(id), "Flag 'pkgname' disabled if it is disabled for 'cat/enabled-1:0::fake'");
TEST_CHECK(req17->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req17->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req18(
- parse_elike_use_requirement("-pkgname!?", id2, { euro_allow_self_deps, euro_portage_syntax }));
+ parse_elike_use_requirement("-pkgname!?", { euro_allow_self_deps, euro_portage_syntax }));
TEST_CHECK_EQUAL(req18->as_raw_string(), "[-pkgname!?]");
TEST_CHECK_EQUAL(req18->as_human_string(id2), "Flag 'pkgname' disabled if it is disabled for 'cat/disabled-1:0::fake'");
TEST_CHECK(! req18->requirement_met(&env, 0, id, id2, 0).first);
TEST_CHECK(req18->requirement_met(&env, 0, id2, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req19(
- parse_elike_use_requirement("pkgname!=", id, { euro_allow_self_deps, euro_portage_syntax }));
+ parse_elike_use_requirement("pkgname!=", { euro_allow_self_deps, euro_portage_syntax }));
TEST_CHECK_EQUAL(req19->as_raw_string(), "[pkgname!=]");
TEST_CHECK_EQUAL(req19->as_human_string(id), "Flag 'pkgname' enabled or disabled opposite to how it is for 'cat/enabled-1:0::fake'");
TEST_CHECK(! req19->requirement_met(&env, 0, id, id, 0).first);
TEST_CHECK(req19->requirement_met(&env, 0, id2, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req20(
- parse_elike_use_requirement("pkgname!=", id2, { euro_allow_self_deps, euro_portage_syntax }));
+ parse_elike_use_requirement("pkgname!=", { euro_allow_self_deps, euro_portage_syntax }));
TEST_CHECK_EQUAL(req20->as_raw_string(), "[pkgname!=]");
TEST_CHECK_EQUAL(req20->as_human_string(id2), "Flag 'pkgname' enabled or disabled opposite to how it is for 'cat/disabled-1:0::fake'");
TEST_CHECK(req20->requirement_met(&env, 0, id, id2, 0).first);
@@ -865,25 +865,25 @@ namespace test_cases
set_conditionals(id, "enabled disabled");
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req1(
- parse_elike_use_requirement("missing(+)", std::shared_ptr<const PackageID>(), { euro_allow_default_values, euro_strict_parsing }));
+ parse_elike_use_requirement("missing(+)", { euro_allow_default_values, euro_strict_parsing }));
TEST_CHECK_EQUAL(req1->as_raw_string(), "[missing(+)]");
TEST_CHECK_EQUAL(req1->as_human_string(make_null_shared_ptr()), "Flag 'missing' enabled, assuming enabled if missing");
TEST_CHECK(req1->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req2(
- parse_elike_use_requirement("missing(-)", std::shared_ptr<const PackageID>(), { euro_allow_default_values, euro_strict_parsing }));
+ parse_elike_use_requirement("missing(-)", { euro_allow_default_values, euro_strict_parsing }));
TEST_CHECK_EQUAL(req2->as_raw_string(), "[missing(-)]");
TEST_CHECK_EQUAL(req2->as_human_string(make_null_shared_ptr()), "Flag 'missing' enabled, assuming disabled if missing");
TEST_CHECK(! req2->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req3(
- parse_elike_use_requirement("-missing(+)", std::shared_ptr<const PackageID>(), { euro_allow_default_values, euro_strict_parsing }));
+ parse_elike_use_requirement("-missing(+)", { euro_allow_default_values, euro_strict_parsing }));
TEST_CHECK_EQUAL(req3->as_raw_string(), "[-missing(+)]");
TEST_CHECK_EQUAL(req3->as_human_string(make_null_shared_ptr()), "Flag 'missing' disabled, assuming enabled if missing");
TEST_CHECK(! req3->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req4(
- parse_elike_use_requirement("-missing(-)", std::shared_ptr<const PackageID>(), { euro_allow_default_values, euro_strict_parsing }));
+ parse_elike_use_requirement("-missing(-)", { euro_allow_default_values, euro_strict_parsing }));
TEST_CHECK_EQUAL(req4->as_raw_string(), "[-missing(-)]");
TEST_CHECK_EQUAL(req4->as_human_string(make_null_shared_ptr()), "Flag 'missing' disabled, assuming disabled if missing");
TEST_CHECK(req4->requirement_met(&env, 0, id, make_null_shared_ptr(), 0).first);
@@ -906,14 +906,12 @@ namespace test_cases
set_conditionals(id, "foo:enabled foo:disabled");
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req1(
- parse_elike_use_requirement("foo:*", id,
- { euro_allow_default_values, euro_allow_self_deps }));
+ parse_elike_use_requirement("foo:*", { euro_allow_default_values, euro_allow_self_deps }));
TEST_CHECK_EQUAL(req1->as_raw_string(), "[foo:*]");
TEST_CHECK(! req1->requirement_met(&env, 0, id, id, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req2(
- parse_elike_use_requirement("foo:*=", id,
- { euro_allow_default_values, euro_allow_self_deps }));
+ parse_elike_use_requirement("foo:*=", { euro_allow_default_values, euro_allow_self_deps }));
TEST_CHECK_EQUAL(req2->as_raw_string(), "[foo:*=]");
TEST_CHECK(req2->requirement_met(&env, 0, id, id, 0).first);
}
@@ -939,17 +937,13 @@ namespace test_cases
set_conditionals(id2, "foo:enabled foo:disabled bar:enabled bar:disabled");
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req1(
- parse_elike_use_requirement("foo:*(?)=", id2,
- { euro_allow_default_values, euro_allow_self_deps,
- euro_allow_default_question_values }));
+ parse_elike_use_requirement("foo:*(?)=", { euro_allow_default_values, euro_allow_self_deps, euro_allow_default_question_values }));
TEST_CHECK_EQUAL(req1->as_raw_string(), "[foo:*(?)=]");
TEST_CHECK(req1->requirement_met(&env, 0, id2, id2, 0).first);
TEST_CHECK(req1->requirement_met(&env, 0, id1, id2, 0).first);
std::shared_ptr<const AdditionalPackageDepSpecRequirement> req2(
- parse_elike_use_requirement("bar:*(?)=", id2,
- { euro_allow_default_values, euro_allow_self_deps,
- euro_allow_default_question_values }));
+ parse_elike_use_requirement("bar:*(?)=", { euro_allow_default_values, euro_allow_self_deps, euro_allow_default_question_values }));
TEST_CHECK_EQUAL(req2->as_raw_string(), "[bar:*(?)=]");
TEST_CHECK(req2->requirement_met(&env, 0, id2, id2, 0).first);
TEST_CHECK(req2->requirement_met(&env, 0, id1, id2, 0).first);