summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/tests/libntp/uglydate.c
blob: f47f3e429375896edc2c679617e5586813976acc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "config.h"

#include "ntp_stdlib.h"
#include "ntp_fp.h"

#include "unity.h"

void test_ConstantDateTime(void);

void
test_ConstantDateTime(void) {
	const u_int32 HALF = 2147483648UL;

	l_fp time = {{3485080800UL}, HALF}; /* 2010-06-09 14:00:00.5 */

	TEST_ASSERT_EQUAL_STRING("3485080800.500000 10:159:14:00:00.500",
				 uglydate(&time));
}
OpenPOWER on IntegriCloud