]> CyberLeo.Net >> Repos - FreeBSD/releng/9.3.git/blob - contrib/ntp/tests/sandbox/uglydate.c
o Fix invalid TCP checksums with pf(4). [EN-16:02.pf]
[FreeBSD/releng/9.3.git] / contrib / ntp / tests / sandbox / uglydate.c
1 #include "config.h"
2 #include "ntp_fp.h"
3 #include "unity.h"
4
5 #include "ntp_stdlib.h"
6
7 //#include "libntptest.h"
8
9 void setUp(void);
10 void test_ConstantDateTime(void);
11
12
13 void
14 setUp(void)
15 {
16         init_lib();
17
18         return;
19 }
20
21
22 void
23 test_ConstantDateTime(void)
24 {
25         const u_int32 HALF = 2147483648UL;
26
27         l_fp e_time = {{3485080800UL}, HALF}; // 2010-06-09 14:00:00.5
28
29         TEST_ASSERT_EQUAL_STRING("3485080800.500000 10:159:14:00:00.500",
30                                  uglydate(&e_time));
31 }