lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [5612] Rearrange tests to follow enumeration order


From: Greg Chicares
Subject: [lmi-commits] [5612] Rearrange tests to follow enumeration order
Date: Wed, 05 Dec 2012 00:43:37 +0000

Revision: 5612
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5612
Author:   chicares
Date:     2012-12-05 00:43:37 +0000 (Wed, 05 Dec 2012)
Log Message:
-----------
Rearrange tests to follow enumeration order

Modified Paths:
--------------
    lmi/trunk/calendar_date_test.cpp

Modified: lmi/trunk/calendar_date_test.cpp
===================================================================
--- lmi/trunk/calendar_date_test.cpp    2012-12-04 14:12:20 UTC (rev 5611)
+++ lmi/trunk/calendar_date_test.cpp    2012-12-05 00:43:37 UTC (rev 5612)
@@ -460,14 +460,14 @@
     calendar_date birth_date;
 
     birth_date     = calendar_date(1958,  7,  2);
+    BOOST_TEST_EQUAL(44, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
     BOOST_TEST_EQUAL(45, attained_age(birth_date, effective_date, 
oe_age_nearest_birthday_ties_older));
-    BOOST_TEST_EQUAL(44, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
 
     // If birthdate is one day later, then ANB is one year less.
 
     birth_date     = calendar_date(1958,  7,  3);
+    BOOST_TEST_EQUAL(44, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
     BOOST_TEST_EQUAL(44, attained_age(birth_date, effective_date, 
oe_age_nearest_birthday_ties_older));
-    BOOST_TEST_EQUAL(44, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
 
     // In a leap year, effective date can be an equal number of days
     // away from the two birthdays that bracket it. We arbitrarily
@@ -486,54 +486,54 @@
     effective_date = calendar_date(2004,  1,  1);
 
     birth_date     = calendar_date(1958,  7,  2);
+    BOOST_TEST_EQUAL(45, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
     BOOST_TEST_EQUAL(46, attained_age(birth_date, effective_date, 
oe_age_nearest_birthday_ties_older));
-    BOOST_TEST_EQUAL(45, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
 
     // If birthdate is one day earlier,
     // then ANB is unambiguously forty-six.
 
     birth_date     = calendar_date(1958,  7,  1);
+    BOOST_TEST_EQUAL(45, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
     BOOST_TEST_EQUAL(46, attained_age(birth_date, effective_date, 
oe_age_nearest_birthday_ties_older));
-    BOOST_TEST_EQUAL(45, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
 
     // If birthdate is one day later,
     // then ANB is unambiguously forty-five.
 
     birth_date     = calendar_date(1958,  7,  3);
+    BOOST_TEST_EQUAL(45, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
     BOOST_TEST_EQUAL(45, attained_age(birth_date, effective_date, 
oe_age_nearest_birthday_ties_older));
-    BOOST_TEST_EQUAL(45, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
 
     // Test leap-year-day birthdate.
 
     birth_date     = calendar_date(1956,  2, 29);
 
     effective_date = calendar_date(2003,  8, 30);
+    BOOST_TEST_EQUAL(47, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
     BOOST_TEST_EQUAL(47, attained_age(birth_date, effective_date, 
oe_age_nearest_birthday_ties_older));
-    BOOST_TEST_EQUAL(47, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
 
     effective_date = calendar_date(2003,  8, 31);
+    BOOST_TEST_EQUAL(47, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
     BOOST_TEST_EQUAL(48, attained_age(birth_date, effective_date, 
oe_age_nearest_birthday_ties_older));
-    BOOST_TEST_EQUAL(47, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
 
     effective_date = calendar_date(2004,  2, 28);
+    BOOST_TEST_EQUAL(47, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
     BOOST_TEST_EQUAL(48, attained_age(birth_date, effective_date, 
oe_age_nearest_birthday_ties_older));
-    BOOST_TEST_EQUAL(47, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
 
     effective_date = calendar_date(2004,  2, 29);
+    BOOST_TEST_EQUAL(48, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
     BOOST_TEST_EQUAL(48, attained_age(birth_date, effective_date, 
oe_age_nearest_birthday_ties_older));
-    BOOST_TEST_EQUAL(48, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
 
     effective_date = calendar_date(2004,  3,  1);
+    BOOST_TEST_EQUAL(48, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
     BOOST_TEST_EQUAL(48, attained_age(birth_date, effective_date, 
oe_age_nearest_birthday_ties_older));
-    BOOST_TEST_EQUAL(48, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
 
     effective_date = calendar_date(2005,  2, 28);
+    BOOST_TEST_EQUAL(48, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
     BOOST_TEST_EQUAL(49, attained_age(birth_date, effective_date, 
oe_age_nearest_birthday_ties_older));
-    BOOST_TEST_EQUAL(48, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
 
     effective_date = calendar_date(2005,  3,  1);
+    BOOST_TEST_EQUAL(49, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
     BOOST_TEST_EQUAL(49, attained_age(birth_date, effective_date, 
oe_age_nearest_birthday_ties_older));
-    BOOST_TEST_EQUAL(49, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
 
     // Test leap-year-day effective date, even though business custom
     // would probably forbid using it as the basis for a series of
@@ -542,12 +542,12 @@
     effective_date = calendar_date(2004,  2, 29);
 
     birth_date     = calendar_date(1958,  8, 30);
+    BOOST_TEST_EQUAL(45, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
     BOOST_TEST_EQUAL(46, attained_age(birth_date, effective_date, 
oe_age_nearest_birthday_ties_older));
-    BOOST_TEST_EQUAL(45, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
 
     birth_date     = calendar_date(1958,  8, 31);
+    BOOST_TEST_EQUAL(45, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
     BOOST_TEST_EQUAL(45, attained_age(birth_date, effective_date, 
oe_age_nearest_birthday_ties_older));
-    BOOST_TEST_EQUAL(45, attained_age(birth_date, effective_date, 
oe_age_last_birthday));
 
     // Effective date mustn't precede birthdate--this should throw:
     birth_date     = calendar_date(2003,  1,  2);




reply via email to

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