summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/test-misc.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test-misc.cpp b/test/test-misc.cpp
index 515a9c7..c72f3a6 100644
--- a/test/test-misc.cpp
+++ b/test/test-misc.cpp
@@ -99,3 +99,16 @@ BOOST_AUTO_TEST_CASE(create_datetime)
MyGrate::DateTime dt {tm};
BOOST_CHECK_EQUAL(dt, (MyGrate::DateTime {2021, 8, 17, 17, 44, 49}));
}
+
+BOOST_AUTO_TEST_CASE(mod100_extract)
+{
+ long unsigned int i {1629222289};
+ BOOST_CHECK_EQUAL((int)MyGrate::mod100_extract(i), 89);
+ BOOST_CHECK_EQUAL((int)MyGrate::mod100_extract(i), 22);
+ BOOST_CHECK_EQUAL((int)MyGrate::mod100_extract(i), 22);
+ BOOST_CHECK_EQUAL((int)MyGrate::mod100_extract(i), 29);
+ BOOST_CHECK_EQUAL((int)MyGrate::mod100_extract(i), 16);
+ BOOST_CHECK_EQUAL((int)MyGrate::mod100_extract(i), 0);
+ BOOST_CHECK_EQUAL((int)MyGrate::mod100_extract(i), 0);
+ BOOST_CHECK_EQUAL((int)MyGrate::mod100_extract(i), 0);
+}