[PPL-devel] [GIT] ppl/ppl(master): Added a test.
Enea Zaffanella
zaffanella at cs.unipr.it
Mon Mar 23 19:34:26 CET 2009
Module: ppl/ppl
Branch: master
Commit: 2a0fee1d5a9a032b67d48392daf597d014827791
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=2a0fee1d5a9a032b67d48392daf597d014827791
Author: Enea Zaffanella <zaffanella at spartacus.cs.unipr.it>
Date: Mon Mar 23 19:34:06 2009 +0100
Added a test.
---
tests/Octagonal_Shape/affineimage1.cc | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/tests/Octagonal_Shape/affineimage1.cc b/tests/Octagonal_Shape/affineimage1.cc
index fc79bbf..6bdafa3 100644
--- a/tests/Octagonal_Shape/affineimage1.cc
+++ b/tests/Octagonal_Shape/affineimage1.cc
@@ -437,6 +437,31 @@ test16() {
return ok;
}
+bool
+test17() {
+ Variable x(0);
+ Variable y(1);
+
+ TOctagonal_Shape oct1(2);
+ oct1.add_constraint(x >= 0);
+ oct1.add_constraint(x <= 2);
+ oct1.add_constraint(y >= 0);
+ oct1.add_constraint(y <= 2);
+
+ print_constraints(oct1.minimized_constraints(), "*** oct1 ***");
+
+ TOctagonal_Shape oct2(oct1);
+ print_constraints(oct2.minimized_constraints(), "*** oct1 ***");
+
+ oct2.affine_image(x, x + 1);
+ print_constraints(oct2.minimized_constraints(), "*** oct1 ***");
+
+ oct2.affine_image(y, y + 6);
+ print_constraints(oct2.minimized_constraints(), "*** oct2 ***");
+
+ return !oct2.is_empty();
+}
+
} // namespace
BEGIN_MAIN
More information about the PPL-devel
mailing list