summaryrefslogtreecommitdiff
path: root/tests/numerics
diff options
context:
space:
mode:
Diffstat (limited to 'tests/numerics')
-rw-r--r--tests/numerics/BasicAmount.cc8
-rw-r--r--tests/numerics/CommodityAmount.cc4
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/numerics/BasicAmount.cc b/tests/numerics/BasicAmount.cc
index 626c3ba8..bcc5c2b5 100644
--- a/tests/numerics/BasicAmount.cc
+++ b/tests/numerics/BasicAmount.cc
@@ -415,8 +415,8 @@ void BasicAmountTestCase::testIntegerConversion()
amount_t x1(123456L);
assertEqual(true, bool(x1));
- assertEqual(123456L, long(x1));
- assertEqual(123456.0, double(x1));
+ assertEqual(123456L, x1.to_long());
+ assertEqual(123456.0, x1.to_double());
assertEqual(string("123456"), x1.to_string());
assertEqual(string("123456"), x1.quantity_string());
@@ -428,8 +428,8 @@ void BasicAmountTestCase::testFractionalConversion()
amount_t x1(1234.56);
assertEqual(true, bool(x1));
- assertEqual(1234L, long(x1));
- assertEqual(1234.56, double(x1));
+ assertEqual(1234L, x1.to_long());
+ assertEqual(1234.56, x1.to_double());
assertEqual(string("1234.56"), x1.to_string());
assertEqual(string("1234.56"), x1.quantity_string());
diff --git a/tests/numerics/CommodityAmount.cc b/tests/numerics/CommodityAmount.cc
index ffedbdac..e443d6a1 100644
--- a/tests/numerics/CommodityAmount.cc
+++ b/tests/numerics/CommodityAmount.cc
@@ -465,8 +465,8 @@ void CommodityAmountTestCase::testConversion()
amount_t x1("$1234.56");
assertEqual(true, bool(x1));
- assertEqual(1234L, long(x1));
- assertEqual(1234.56, double(x1));
+ assertEqual(1234L, x1.to_long());
+ assertEqual(1234.56, x1.to_double());
assertEqual(string("$1234.56"), x1.to_string());
assertEqual(string("1234.56"), x1.quantity_string());