]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/ntp/tests/libntp/uglydate.c
Upgrade NTP to 4.2.8p4.
[FreeBSD/releng/10.2.git] / contrib / ntp / tests / libntp / uglydate.c
1 #include "config.h"
2
3 #include "ntp_stdlib.h"
4 #include "ntp_fp.h"
5
6 #include "unity.h"
7
8 void test_ConstantDateTime(void);
9
10 void
11 test_ConstantDateTime(void) {
12         const u_int32 HALF = 2147483648UL;
13
14         l_fp time = {{3485080800UL}, HALF}; /* 2010-06-09 14:00:00.5 */
15
16         TEST_ASSERT_EQUAL_STRING("3485080800.500000 10:159:14:00:00.500",
17                                  uglydate(&time));
18 }