summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Burrows <dburrows@debian.org>2009-03-08 09:16:31 -0700
committerDaniel Burrows <dburrows@debian.org>2009-03-08 09:16:31 -0700
commitc1285a3a35c4cfd9eaef5b2e78015d6867682b26 (patch)
treea9f368c5e0edb4a7e0e3f8e3bc1c23ffd1252101 /tests
parentcd59a4213f8aa3ce0e80a642065358dfaa44ca71 (diff)
downloadaptitude-c1285a3a35c4cfd9eaef5b2e78015d6867682b26.tar.gz
Make install_version() choices carry the dependency that led to the install.
Choices are now exactly the same as actions, except that they're a bit more self-contained, explicitly separate from the solution, and have a type tag. So I'm going in circles a little more than I'd like. Still, I think this will clean up the code a little and will particularly make it easier to introduce a new choice type.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_choice.cc2
-rw-r--r--tests/test_choice_set.cc6
-rw-r--r--tests/test_promotion_set.cc2
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_choice.cc b/tests/test_choice.cc
index c74d1237..b30c8c43 100644
--- a/tests/test_choice.cc
+++ b/tests/test_choice.cc
@@ -64,7 +64,7 @@ class Choice_Test : public CppUnit::TestFixture
// routines that use a dummy value.
static choice make_install_version(const version &v)
{
- return choice::make_install_version(v, -1);
+ return choice::make_install_version(v, dep(), -1);
}
static choice make_install_version_from_dep_source(const version &v, const dep &d)
diff --git a/tests/test_choice_set.cc b/tests/test_choice_set.cc
index a0b88c1a..f3bd4e54 100644
--- a/tests/test_choice_set.cc
+++ b/tests/test_choice_set.cc
@@ -105,7 +105,7 @@ class Choice_Set_Test : public CppUnit::TestFixture
// routines that use a dummy value.
static choice make_install_version(const version &v)
{
- return choice::make_install_version(v, -1);
+ return choice::make_install_version(v, dep(), -1);
}
static choice make_install_version_from_dep_source(const version &v, const dep &d)
@@ -248,8 +248,8 @@ public:
void testGetVersionOf()
{
choice_set s;
- s.insert_or_narrow(choice::make_install_version(av1, -1));
- s.insert_or_narrow(choice::make_install_version(bv3, -1));
+ s.insert_or_narrow(make_install_version(av1));
+ s.insert_or_narrow(make_install_version(bv3));
version v;
CPPUNIT_ASSERT(s.get_version_of(a, v));
diff --git a/tests/test_promotion_set.cc b/tests/test_promotion_set.cc
index e5ff0310..2d7b695f 100644
--- a/tests/test_promotion_set.cc
+++ b/tests/test_promotion_set.cc
@@ -215,7 +215,7 @@ class Promotion_SetTest : public CppUnit::TestFixture
// routines that use a dummy value.
static choice make_install_version(const version &v)
{
- return choice::make_install_version(v, -1);
+ return choice::make_install_version(v, dep(), -1);
}
static choice make_install_version_from_dep_source(const version &v, const dep &d)