[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master c22dc49 1/2: Count all calendar_date_test suc
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master c22dc49 1/2: Count all calendar_date_test successes and failures |
Date: |
Thu, 29 Jun 2017 09:22:14 -0400 (EDT) |
branch: master
commit c22dc49af2d2c2c4aecb49ba6d9e9fda944ab098
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Count all calendar_date_test successes and failures
The LMI_ASSERT macro may legitimately used to validate preconditions
whose violation would prevent a unit test from running correctly, but
not (as it had been used here) in place of BOOST_TEST to check the
outcomes of actual unit tests.
---
calendar_date_test.cpp | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/calendar_date_test.cpp b/calendar_date_test.cpp
index cdae65d..7ab1454 100644
--- a/calendar_date_test.cpp
+++ b/calendar_date_test.cpp
@@ -24,7 +24,6 @@
#include "calendar_date.hpp"
#include "alert.hpp"
-#include "assert_lmi.hpp"
#include "test_tools.hpp"
#include "timer.hpp"
@@ -865,8 +864,8 @@ void
CalendarDateTest::TestYearAndMonthDifferenceExhaustively()
int m = ym.second;
calendar_date a = add_years_and_months(d, y, m , true);
calendar_date b = add_years_and_months(d, y, m + 1, true);
- LMI_ASSERT(a <= e );
- LMI_ASSERT( e < b);
+ BOOST_TEST(a <= e );
+ BOOST_TEST( e < b);
}
{
std::pair<int,int> ym = years_and_months_since(d, e, false);
@@ -874,8 +873,8 @@ void
CalendarDateTest::TestYearAndMonthDifferenceExhaustively()
int m = ym.second;
calendar_date a = add_years_and_months(d, y, m - 1, true);
calendar_date b = add_years_and_months(d, y, m , true);
- LMI_ASSERT(a < e );
- LMI_ASSERT( e <= b);
+ BOOST_TEST(a < e );
+ BOOST_TEST( e <= b);
}
}
}