[PPL-devel] [GIT] ppl/ppl(master): Fixed computation of known results for test01() and test02().
Roberto Bagnara
bagnara at cs.unipr.it
Sun May 3 17:03:01 CEST 2009
Module: ppl/ppl
Branch: master
Commit: 4d1c8a0cea556222c531c7969a92cd481c74469c
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=4d1c8a0cea556222c531c7969a92cd481c74469c
Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date: Sun May 3 17:02:33 2009 +0200
Fixed computation of known results for test01() and test02().
---
tests/Octagonal_Shape/wrap1.cc | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/Octagonal_Shape/wrap1.cc b/tests/Octagonal_Shape/wrap1.cc
index 6cc6e8f..9ddd4ae 100644
--- a/tests/Octagonal_Shape/wrap1.cc
+++ b/tests/Octagonal_Shape/wrap1.cc
@@ -43,7 +43,8 @@ test01() {
typedef TOctagonal_Shape::coefficient_type T;
if (!std::numeric_limits<T>::is_bounded
|| (std::numeric_limits<T>::max() >= 510
- && std::numeric_limits<T>::min() <= -510)) {
+ && (std::numeric_limits<T>::is_iec559
+ || std::numeric_limits<T>::min() <= -510))) {
known_result.refine_with_constraint(x >= 0);
known_result.refine_with_constraint(x <= 255);
known_result.refine_with_constraint(y >= 64);
@@ -61,6 +62,7 @@ test01() {
bool ok = (oct == known_result);
print_constraints(oct, "*** oct.wrap_assign(...) ***");
+ print_constraints(known_result, "*** known_result ***");
return ok;
}
@@ -87,7 +89,8 @@ test02() {
typedef TOctagonal_Shape::coefficient_type_base T;
if (!std::numeric_limits<T>::is_bounded
|| (std::numeric_limits<T>::max() >= 510
- && std::numeric_limits<T>::min() <= -510)) {
+ && (std::numeric_limits<T>::is_iec559
+ || std::numeric_limits<T>::min() <= -510))) {
known_result.refine_with_constraint(x >= 0);
known_result.refine_with_constraint(y >= 96);
known_result.refine_with_constraint(-x+y >= 96);
@@ -102,6 +105,7 @@ test02() {
bool ok = (oct == known_result);
print_constraints(oct, "*** oct.wrap_assign(...) ***");
+ print_constraints(known_result, "*** known_result ***");
return ok;
}
More information about the PPL-devel
mailing list