[PPL-devel] [GIT] ppl/ppl(master): Added a new test showing a precision problem in one of the methods
Enea Zaffanella
zaffanella at cs.unipr.it
Thu Aug 30 15:21:10 CEST 2012
Module: ppl/ppl
Branch: master
Commit: a9c8f53c83cc54b1a29e7a0df6ff691493364152
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=a9c8f53c83cc54b1a29e7a0df6ff691493364152
Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date: Thu Aug 30 15:10:40 2012 +0200
Added a new test showing a precision problem in one of the methods
Polyhedron::drop_some_non_integer_points();
---
tests/Polyhedron/dropsomenonintegerpoints2.cc | 35 +++++++++++++++++++++++++
1 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/tests/Polyhedron/dropsomenonintegerpoints2.cc b/tests/Polyhedron/dropsomenonintegerpoints2.cc
index 4adcce6..bf350ed 100644
--- a/tests/Polyhedron/dropsomenonintegerpoints2.cc
+++ b/tests/Polyhedron/dropsomenonintegerpoints2.cc
@@ -150,6 +150,40 @@ test05() {
return ok;
}
+bool
+test06() {
+ Variable A(0);
+ Variable B(1);
+
+ C_Polyhedron ph(2, EMPTY);
+ ph.add_generator(point(A, 2));
+ ph.add_generator(point(B, 2));
+
+ print_generators(ph, "*** ph ***");
+
+ ph.drop_some_non_integer_points(Variables_Set(B));
+
+ C_Polyhedron known_result1(2, EMPTY);
+ known_result1.add_generator(point(A, 2));
+
+ bool ok = (ph == known_result1);
+
+ print_constraints(ph, "*** after ph.drop_some_non_integer_points({B}) ***");
+
+ if (!ok)
+ return ok;
+
+ ph.drop_some_non_integer_points(Variables_Set(A));
+
+ C_Polyhedron known_result2(2, EMPTY);
+
+ ok = (ph == known_result2);
+
+ print_constraints(ph, "*** after ph.drop_some_non_integer_points({A}) ***");
+
+ return ok;
+}
+
} // namespace
BEGIN_MAIN
@@ -158,4 +192,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