summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/tests/libntp/g_ymd2yd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/tests/libntp/g_ymd2yd.cpp')
-rw-r--r--contrib/ntp/tests/libntp/g_ymd2yd.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/contrib/ntp/tests/libntp/g_ymd2yd.cpp b/contrib/ntp/tests/libntp/g_ymd2yd.cpp
deleted file mode 100644
index 7e25999..0000000
--- a/contrib/ntp/tests/libntp/g_ymd2yd.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "g_libntptest.h"
-
-class ymd2ydTest : public libntptest {
-};
-
-TEST_F(ymd2ydTest, NonLeapYearFebruary) {
- EXPECT_EQ(31+20, ymd2yd(2010,2,20)); //2010-02-20
-}
-
-TEST_F(ymd2ydTest, NonLeapYearJune) {
- int expected = 31+28+31+30+31+18; // 18 June non-leap year
- EXPECT_EQ(expected, ymd2yd(2011,6,18));
-}
-
-TEST_F(ymd2ydTest, LeapYearFebruary) {
- EXPECT_EQ(31+20, ymd2yd(2012,2,20)); //2012-02-20 (leap year)
-}
-
-TEST_F(ymd2ydTest, LeapYearDecember) {
- // 2012-12-31
- int expected = 31+29+31+30+31+30+31+31+30+31+30+31;
- EXPECT_EQ(expected, ymd2yd(2012,12,31));
-}
OpenPOWER on IntegriCloud