lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 144c075 5/6: Make a unit-test function return


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 144c075 5/6: Make a unit-test function return a useful value
Date: Thu, 26 Aug 2021 20:48:05 -0400 (EDT)

branch: master
commit 144c075669708ba3bc24b9c672b8fbf24c440c12
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Make a unit-test function return a useful value
---
 zero_test.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/zero_test.cpp b/zero_test.cpp
index ec08fc1..8f58871 100644
--- a/zero_test.cpp
+++ b/zero_test.cpp
@@ -151,7 +151,7 @@ int max_n_eval_brent(double a, double b, double tol, double 
zeta)
 /// so this comparison is not made for x87.
 
 template<typename F>
-void test_a_function
+int test_a_function
     (F           f
     ,double      exact_root
     ,double      bound0
@@ -183,6 +183,8 @@ void test_a_function
 #if !defined LMI_X87
     INVOKE_LMI_TEST_EQUAL(os0.str(),os1.str(),file,line);
 #endif // !defined LMI_X87
+
+    return r.n_eval;
 }
 
 /// Test decimal root-finding accuracy and speed.



reply via email to

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