summaryrefslogtreecommitdiff
path: root/tests/sandbox/uglydate.c
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2015-07-01 03:12:13 +0000
committerCy Schubert <cy@FreeBSD.org>2015-07-01 03:12:13 +0000
commit873997f35a991eee09ed91148a0cf332360380da (patch)
tree5b1ffa3ad0e56e0e9f2991011729791ee86d7632 /tests/sandbox/uglydate.c
parent4ba32eb5a8bf3455c09d1513ed2af8d2c861a6ba (diff)
Notes
Diffstat (limited to 'tests/sandbox/uglydate.c')
-rw-r--r--tests/sandbox/uglydate.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/sandbox/uglydate.c b/tests/sandbox/uglydate.c
new file mode 100644
index 0000000000000..a7879c117acdb
--- /dev/null
+++ b/tests/sandbox/uglydate.c
@@ -0,0 +1,16 @@
+#include "config.h"
+#include "ntp_fp.h"
+#include "unity.h"
+
+//#include "ntp_stdlib.h"
+//#include "libntptest.h"
+
+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));
+}