[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] valyuta/004 34326d6 04/11: Eliminate a return code t
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] valyuta/004 34326d6 04/11: Eliminate a return code that was always zero |
Date: |
Sun, 20 Dec 2020 17:40:09 -0500 (EST) |
branch: valyuta/004
commit 34326d611fc73bfe705b17ad96334cbd8772a769
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 da411e9..1950a7e 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*[])
@@ -571,11 +569,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] valyuta/004 updated (3742c54 -> b73e751), Greg Chicares, 2020/12/20
- [lmi-commits] [lmi] valyuta/004 be42a58 03/11: Assert rather than assign, Greg Chicares, 2020/12/20
- [lmi-commits] [lmi] valyuta/004 4a58266 09/11: Suppress the costly assertion that was recently added, Greg Chicares, 2020/12/20
- [lmi-commits] [lmi] valyuta/004 2913536 06/11: Fix a unit test, Greg Chicares, 2020/12/20
- [lmi-commits] [lmi] valyuta/004 c5f666f 08/11: Improve rounding to cents for solves, Greg Chicares, 2020/12/20
- [lmi-commits] [lmi] valyuta/004 34326d6 04/11: Eliminate a return code that was always zero,
Greg Chicares <=
- [lmi-commits] [lmi] valyuta/004 abb1363 05/11: Refactor a unit test, Greg Chicares, 2020/12/20
- [lmi-commits] [lmi] valyuta/004 7eacf2b 07/11: Prefer explicit to implicit currency rounding in unit test, Greg Chicares, 2020/12/20
- [lmi-commits] [lmi] valyuta/004 58962eb 01/11: Refactor, Greg Chicares, 2020/12/20
- [lmi-commits] [lmi] valyuta/004 9a03ce9 10/11: Add a handy git command, Greg Chicares, 2020/12/20
- [lmi-commits] [lmi] valyuta/004 b73e751 11/11: Record timings as of 20201215T2247Z SHA1 3742c540, Greg Chicares, 2020/12/20
- [lmi-commits] [lmi] valyuta/004 0c93fc2 02/11: Fix a problem somewhat mystically, Greg Chicares, 2020/12/20