lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 2cbcddd 6/6: Test auxiliary functions with ty


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 2cbcddd 6/6: Test auxiliary functions with type bool too
Date: Sun, 30 Apr 2017 11:49:37 -0400 (EDT)

branch: master
commit 2cbcddd1ac8d3752412b6a180e747a75f4c5425d
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Test auxiliary functions with type bool too
---
 tn_range_test.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tn_range_test.cpp b/tn_range_test.cpp
index 0d099ec..5d115a4 100644
--- a/tn_range_test.cpp
+++ b/tn_range_test.cpp
@@ -137,8 +137,10 @@ void tn_range_test::test_auxiliary_functions(char const* 
file, int line)
     T const minT = std::numeric_limits<T>::lowest();
 
     INVOKE_BOOST_TEST(!is_strictly_between_extrema(maxT), file, line);
-    // This test would fail for type bool.
-    INVOKE_BOOST_TEST( is_strictly_between_extrema<T>(1), file, line);
+    if(1 < maxT)
+        {
+        INVOKE_BOOST_TEST( is_strictly_between_extrema<T>(1), file, line);
+        }
 
     INVOKE_BOOST_TEST_EQUAL( 0, signum(T( 0)), file, line);
     INVOKE_BOOST_TEST_EQUAL( 1, signum(T( 1)), file, line);
@@ -291,6 +293,7 @@ void tn_range_test::test_percentages(char const* file, int 
line)
 
 void tn_range_test::test()
 {
+    test_auxiliary_functions<bool         >(__FILE__, __LINE__);
     test_auxiliary_functions<signed char  >(__FILE__, __LINE__);
     test_auxiliary_functions<unsigned char>(__FILE__, __LINE__);
     test_auxiliary_functions<int          >(__FILE__, __LINE__);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]