freebsd-dev/contrib/ntp/tests/libntp/uglydate.c
Xin LI 3311ff84ea MFV r293415:
ntp 4.2.8p5

Reviewed by:	cy, roberto
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D4828
2016-01-08 15:53:48 +00:00

31 lines
428 B
C

#include "config.h"
#include "ntp_stdlib.h"
#include "ntp_fp.h"
#include "unity.h"
void setUp(void);
void test_ConstantDateTime(void);
void
setUp(void)
{
init_lib();
return;
}
void
test_ConstantDateTime(void)
{
const u_int32 HALF = 2147483648UL;
l_fp e_time = {{3485080800UL}, HALF}; /* 2010-06-09 14:00:00.5 */
TEST_ASSERT_EQUAL_STRING("3485080800.500000 10:159:14:00:00.500",
uglydate(&e_time));
return;
}