[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] valyuta/004 3742c54 4/4: Suppress inapplicable unit
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] valyuta/004 3742c54 4/4: Suppress inapplicable unit tests for currency |
Date: |
Fri, 18 Dec 2020 07:29:53 -0500 (EST) |
branch: valyuta/004
commit 3742c5405d96393163dc45e8ed9f743d673c2def
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Suppress inapplicable unit tests for currency
Suppressed tests that assumed an integer data type, which turned out
to be less desirable than a floating data type.
---
currency_test.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/currency_test.cpp b/currency_test.cpp
index 01182fd..2d91c61 100644
--- a/currency_test.cpp
+++ b/currency_test.cpp
@@ -91,6 +91,7 @@ std::cout << "int3: " << big_int3 << std::endl;
currency::data_type big_int4 = round(100.0 * big_num);
std::cout << "int4: " << big_int4 << std::endl;
+#if defined CURRENCY_HAS_INTEGER_DATATYPE
BOOST_TEST_THROW
(currency a3(big_num / 1000.0)
,std::runtime_error
@@ -124,6 +125,7 @@ std::cout << "int4: " << big_int4 << std::endl;
// ,"Cast would transgress upper limit."
,"Cannot cast infinite to integral."
);
+#endif // !defined CURRENCY_HAS_INTEGER_DATATYPE
currency b0(464.180000000000006821);
currency b1(263.01999999999998181);