From 2635899db4a7622a206e2ec562d01e3337a92199 Mon Sep 17 00:00:00 2001 From: Tim King Date: Tue, 25 May 2010 21:45:18 +0000 Subject: Added Rational constructors that only take a numerator. The const char* Rational and Integer constructors are now explicit. This means that 'Integer = 3;' and so on are no longer permitted. This closes bug 121. --- test/unit/util/integer_black.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/unit/util/integer_black.h') diff --git a/test/unit/util/integer_black.h b/test/unit/util/integer_black.h index 8b8faf895..627167ad3 100644 --- a/test/unit/util/integer_black.h +++ b/test/unit/util/integer_black.h @@ -57,6 +57,12 @@ public: TS_ASSERT_EQUALS(z7.getUnsignedLong(), 1536729ul); } + void testCompareAgainstZero(){ + Integer z(0); + TS_ASSERT_THROWS_NOTHING(z == 0;); + TS_ASSERT_EQUALS(z,0); + } + void testOperatorAssign(){ Integer x(0); Integer y(79); -- cgit v1.2.3