summaryrefslogtreecommitdiff
path: root/tests/test_resolver_hints.cc
diff options
context:
space:
mode:
authorDaniel Burrows <dburrows@debian.org>2009-03-29 16:58:07 -0700
committerDaniel Burrows <dburrows@debian.org>2009-03-29 16:58:07 -0700
commit22bda0d3eecbb036776a9a5e5b367c28d62f3231 (patch)
tree68ee314c6f2f036cba2de2e71a15e90839a703f7 /tests/test_resolver_hints.cc
parent8b784a82efdfccc89131a5a350266e4b901bae08 (diff)
downloadaptitude-22bda0d3eecbb036776a9a5e5b367c28d62f3231.tar.gz
Write support for resolver hints that adjust version tiers.
The syntax is "increase-tier-to TIER PACKAGE [VERSION]". The tier is either an integer, "conflict", or "minimum" (although "minimum" has no effect, so there's no point in using it).
Diffstat (limited to 'tests/test_resolver_hints.cc')
-rw-r--r--tests/test_resolver_hints.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/test_resolver_hints.cc b/tests/test_resolver_hints.cc
index 989dabf1..d39e678c 100644
--- a/tests/test_resolver_hints.cc
+++ b/tests/test_resolver_hints.cc
@@ -72,7 +72,19 @@ namespace
test("approve dc >1", hint::make_mandate(pattern::make_exact_name("dc"),
hint::version_selection::make_version(hint::version_selection::greater_than, "1"))),
test("reject ?task(desktop) <>4.0", hint::make_reject(pattern::make_task("desktop"),
- hint::version_selection::make_version(hint::version_selection::not_equal_to, "4.0")))
+ hint::version_selection::make_version(hint::version_selection::not_equal_to, "4.0"))),
+ test("increase-tier-to 100 wesnoth <5.0.0",
+ hint::make_increase_tier_to(pattern::make_exact_name("wesnoth"),
+ hint::version_selection::make_version(hint::version_selection::less_than, "5.0.0"),
+ aptitude_resolver::tier(100))),
+ test("increase-tier-to 500 xroach",
+ hint::make_increase_tier_to(pattern::make_exact_name("xroach"),
+ hint::version_selection::make_inst(),
+ aptitude_resolver::tier(500))),
+ test("increase-tier-to 800 xroach",
+ hint::make_increase_tier_to(pattern::make_exact_name("xroach"),
+ hint::version_selection::make_inst(),
+ aptitude_resolver::tier(800))),
};
const int num_resolver_tests =
sizeof(resolver_tests) / sizeof(resolver_tests[0]);