aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-05 01:49:22 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-05 01:49:22 +0000
commit3918cd8313664fbb6912f4ef14f359467154a8e5 (patch)
treed338c97c95b7d34e22bdafb510f52b4c7a387014
parenteebb5837c1f10d36c7932d3203547088515c83b0 (diff)
downloadpaludis-3918cd8313664fbb6912f4ef14f359467154a8e5.tar.gz
paludis-3918cd8313664fbb6912f4ef14f359467154a8e5.tar.xz
Add some foo || ( use? ( foo ) else ) tests
-rw-r--r--paludis/dep_list_TEST.cc94
1 files changed, 94 insertions, 0 deletions
diff --git a/paludis/dep_list_TEST.cc b/paludis/dep_list_TEST.cc
index 88066a0..4bc7447 100644
--- a/paludis/dep_list_TEST.cc
+++ b/paludis/dep_list_TEST.cc
@@ -795,6 +795,100 @@ namespace test_cases
} test_dep_list_30;
/**
+ * \test Test DepList resolution behaviour.
+ *
+ * \ingroup Test
+ */
+ struct DepListTestCase31 : DepListTestCase<31>
+ {
+ void populate_repo()
+ {
+ repo->add_version("cat", "one", "1")->set(
+ vmk_depend, "cat/three || ( enabled? ( cat/three ) cat/two )");
+ repo->add_version("cat", "two", "1");
+ repo->add_version("cat", "three", "1");
+ }
+
+ void populate_expected()
+ {
+ merge_target = "cat/one";
+ expected.push_back("cat/three-1:0::repo");
+ expected.push_back("cat/one-1:0::repo");
+ }
+ } test_dep_list_31;
+
+ /**
+ * \test Test DepList resolution behaviour.
+ *
+ * \ingroup Test
+ */
+ struct DepListTestCase32 : DepListTestCase<32>
+ {
+ void populate_repo()
+ {
+ repo->add_version("cat", "one", "1")->set(
+ vmk_depend, "cat/three || ( !enabled? ( cat/three ) cat/two )");
+ repo->add_version("cat", "two", "1");
+ repo->add_version("cat", "three", "1");
+ }
+
+ void populate_expected()
+ {
+ merge_target = "cat/one";
+ expected.push_back("cat/three-1:0::repo");
+ expected.push_back("cat/two-1:0::repo");
+ expected.push_back("cat/one-1:0::repo");
+ }
+ } test_dep_list_32;
+
+ /**
+ * \test Test DepList resolution behaviour.
+ *
+ * \ingroup Test
+ */
+ struct DepListTestCase33 : DepListTestCase<33>
+ {
+ void populate_repo()
+ {
+ repo->add_version("cat", "one", "1")->set(
+ vmk_depend, "cat/three || ( disabled? ( cat/three ) cat/two )");
+ repo->add_version("cat", "two", "1");
+ repo->add_version("cat", "three", "1");
+ }
+
+ void populate_expected()
+ {
+ merge_target = "cat/one";
+ expected.push_back("cat/three-1:0::repo");
+ expected.push_back("cat/two-1:0::repo");
+ expected.push_back("cat/one-1:0::repo");
+ }
+ } test_dep_list_33;
+
+ /**
+ * \test Test DepList resolution behaviour.
+ *
+ * \ingroup Test
+ */
+ struct DepListTestCase34 : DepListTestCase<34>
+ {
+ void populate_repo()
+ {
+ repo->add_version("cat", "one", "1")->set(
+ vmk_depend, "cat/three || ( !disabled? ( cat/three ) cat/two )");
+ repo->add_version("cat", "two", "1");
+ repo->add_version("cat", "three", "1");
+ }
+
+ void populate_expected()
+ {
+ merge_target = "cat/one";
+ expected.push_back("cat/three-1:0::repo");
+ expected.push_back("cat/one-1:0::repo");
+ }
+ } test_dep_list_34;
+
+ /**
* \test Test DepList transactional add behaviour.
*
* \ingroup Test