|
|
@@ -45,6 +45,11 @@ public:
|
|
|
TS_ASSERT_EQUALS(dec.to_string(), "100.00");
|
|
|
}
|
|
|
|
|
|
+ void testNegativeScaleLosesLowerDigits() {
|
|
|
+ math::bigdecimal dec("123", -2);
|
|
|
+ TS_ASSERT_EQUALS(dec.to_string(), "100");
|
|
|
+ }
|
|
|
+
|
|
|
void testConstructWithScaleEqualsWithout() {
|
|
|
math::bigdecimal scl(100, -2);
|
|
|
TS_ASSERT_EQUALS(scl.to_string(), "100");
|