summaryrefslogtreecommitdiff
path: root/test/unit/util/rational_white.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/util/rational_white.h')
-rw-r--r--test/unit/util/rational_white.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/util/rational_white.h b/test/unit/util/rational_white.h
index bcd3d56e4..63b4e1843 100644
--- a/test/unit/util/rational_white.h
+++ b/test/unit/util/rational_white.h
@@ -430,4 +430,15 @@ public:
// TS_ASSERT_EQUALS(large.hash(),
// (large.getNumerator().hash()) xor (large.getDenominator().hash()));
// }
+
+ //Make sure we can properly handle:
+ //http://www.ginac.de/CLN/cln_3.html#SEC15
+ const int i_above2tothe29 = (1 << 29) + 1;
+ const unsigned int u_above2tothe29 = (1 << 29) + 1;
+ void testConstruction(){
+ TS_ASSERT_EQUALS(Rational(i_above2tothe29), Rational((long)i_above2tothe29));
+ TS_ASSERT_EQUALS(Rational(u_above2tothe29),
+ Rational((unsigned long)u_above2tothe29));
+
+ }
};
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback