1/* $NetBSD: prettydate.c,v 1.2 2020/05/25 20:47:36 christos Exp $ */ 2 3#include "config.h" 4 5#include "ntp_stdlib.h" 6#include "ntp_calendar.h" 7#include "ntp_fp.h" 8 9#include "unity.h" 10 11void setUp(void); 12void test_ConstantDate(void); 13 14 15void 16setUp(void) 17{ 18 init_lib(); 19 20 return; 21} 22 23 24void 25test_ConstantDate(void) { 26 const u_int32 HALF = 2147483648UL; 27 28 l_fp e_time = {{3485080800UL}, HALF}; /* 2010-06-09 14:00:00.5 */ 29 30 TEST_ASSERT_EQUAL_STRING("cfba1ce0.80000000 Wed, Jun 9 2010 14:00:00.500", 31 gmprettydate(&e_time)); 32 return; 33} 34