test: extend util unit test
This commit is contained in:
parent
b0f7efd59e
commit
adb9123fc3
1 changed files with 8 additions and 0 deletions
|
@ -74,6 +74,14 @@ void test_unit(void) {
|
||||||
TEST_CHECK(!UTI_IsZeroTimespec(&ts));
|
TEST_CHECK(!UTI_IsZeroTimespec(&ts));
|
||||||
TEST_CHECK(!UTI_IsZeroNtp64(&ntp_ts));
|
TEST_CHECK(!UTI_IsZeroNtp64(&ntp_ts));
|
||||||
|
|
||||||
|
ntp_ts.hi = 0;
|
||||||
|
ntp_ts.lo = 0;
|
||||||
|
|
||||||
|
UTI_Ntp64ToTimespec(&ntp_ts, &ts);
|
||||||
|
TEST_CHECK(UTI_IsZeroTimespec(&ts));
|
||||||
|
UTI_TimespecToNtp64(&ts, &ntp_ts, NULL);
|
||||||
|
TEST_CHECK(UTI_IsZeroNtp64(&ntp_ts));
|
||||||
|
|
||||||
ntp_fuzz.hi = htonl(1);
|
ntp_fuzz.hi = htonl(1);
|
||||||
ntp_fuzz.lo = htonl(3);
|
ntp_fuzz.lo = htonl(3);
|
||||||
ntp_ts.hi = htonl(1);
|
ntp_ts.hi = htonl(1);
|
||||||
|
|
Loading…
Reference in a new issue