[GIT] ppl/ppl(master): Fixed the bug witnessed by test15().
Module: ppl/ppl Branch: master Commit: 30dfe89368c392d62339f5d962bef4e676ee61d7 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=30dfe89368c39... Author: Roberto Bagnara <bagnara@cs.unipr.it> Date: Thu May 14 22:04:30 2009 +0200 Fixed the bug witnessed by test15(). --- src/wrap_assign.hh | 7 +++++-- tests/Polyhedron/wrap1.cc | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/wrap_assign.hh b/src/wrap_assign.hh index 3ba5b96..10c2874 100644 --- a/src/wrap_assign.hh +++ b/src/wrap_assign.hh @@ -115,9 +115,12 @@ wrap_assign(PSET& pointset, throw std::invalid_argument(s.str()); } - // Wrapping no variable is a no-op. - if (vars.empty()) + // Wrapping no variable only requires refining with *pcs, if any. + if (vars.empty()) { + if (pcs != 0) + pointset.refine_with_constraints(*pcs); return; + } // Dimension-compatibility check of `vars'. if (space_dim < vars.space_dimension()) { diff --git a/tests/Polyhedron/wrap1.cc b/tests/Polyhedron/wrap1.cc index 90b4ba8..23ddd5d 100644 --- a/tests/Polyhedron/wrap1.cc +++ b/tests/Polyhedron/wrap1.cc @@ -500,6 +500,6 @@ BEGIN_MAIN DO_TEST_F8(test12); DO_TEST_F16(test13); DO_TEST_F8(test14); - DO_TEST_F(test15); + DO_TEST(test15); DO_TEST_F(test16); END_MAIN
participants (1)
-
Roberto Bagnara