summaryrefslogtreecommitdiff
path: root/test/unit/util/integer_black.h
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2010-05-25 21:45:18 +0000
committerTim King <taking@cs.nyu.edu>2010-05-25 21:45:18 +0000
commit2635899db4a7622a206e2ec562d01e3337a92199 (patch)
tree43222be9c81680f93120e8e82100b8d46b821f2a /test/unit/util/integer_black.h
parente87c14798b99ccb586751d291b0eeb3208265bd8 (diff)
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.
Diffstat (limited to 'test/unit/util/integer_black.h')
-rw-r--r--test/unit/util/integer_black.h6
1 files changed, 6 insertions, 0 deletions
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);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback