summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/tests/libntp/g_caltontp.cpp
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2015-10-26 11:35:40 +0000
committerglebius <glebius@FreeBSD.org>2015-10-26 11:35:40 +0000
commitc62812877398840dae0ba74b03e9e6a43cc56fc5 (patch)
tree304551aa93f09787d4f56a966c6409faf1b1bcb0 /contrib/ntp/tests/libntp/g_caltontp.cpp
parent9e809ce638c9be9ffb800ced1b91c0e8997f4c9e (diff)
downloadFreeBSD-src-c62812877398840dae0ba74b03e9e6a43cc56fc5.zip
FreeBSD-src-c62812877398840dae0ba74b03e9e6a43cc56fc5.tar.gz
Upgrade NTP to 4.2.8p4.
Security: FreeBSD-SA-15:25.ntp Security: CVE-2015-7871 Security: CVE-2015-7855 Security: CVE-2015-7854 Security: CVE-2015-7853 Security: CVE-2015-7852 Security: CVE-2015-7851 Security: CVE-2015-7850 Security: CVE-2015-7849 Security: CVE-2015-7848 Security: CVE-2015-7701 Security: CVE-2015-7703 Security: CVE-2015-7704, CVE-2015-7705 Security: CVE-2015-7691, CVE-2015-7692, CVE-2015-7702
Diffstat (limited to 'contrib/ntp/tests/libntp/g_caltontp.cpp')
-rw-r--r--contrib/ntp/tests/libntp/g_caltontp.cpp49
1 files changed, 0 insertions, 49 deletions
diff --git a/contrib/ntp/tests/libntp/g_caltontp.cpp b/contrib/ntp/tests/libntp/g_caltontp.cpp
deleted file mode 100644
index 7dafec0..0000000
--- a/contrib/ntp/tests/libntp/g_caltontp.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-#include "g_libntptest.h"
-
-extern "C" {
-#include "ntp_calendar.h"
-}
-
-class caltontpTest : public libntptest {
-};
-
-TEST_F(caltontpTest, DateGivenMonthDay) {
- // 2010-06-24 12:50:00
- calendar input = {2010, 0, 6, 24, 12, 50, 0};
-
- u_long expected = 3486372600UL; // This is the timestamp above.
-
- EXPECT_EQ(expected, caltontp(&input));
-}
-
-TEST_F(caltontpTest, DateGivenYearDay) {
- // 2010-06-24 12:50:00
- // This is the 175th day of 2010.
- calendar input = {2010, 175, 0, 0, 12, 50, 0};
-
- u_long expected = 3486372600UL; // This is the timestamp above.
-
- EXPECT_EQ(expected, caltontp(&input));
-}
-
-TEST_F(caltontpTest, DateLeapYear) {
- // 2012-06-24 12:00:00
- // This is the 176th day of 2012 (since 2012 is a leap year).
- calendar inputYd = {2012, 176, 0, 0, 12, 00, 00};
- calendar inputMd = {2012, 0, 6, 24, 12, 00, 00};
-
- u_long expected = 3549528000UL;
-
- EXPECT_EQ(expected, caltontp(&inputYd));
- EXPECT_EQ(expected, caltontp(&inputMd));
-}
-
-TEST_F(caltontpTest, WraparoundDateIn2036) {
- // 2036-02-07 06:28:16
- // This is (one) wrapping boundary where we go from ULONG_MAX to 0.
- calendar input = {2036, 0, 2, 7, 6, 28, 16};
-
- u_long expected = 0UL;
-
- EXPECT_EQ(expected, caltontp(&input));
-}
OpenPOWER on IntegriCloud