[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 30dcd20 1/4: Use LMI_TEST_EQUAL where suitabl
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 30dcd20 1/4: Use LMI_TEST_EQUAL where suitable |
Date: |
Sun, 7 Mar 2021 15:05:40 -0500 (EST) |
branch: master
commit 30dcd20408f521890fd7513d294d3ece5afca915
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Use LMI_TEST_EQUAL where suitable
LMI_TEST_EQUAL prints its arguments on failure; LMI_TEST(X==Y) doesn't.
---
miscellany_test.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/miscellany_test.cpp b/miscellany_test.cpp
index c92bec3..f3390a0 100644
--- a/miscellany_test.cpp
+++ b/miscellany_test.cpp
@@ -142,8 +142,8 @@ void test_minmax()
// Test default ctor.
minmax<double> const dbl_minmax {};
- LMI_TEST( DBL_MAX == dbl_minmax.minimum());
- LMI_TEST(-DBL_MAX == dbl_minmax.maximum());
+ LMI_TEST_EQUAL( DBL_MAX, dbl_minmax.minimum());
+ LMI_TEST_EQUAL(-DBL_MAX, dbl_minmax.maximum());
// Test explicit ctor with zero-element argument.
std::vector<int> const empty_vector {};
@@ -154,8 +154,8 @@ void test_minmax()
// Test const-correctness.
std::vector<double> const v = w;
minmax<double> const m(v);
- LMI_TEST(zero == m.minimum());
- LMI_TEST(one == m.maximum());
+ LMI_TEST_EQUAL(zero, m.minimum());
+ LMI_TEST_EQUAL(one , m.maximum());
// Motivation for relational operators: to write this...
LMI_TEST(zero <= m.minimum() && m.maximum() <= one);