summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2014-04-01 16:54:36 -0400
committerTim King <taking@cs.nyu.edu>2014-04-01 16:54:36 -0400
commit98df8ccdd49674c02360a0662fbc1765ace2d5bf (patch)
treeb80e3c78a79b45401a21a9bfb03bf63174e55199 /test
parente347f43940c53a8dfdaa022bc19900fcee631c08 (diff)
Fixing bug 552. There was a bug when integers are made using a string with a lot of leading 0s on old versions of CLN.1.3.x
Diffstat (limited to 'test')
-rw-r--r--test/unit/util/integer_black.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/util/integer_black.h b/test/unit/util/integer_black.h
index 48f32a307..de5669c11 100644
--- a/test/unit/util/integer_black.h
+++ b/test/unit/util/integer_black.h
@@ -24,6 +24,7 @@ using namespace CVC4;
using namespace std;
const char* largeVal = "4547897890548754897897897897890789078907890";
+const char* lotsOfLeadingZeroes = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001";
class IntegerBlack : public CxxTest::TestSuite {
@@ -462,4 +463,11 @@ public:
TS_ASSERT_EQUALS( r, Integer(-1));
}
+
+ void testLeadingZeroes() {
+ string leadingZeroes(lotsOfLeadingZeroes);
+ Integer one(1u);
+ Integer one_from_string(leadingZeroes,2);
+ TS_ASSERT_EQUALS(one, one_from_string);
+ }
};
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback