]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/ntp/tests/libntp/g_uglydate.cpp
Fix a regression with SA-15:24 patch that prevented NIS from
[FreeBSD/releng/10.2.git] / contrib / ntp / tests / libntp / g_uglydate.cpp
1 #include "g_libntptest.h"
2
3 extern "C" {
4 #include "ntp_fp.h"
5 };
6
7 class uglydateTest : public libntptest {
8 protected:
9         static const u_int32 HALF = 2147483648UL;
10 };
11
12 TEST_F(uglydateTest, ConstantDateTime) {
13         l_fp time = {3485080800UL, HALF}; // 2010-06-09 14:00:00.5
14
15         EXPECT_STREQ("3485080800.500000 10:159:14:00:00.500",
16                                  uglydate(&time));
17 }
18