[PPL-devel] [GIT] ppl/ppl(pip): Added new test, which should return an empty solution.
François Galea
francois.galea at uvsq.fr
Tue Oct 20 16:12:55 CEST 2009
Module: ppl/ppl
Branch: pip
Commit: 27de41218171b82dbbb767ccb88f37bf4c202064
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=27de41218171b82dbbb767ccb88f37bf4c202064
Author: François Galea <francois.galea at uvsq.fr>
Date: Tue Oct 20 16:10:26 2009 +0200
Added new test, which should return an empty solution.
---
tests/PIP_Problem/pipproblem1.cc | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/tests/PIP_Problem/pipproblem1.cc b/tests/PIP_Problem/pipproblem1.cc
index 5b436fe..65b58aa 100644
--- a/tests/PIP_Problem/pipproblem1.cc
+++ b/tests/PIP_Problem/pipproblem1.cc
@@ -229,6 +229,28 @@ test05() {
return ok;
}
+bool
+test06() {
+ Variable i(0);
+ Variable n(1);
+ Variables_Set params(n);
+
+ Constraint_System cs;
+ cs.insert(4*i + 2*n >= 1);
+ cs.insert(4*i + 2*n <= 1);
+
+ PIP_Problem pip(cs.space_dimension(), cs.begin(), cs.end(), params);
+
+ bool ok = (pip.solve() == OPTIMIZED_PIP_PROBLEM);
+ if (ok) {
+ const PIP_Tree solution = pip.solution();
+ display_solution(solution, params, Variables_Set(i),
+ cs.space_dimension());
+ }
+
+ return ok;
+}
+
} // namespace
BEGIN_MAIN
@@ -237,4 +259,5 @@ BEGIN_MAIN
DO_TEST(test03);
DO_TEST(test04);
DO_TEST(test05);
+ DO_TEST(test06);
END_MAIN
More information about the PPL-devel
mailing list