
Module: ppl/ppl Branch: master Commit: ea6946e6d9a5db09dcfce63049b965b7052ce1d8 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=ea6946e6d9a5d...
Author: Enea Zaffanella zaffanella@cs.unipr.it Date: Mon Oct 17 09:48:26 2011 +0200
Added test showing a bug when solving again a 0-dimensional MIP_Problem. The bug only manifests when a previously solved 0-dimensional MIP_Problem is solved again after having modified it (that is, after changing optimization mode or optimization function).
---
tests/MIP_Problem/Makefile.am | 5 +++- tests/MIP_Problem/mipproblem4.cc | 40 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletions(-)
diff --git a/tests/MIP_Problem/Makefile.am b/tests/MIP_Problem/Makefile.am index 4c2b82e..1ce29a1 100644 --- a/tests/MIP_Problem/Makefile.am +++ b/tests/MIP_Problem/Makefile.am @@ -54,7 +54,8 @@ TESTS = \ ascii_dump_load1 \ exceptions1 \ mipproblem1 \ -mipproblem3 +mipproblem3 \ +mipproblem4
XFAIL_TESTS =
@@ -74,6 +75,8 @@ mipproblem2_SRCS = mipproblem2.cc
mipproblem3_SOURCES = mipproblem3.cc
+mipproblem4_SOURCES = mipproblem4.cc + if BUILD_WATCHDOG_LIBRARY WATCHDOG_TESTS = mipproblem2
diff --git a/tests/MIP_Problem/mipproblem4.cc b/tests/MIP_Problem/mipproblem4.cc new file mode 100644 index 0000000..0291a85 --- /dev/null +++ b/tests/MIP_Problem/mipproblem4.cc @@ -0,0 +1,40 @@ +/* Test the MIP_Problem class. + Copyright (C) 2001-2010 Roberto Bagnara bagnara@cs.unipr.it + +This file is part of the Parma Polyhedra Library (PPL). + +The PPL is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The PPL is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software Foundation, +Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA. + +For the most up-to-date information see the Parma Polyhedra Library +site: http://www.cs.unipr.it/ppl/ . */ + +#include "ppl_test.hh" + +namespace { + +bool +test01() { + MIP_Problem mip(0); + mip.is_satisfiable(); + mip.set_optimization_mode(MINIMIZATION); + mip.solve(); + return true; +} + +} // namespace + +BEGIN_MAIN + DO_TEST(test01); +END_MAIN