lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 4e300fbc 6/9: Rearrange a unit test's output


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 4e300fbc 6/9: Rearrange a unit test's output
Date: Sat, 21 May 2022 20:13:52 -0400 (EDT)

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

    Rearrange a unit test's output
---
 math_functions_test.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/math_functions_test.cpp b/math_functions_test.cpp
index 4281045a..dcbf4713 100644
--- a/math_functions_test.cpp
+++ b/math_functions_test.cpp
@@ -203,7 +203,7 @@ void test_expm1_log1p()
 
 void sample_results()
 {
-    std::cout << LMI_CONTEXT << '\n' << std::endl;
+    std::cout << '\n' << LMI_CONTEXT << '\n' << std::endl;
 
     constexpr double intrate {0.04};
     fenv_initialize();
@@ -237,6 +237,7 @@ void sample_results()
         << "  double prec, std::expm1 and std::log1p\n"
         << "  " << i_upper_n_over_n_from_i_naive<double,12>()(intrate)
         << "  double prec, std::pow\n"
+        << std::endl;
         ;
 
     fenv_initialize();
@@ -339,7 +340,7 @@ void assay_speed()
     std::cout << "  long double i365 " << TimeAnAliquot(mete3) << '\n';
     std::cout << "  10^-9 nonstd     " << TimeAnAliquot(mete4) << '\n';
     std::cout << "  10^-9 std        " << TimeAnAliquot(mete5) << '\n';
-    std::cout << std::endl;
+    std::cout << std::flush;
 }
 
 template<typename T>
@@ -612,11 +613,11 @@ int test_main(int, char*[])
     test_signum<double       >(__FILE__, __LINE__);
     test_signum<long double  >(__FILE__, __LINE__);
 
-    assay_speed();
-
     test_expm1_log1p();
 
     sample_results();
 
+    assay_speed();
+
     return 0;
 }



reply via email to

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