[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master da240e8 03/15: Eliminate a return code that w
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master da240e8 03/15: Eliminate a return code that was always zero |
Date: |
Mon, 25 Jan 2021 09:58:04 -0500 (EST) |
branch: master
commit da240e8de3d7a409b2e3ee796826dcfea2067561
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Eliminate a return code that was always zero
---
round_to_test.cpp | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/round_to_test.cpp b/round_to_test.cpp
index e92ebc2..be3951d 100644
--- a/round_to_test.cpp
+++ b/round_to_test.cpp
@@ -453,7 +453,7 @@ void test_rounding()
// rigorous bounds, both overall and for each step.
}
-int test_all_modes(bool synchronize)
+void test_all_modes(bool synchronize)
{
// As stated above, we'd like this to be true for all
// floating-point types:
@@ -511,8 +511,6 @@ int test_all_modes(bool synchronize)
<< std::endl
;
test_rounding();
-
- return 0;
}
int test_main(int, char*[])
@@ -564,11 +562,9 @@ int test_main(int, char*[])
// The software default rounding style and the hardware rounding
// mode may be either synchronized or not, so test both ways.
std::cout << " Default style synchronized to hardware mode:\n";
- bool rc = test_all_modes(true);
+ test_all_modes(true);
std::cout << " Default style NOT synchronized to hardware mode:\n";
- // Use '+' rather than '||' to avoid short-circuit evaluation,
- // so that failure on one test doesn't prevent downstream tests
- // from being run.
- rc = rc + test_all_modes(false);
- return rc;
+ test_all_modes(false);
+
+ return EXIT_SUCCESS;
}
- [lmi-commits] [lmi] master updated (a111350 -> 9d991b0), Greg Chicares, 2021/01/25
- [lmi-commits] [lmi] master 6d719d2 10/15: Refactor an assertion, Greg Chicares, 2021/01/25
- [lmi-commits] [lmi] master 2084088 09/15: Record speed measurements, Greg Chicares, 2021/01/25
- [lmi-commits] [lmi] master da240e8 03/15: Eliminate a return code that was always zero,
Greg Chicares <=
- [lmi-commits] [lmi] master d280c59 05/15: Fix a unit test, Greg Chicares, 2021/01/25
- [lmi-commits] [lmi] master 7b51fab 07/15: Adapt to currency class, Greg Chicares, 2021/01/25
- [lmi-commits] [lmi] master f7a1129 08/15: Store policy fees as currency, Greg Chicares, 2021/01/25
- [lmi-commits] [lmi] master 2666c48 06/15: Test rounding double to currency, Greg Chicares, 2021/01/25
- [lmi-commits] [lmi] master 5ed8f75 04/15: Refactor a unit test, Greg Chicares, 2021/01/25
- [lmi-commits] [lmi] master 6a6ebe3 11/15: Adapt to currency class, Greg Chicares, 2021/01/25
- [lmi-commits] [lmi] master 1d5c923 01/15: Change some internal names, Greg Chicares, 2021/01/25
- [lmi-commits] [lmi] master 1e5d1ea 12/15: Adapt to currency class, Greg Chicares, 2021/01/25
- [lmi-commits] [lmi] master 27bd748 13/15: Write $0.00 as a currency rather than floating-point constant, Greg Chicares, 2021/01/25
- [lmi-commits] [lmi] master 9d991b0 15/15: Round currency as such, Greg Chicares, 2021/01/25