aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-05 01:46:33 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-05 01:46:33 +0000
commiteebb5837c1f10d36c7932d3203547088515c83b0 (patch)
tree107106d387d0ebeb300882ccd4d2285a99f268f2
parentcc8f4e0f49e771708ea85f1e3173ef0809ade3b0 (diff)
downloadpaludis-eebb5837c1f10d36c7932d3203547088515c83b0.tar.gz
paludis-eebb5837c1f10d36c7932d3203547088515c83b0.tar.xz
Add some else || ( use? ( ) else ) tests
-rw-r--r--paludis/dep_list_TEST.cc92
1 files changed, 92 insertions, 0 deletions
diff --git a/paludis/dep_list_TEST.cc b/paludis/dep_list_TEST.cc
index 3f705b2..88066a0 100644
--- a/paludis/dep_list_TEST.cc
+++ b/paludis/dep_list_TEST.cc
@@ -703,6 +703,98 @@ namespace test_cases
} test_dep_list_26;
/**
+ * \test Test DepList resolution behaviour.
+ *
+ * \ingroup Test
+ */
+ struct DepListTestCase27 : DepListTestCase<27>
+ {
+ void populate_repo()
+ {
+ repo->add_version("cat", "one", "1")->set(
+ vmk_depend, "cat/three || ( enabled? ( cat/two ) cat/three )");
+ 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_27;
+
+ /**
+ * \test Test DepList resolution behaviour.
+ *
+ * \ingroup Test
+ */
+ struct DepListTestCase28 : DepListTestCase<28>
+ {
+ void populate_repo()
+ {
+ repo->add_version("cat", "one", "1")->set(
+ vmk_depend, "cat/three || ( !enabled? ( cat/two ) cat/three )");
+ 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_28;
+
+ /**
+ * \test Test DepList resolution behaviour.
+ *
+ * \ingroup Test
+ */
+ struct DepListTestCase29 : DepListTestCase<29>
+ {
+ void populate_repo()
+ {
+ repo->add_version("cat", "one", "1")->set(
+ vmk_depend, "cat/three || ( disabled? ( cat/two ) cat/three )");
+ 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_29;
+
+ /**
+ * \test Test DepList resolution behaviour.
+ *
+ * \ingroup Test
+ */
+ struct DepListTestCase30 : DepListTestCase<30>
+ {
+ void populate_repo()
+ {
+ repo->add_version("cat", "one", "1")->set(
+ vmk_depend, "cat/three || ( !disabled? ( cat/two ) cat/three )");
+ 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_30;
+
+ /**
* \test Test DepList transactional add behaviour.
*
* \ingroup Test