[Git][NTPsec/ntpsec][master] 2 commits: Added test for ntpcal_ntp_to_time().
Gary E. Miller
gitlab at mg.gitlab.com
Fri Jun 29 19:32:14 UTC 2018
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
90c25c3f by Ian Bruene at 2018-06-28T21:51:43Z
Added test for ntpcal_ntp_to_time().
- - - - -
0bcd6a2b by Ian Bruene at 2018-06-29T14:46:58Z
Fix for ntpcal_ntp-to-time test 32-bit errors.
- - - - -
1 changed file:
- tests/libntp/ntp_calendar.c
Changes:
=====================================
tests/libntp/ntp_calendar.c
=====================================
--- a/tests/libntp/ntp_calendar.c
+++ b/tests/libntp/ntp_calendar.c
@@ -128,6 +128,11 @@ TEST(calendar, parse_to_unixtime) {
}
#endif
+// test the NTP to Unix time conversion
+TEST(calendar, NtpToTime1) {
+ TEST_ASSERT_EQUAL(2085978538, ntpcal_ntp_to_time(42, 23));
+}
+
// test the day/sec join & split ops, making sure that 32bit
// intermediate results would definitely overflow and the hi DWORD of
// the 'time64_t' is definitely needed.
@@ -266,6 +271,7 @@ TEST_GROUP_RUNNER(calendar) {
#ifdef CLOCK_GENERIC
RUN_TEST_CASE(calendar, parse_to_unixtime);
#endif
+ RUN_TEST_CASE(calendar, NtpToTime1);
RUN_TEST_CASE(calendar, DaySplitMerge);
RUN_TEST_CASE(calendar, SplitYearDays1);
RUN_TEST_CASE(calendar, SplitYearDays2);
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/767297492dac9146c4345e29dfdf5e38d19763e6...0bcd6a2b2c2c3771ff86b8f0d0c2397a25195465
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/767297492dac9146c4345e29dfdf5e38d19763e6...0bcd6a2b2c2c3771ff86b8f0d0c2397a25195465
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20180629/f2bc5be0/attachment.html>
More information about the vc
mailing list