diff options
Diffstat (limited to 'contrib/ntp/tests/libntp/tstotv.c')
-rw-r--r-- | contrib/ntp/tests/libntp/tstotv.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/contrib/ntp/tests/libntp/tstotv.c b/contrib/ntp/tests/libntp/tstotv.c index 0801727..dac7e53 100644 --- a/contrib/ntp/tests/libntp/tstotv.c +++ b/contrib/ntp/tests/libntp/tstotv.c @@ -5,9 +5,14 @@ #include "unity.h" +void test_Seconds(void); +void test_MicrosecondsExact(void); +void test_MicrosecondsRounding(void); + + void test_Seconds(void) { - const l_fp input = {50, 0}; // 50.0 s + const l_fp input = {{50}, 0}; /* 50.0 s */ const struct timeval expected = {50, 0}; struct timeval actual; @@ -20,7 +25,7 @@ test_Seconds(void) { void test_MicrosecondsExact(void) { const u_long HALF = 2147483648UL; - const l_fp input = {50, HALF}; // 50.5 s + const l_fp input = {{50}, HALF}; /* 50.5 s */ const struct timeval expected = {50, 500000}; struct timeval actual; @@ -33,7 +38,7 @@ test_MicrosecondsExact(void) { void test_MicrosecondsRounding(void) { - const l_fp input = {50, 3865471UL}; // Should round to 50.0009 + const l_fp input = {{50}, 3865471UL}; /* Should round to 50.0009 */ const struct timeval expected = {50, 900}; struct timeval actual; |