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