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