diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/numerics/BasicAmount.cc | 4 | ||||
-rw-r--r-- | tests/numerics/CommodityAmount.cc | 42 |
2 files changed, 23 insertions, 23 deletions
diff --git a/tests/numerics/BasicAmount.cc b/tests/numerics/BasicAmount.cc index 90cf26ec..626c3ba8 100644 --- a/tests/numerics/BasicAmount.cc +++ b/tests/numerics/BasicAmount.cc @@ -339,7 +339,7 @@ void BasicAmountTestCase::testIntegerDivision() amount_t x1(123L); amount_t y1(456L); - assertThrow(x1 / 0L, amount_exception); + assertThrow(x1 / 0L, amount_error); assertEqual(amount_t(0L), amount_t(0L) / x1); assertEqual(amount_t(0L), 0L / x1); assertEqual(x1, x1 / 1L); @@ -376,7 +376,7 @@ void BasicAmountTestCase::testFractionalDivision() amount_t x1(123.123); amount_t y1(456.456); - assertThrow(x1 / 0L, amount_exception); + assertThrow(x1 / 0L, amount_error); assertEqual(amount_t("0.008121959"), amount_t(1.0) / x1); assertEqual(amount_t("0.008121959"), 1.0 / x1); assertEqual(x1, x1 / 1.0); diff --git a/tests/numerics/CommodityAmount.cc b/tests/numerics/CommodityAmount.cc index 7ed7f403..2f676697 100644 --- a/tests/numerics/CommodityAmount.cc +++ b/tests/numerics/CommodityAmount.cc @@ -232,13 +232,13 @@ void CommodityAmountTestCase::testAddition() assertEqual(string("$246.90"), (x1 + x1).to_string()); assertEqual(string("$246.91"), (x1 + x2).to_string()); - assertThrow(x1 + x0, amount_exception); - assertThrow(x1 + x3, amount_exception); - assertThrow(x1 + x4, amount_exception); - assertThrow(x1 + x5, amount_exception); - assertThrow(x1 + x6, amount_exception); - assertThrow(x1 + 123.45, amount_exception); - assertThrow(x1 + 123L, amount_exception); + assertThrow(x1 + x0, amount_error); + assertThrow(x1 + x3, amount_error); + assertThrow(x1 + x4, amount_error); + assertThrow(x1 + x5, amount_error); + assertThrow(x1 + x6, amount_error); + assertThrow(x1 + 123.45, amount_error); + assertThrow(x1 + 123L, amount_error); assertEqual(amount_t("DM 246.90"), x3 + x3); assertEqual(amount_t("246.90 euro"), x4 + x4); @@ -290,13 +290,13 @@ void CommodityAmountTestCase::testSubtraction() assertEqual(string("$0.00"), (x1 - x1).to_string()); assertEqual(string("$-0.01"), (x1 - x2).to_string()); - assertThrow(x1 - x0, amount_exception); - assertThrow(x1 - x3, amount_exception); - assertThrow(x1 - x4, amount_exception); - assertThrow(x1 - x5, amount_exception); - assertThrow(x1 - x6, amount_exception); - assertThrow(x1 - 123.45, amount_exception); - assertThrow(x1 - 123L, amount_exception); + assertThrow(x1 - x0, amount_error); + assertThrow(x1 - x3, amount_error); + assertThrow(x1 - x4, amount_error); + assertThrow(x1 - x5, amount_error); + assertThrow(x1 - x6, amount_error); + assertThrow(x1 - 123.45, amount_error); + assertThrow(x1 - 123L, amount_error); assertEqual(amount_t("DM 0.00"), x3 - x3); assertEqual(amount_t("DM 23.45"), x3 - amount_t("DM 100.00")); @@ -374,9 +374,9 @@ void CommodityAmountTestCase::testMultiplication() assertEqual(string("$15200.00"), (x1 * x2).to_string()); assertEqual(string("$15199.99986168"), (x2 * x1).to_string()); - assertThrow(x1 * x3, amount_exception); - assertThrow(x1 * x4, amount_exception); - assertThrow(x1 * x5, amount_exception); + assertThrow(x1 * x3, amount_error); + assertThrow(x1 * x4, amount_error); + assertThrow(x1 * x5, amount_error); x1 *= amount_t("123.12"); assertEqual(internalAmount("$15158.5344"), x1); @@ -410,7 +410,7 @@ void CommodityAmountTestCase::testDivision() amount_t x4("123.45 euro"); amount_t x5("123.45€"); - assertThrow(x1 / 0L, amount_exception); + assertThrow(x1 / 0L, amount_error); assertEqual(amount_t("$0.00"), 0L / x1); assertEqual(x1, x1 / 1L); assertEqual(internalAmount("$0.00812216"), 1L / x1); @@ -428,9 +428,9 @@ void CommodityAmountTestCase::testDivision() assertEqual(string("$1.00"), (x1 / x2).to_string()); assertEqual(string("$1.00273545321637426901"), (x2 / x1).to_string()); - assertThrow(x1 / x3, amount_exception); - assertThrow(x1 / x4, amount_exception); - assertThrow(x1 / x5, amount_exception); + assertThrow(x1 / x3, amount_error); + assertThrow(x1 / x4, amount_error); + assertThrow(x1 / x5, amount_error); x1 /= amount_t("123.12"); assertEqual(internalAmount("$1.00"), x1); |