summaryrefslogtreecommitdiff
path: root/tests/corelib/numerics/BasicAmount.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/corelib/numerics/BasicAmount.cc')
-rw-r--r--tests/corelib/numerics/BasicAmount.cc19
1 files changed, 5 insertions, 14 deletions
diff --git a/tests/corelib/numerics/BasicAmount.cc b/tests/corelib/numerics/BasicAmount.cc
index 84692a90..972dcbcc 100644
--- a/tests/corelib/numerics/BasicAmount.cc
+++ b/tests/corelib/numerics/BasicAmount.cc
@@ -64,10 +64,9 @@ void BasicAmountTestCase::testNegation()
assertEqual(x6, x3);
assertEqual(x8, x3);
assertEqual(- x6, x9);
- assertEqual(x3.negated(), x9);
+ assertEqual(x3.negate(), x9);
- amount_t x10(x9);
- x10.negate();
+ amount_t x10(x9.negate());
assertEqual(x3, x10);
@@ -591,17 +590,9 @@ void BasicAmountTestCase::testAbs()
amount_t x1(-1234L);
amount_t x2(1234L);
- assertEqual(amount_t(), abs(x0));
- assertEqual(amount_t(1234L), abs(x1));
- assertEqual(amount_t(1234L), abs(x2));
-
- x0.abs();
- x1.abs();
- x2.abs();
-
- assertEqual(amount_t(), x0);
- assertEqual(amount_t(1234L), x1);
- assertEqual(amount_t(1234L), x2);
+ assertEqual(amount_t(), x0.abs());
+ assertEqual(amount_t(1234L), x1.abs());
+ assertEqual(amount_t(1234L), x2.abs());
CPPUNIT_ASSERT(x0.valid());
CPPUNIT_ASSERT(x1.valid());