We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8c827b commit 08d8a67Copy full SHA for 08d8a67
test-suite/period.cpp
@@ -154,6 +154,17 @@ BOOST_AUTO_TEST_CASE(testConvertToYears) {
154
BOOST_TEST(years(Period(18, Months)) == 1.5, tol);
155
}
156
157
+BOOST_AUTO_TEST_CASE(testConvertToMonths) {
158
+ BOOST_TEST_MESSAGE("Testing converting periods to months...");
159
+
160
+ BOOST_TEST(months(Period(0, Months)) == 0);
161
+ BOOST_TEST(months(Period(1, Months)) == 1);
162
+ BOOST_TEST(months(Period(5, Months)) == 5);
163
164
+ BOOST_TEST(months(Period(1, Years)) == 12);
165
+ BOOST_TEST(months(Period(3, Years)) == 36);
166
+}
167
168
BOOST_AUTO_TEST_CASE(testNormalization) {
169
170
BOOST_TEST_MESSAGE("Testing period normalization...");
0 commit comments