aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-10 20:19:25 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-10 21:56:16 +0000
commit874ec910f672eb770f76ca3911402ffd8ac8dd6c (patch)
treedebe8c933666c03245492ab14c4c6dc68750aad6
parent5a2a63d5769eecc1c3d2c7768f4e62b5bbe06315 (diff)
downloadpaludis-874ec910f672eb770f76ca3911402ffd8ac8dd6c.tar.gz
paludis-874ec910f672eb770f76ca3911402ffd8ac8dd6c.tar.xz
Use blocker helper for tests
-rw-r--r--paludis/resolver/resolver_TEST_blockers.cc7
-rw-r--r--paludis/resolver/resolver_TEST_continue_on_failure.cc7
-rw-r--r--paludis/resolver/resolver_TEST_purges.cc9
-rw-r--r--paludis/resolver/resolver_TEST_uninstalls.cc7
4 files changed, 13 insertions, 17 deletions
diff --git a/paludis/resolver/resolver_TEST_blockers.cc b/paludis/resolver/resolver_TEST_blockers.cc
index 1d9c723..5981d1a 100644
--- a/paludis/resolver/resolver_TEST_blockers.cc
+++ b/paludis/resolver/resolver_TEST_blockers.cc
@@ -24,6 +24,7 @@
#include <paludis/resolver/constraint.hh>
#include <paludis/resolver/resolvent.hh>
#include <paludis/resolver/suggest_restart.hh>
+#include <paludis/resolver/make_uninstall_blocker.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/options.hh>
@@ -186,10 +187,8 @@ namespace test_cases
void run()
{
- std::shared_ptr<const Resolved> resolved(get_resolved(BlockDepSpec(
- "!target/target",
- parse_user_package_dep_spec("target/target", &env, { }),
- bk_weak)));
+ std::shared_ptr<const Resolved> resolved(get_resolved(make_uninstall_blocker(
+ parse_user_package_dep_spec("target/target", &env, { }))));
check_resolved(resolved,
n::taken_change_or_remove_decisions() = exists ? make_shared_copy(DecisionChecks()
diff --git a/paludis/resolver/resolver_TEST_continue_on_failure.cc b/paludis/resolver/resolver_TEST_continue_on_failure.cc
index aba3279..265884b 100644
--- a/paludis/resolver/resolver_TEST_continue_on_failure.cc
+++ b/paludis/resolver/resolver_TEST_continue_on_failure.cc
@@ -28,6 +28,7 @@
#include <paludis/resolver/job_list.hh>
#include <paludis/resolver/job.hh>
#include <paludis/resolver/job_requirements.hh>
+#include <paludis/resolver/make_uninstall_blocker.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/options.hh>
@@ -166,10 +167,8 @@ namespace test_cases
void run()
{
- std::shared_ptr<const Resolved> resolved(get_resolved(BlockDepSpec(
- "!continue-on-failure-uninstall/target",
- parse_user_package_dep_spec("continue-on-failure-uninstall/target", &env, { }),
- bk_weak)));
+ std::shared_ptr<const Resolved> resolved(get_resolved(make_uninstall_blocker(
+ parse_user_package_dep_spec("continue-on-failure-uninstall/target", &env, { }))));
check_resolved(resolved,
n::taken_change_or_remove_decisions() = make_shared_copy(DecisionChecks()
diff --git a/paludis/resolver/resolver_TEST_purges.cc b/paludis/resolver/resolver_TEST_purges.cc
index 7068f5b..0aad6f1 100644
--- a/paludis/resolver/resolver_TEST_purges.cc
+++ b/paludis/resolver/resolver_TEST_purges.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010 Ciaran McCreesh
+ * Copyright (c) 2010, 2011 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
@@ -24,6 +24,7 @@
#include <paludis/resolver/constraint.hh>
#include <paludis/resolver/resolvent.hh>
#include <paludis/resolver/suggest_restart.hh>
+#include <paludis/resolver/make_uninstall_blocker.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/options.hh>
@@ -123,10 +124,8 @@ namespace test_cases
void run()
{
- std::shared_ptr<const Resolved> resolved(get_resolved(BlockDepSpec(
- "!star-slot-purges/target:1",
- parse_user_package_dep_spec("star-slot-purges/target:1", &env, { }),
- bk_weak)));
+ std::shared_ptr<const Resolved> resolved(get_resolved(make_uninstall_blocker(
+ parse_user_package_dep_spec("star-slot-purges/target:1", &env, { }))));
check_resolved(resolved,
n::taken_change_or_remove_decisions() = make_shared_copy(DecisionChecks()
diff --git a/paludis/resolver/resolver_TEST_uninstalls.cc b/paludis/resolver/resolver_TEST_uninstalls.cc
index 7bbdc14..76a2a8f 100644
--- a/paludis/resolver/resolver_TEST_uninstalls.cc
+++ b/paludis/resolver/resolver_TEST_uninstalls.cc
@@ -25,6 +25,7 @@
#include <paludis/resolver/resolvent.hh>
#include <paludis/resolver/suggest_restart.hh>
#include <paludis/resolver/required_confirmations.hh>
+#include <paludis/resolver/make_uninstall_blocker.hh>
#include <paludis/environments/test/test_environment.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/options.hh>
@@ -93,10 +94,8 @@ namespace test_cases
void run()
{
- std::shared_ptr<const Resolved> resolved(get_resolved(BlockDepSpec(
- "!breaking/target",
- parse_user_package_dep_spec("breaking/target", &env, { }),
- bk_weak)));
+ std::shared_ptr<const Resolved> resolved(get_resolved(make_uninstall_blocker(
+ parse_user_package_dep_spec("breaking/target", &env, { }))));
if (allowed_to_remove)
check_resolved(resolved,