diff options
author | Enea Zaffanella <zaffanella@cs.unipr.it> | 2012-01-02 09:29:14 +0100 |
---|---|---|
committer | Enea Zaffanella <zaffanella@cs.unipr.it> | 2012-01-02 09:29:14 +0100 |
commit | b4b3f73fa09508299b9dffd86931c6a97d776c14 (patch) | |
tree | 2c00a01b813acf75762be387fd849b5f0b5f05ad /tests | |
parent | 1ed36cb18af6d0565a9dca7ddcff75f82f96a7a2 (diff) | |
download | ppl-b4b3f73fa09508299b9dffd86931c6a97d776c14.tar.gz ppl-b4b3f73fa09508299b9dffd86931c6a97d776c14.tar.bz2 ppl-b4b3f73fa09508299b9dffd86931c6a97d776c14.zip |
Added test showing a bug in BD_Shape::bounded_affine_preimage().
NOTE: the bug only affects the sparse_matrices branch and was synthesized
from a corresponding Java interface test.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/BD_Shape/boundedaffinepreimage1.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/BD_Shape/boundedaffinepreimage1.cc b/tests/BD_Shape/boundedaffinepreimage1.cc index d9108cf61..74890ee3f 100644 --- a/tests/BD_Shape/boundedaffinepreimage1.cc +++ b/tests/BD_Shape/boundedaffinepreimage1.cc @@ -343,6 +343,26 @@ test11() { return ok; } +bool +test12() { + Variable A(0); + Variable C(2); + + BD_Shape<mpz_class> bds(3); + bds.add_constraint(C == 5); + + print_constraints(bds, "*** bds ***"); + + bds.bounded_affine_preimage(C, A, A, 5); + + BD_Shape<mpz_class> known_result(3); + bool ok = check_result(bds, known_result); + + print_constraints(bds, "*** bds.bounded_affine_preimage(C, A, A, 5) ***"); + + return ok; +} + } // namespace BEGIN_MAIN @@ -357,4 +377,5 @@ BEGIN_MAIN DO_TEST(test09); DO_TEST(test10); DO_TEST(test11); + DO_TEST(test12); END_MAIN |