[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] valyuta/002 3d21745 3/8: Fix unit tests
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] valyuta/002 3d21745 3/8: Fix unit tests |
Date: |
Mon, 5 Oct 2020 19:57:18 -0400 (EDT) |
branch: valyuta/002
commit 3d21745a094d707986a166edd08a8ac7413fa28a
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Fix unit tests
Broken by commit 5fb74f1b1ac of 20200920T2245Z.
---
currency_test.cpp | 2 +-
round_to_test.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/currency_test.cpp b/currency_test.cpp
index 3c3ebbf..01182fd 100644
--- a/currency_test.cpp
+++ b/currency_test.cpp
@@ -131,7 +131,7 @@ std::cout << "int4: " << big_int4 << std::endl;
b2 += b0;
b2 += b1;
currency b3 = b0 + b1;
- BOOST_TEST_EQUAL(b2.m(), b3.m());
+ BOOST_TEST_EQUAL(b2.cents(), b3.cents());
BOOST_TEST_EQUAL(b2, b3);
}
diff --git a/round_to_test.cpp b/round_to_test.cpp
index 0fa70b6..da411e9 100644
--- a/round_to_test.cpp
+++ b/round_to_test.cpp
@@ -547,7 +547,7 @@ int test_main(int, char*[])
// Test rounding double to currency.
currency c = round0.c(1.61803398875);
BOOST_TEST((1.62 - c.d()) < 1e-14);
- BOOST_TEST_EQUAL(162, c.m());
+ BOOST_TEST_EQUAL(162, c.cents());
// c *= 0.61803398875;
// BOOST_TEST_EQUAL(1, c);
- [lmi-commits] [lmi] valyuta/002 updated (53eefda -> a3f1b6f), Greg Chicares, 2020/10/05
- [lmi-commits] [lmi] valyuta/002 3d21745 3/8: Fix unit tests,
Greg Chicares <=
- [lmi-commits] [lmi] valyuta/002 11484a9 7/8: Differentiate integral from floating conversions, Greg Chicares, 2020/10/05
- [lmi-commits] [lmi] valyuta/002 3d1ad5e 2/8: Avoid another run-time check, Greg Chicares, 2020/10/05
- [lmi-commits] [lmi] valyuta/002 1700262 1/8: Make fewer costly assertions, Greg Chicares, 2020/10/05
- [lmi-commits] [lmi] valyuta/002 a8bfa96 5/8: Improve encapsulation, Greg Chicares, 2020/10/05
- [lmi-commits] [lmi] valyuta/002 a3f1b6f 8/8: Probably prefer floating to integral datatype, Greg Chicares, 2020/10/05
- [lmi-commits] [lmi] valyuta/002 7be2c59 4/8: Comment out member functions that are apparently unused, Greg Chicares, 2020/10/05
- [lmi-commits] [lmi] valyuta/002 bfc32eb 6/8: Use a more appropriate type for 'cents_per_dollar', Greg Chicares, 2020/10/05