[Git][NTPsec/ntpsec][master] tests: don't test parse_to_unixtime() if no refclocks.
Gary E. Miller
gitlab at mg.gitlab.com
Wed May 24 03:48:27 UTC 2017
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
a13aa556 by Gary E. Miller at 2017-05-23T20:47:53-07:00
tests: don't test parse_to_unixtime() if no refclocks.
- - - - -
1 changed file:
- tests/libntp/calendar.c
Changes:
=====================================
tests/libntp/calendar.c
=====================================
--- a/tests/libntp/calendar.c
+++ b/tests/libntp/calendar.c
@@ -95,6 +95,7 @@ TEST(calendar, days_per_year) {
TEST_ASSERT_EQUAL(366, days_per_year(2040));
}
+#ifdef REFCLOCK
TEST(calendar, parse_to_unixtime) {
/* check is_leapyear() */
clocktime_t ct;
@@ -127,6 +128,7 @@ TEST(calendar, parse_to_unixtime) {
result = parse_to_unixtime( &ct, &Flag );
TEST_ASSERT_EQUAL(2114388123L, result);
}
+#endif
// test the day/sec join & split ops, making sure that 32bit
// intermediate results would definitely overflow and the hi DWORD of
@@ -263,7 +265,9 @@ TEST_GROUP_RUNNER(calendar) {
RUN_TEST_CASE(calendar, is_leapyear);
RUN_TEST_CASE(calendar, julian0);
RUN_TEST_CASE(calendar, days_per_year);
+#ifdef REFCLOCK
RUN_TEST_CASE(calendar, parse_to_unixtime);
+#endif
RUN_TEST_CASE(calendar, DaySplitMerge);
RUN_TEST_CASE(calendar, SplitYearDays1);
RUN_TEST_CASE(calendar, SplitYearDays2);
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/a13aa55654c66198049102ae6e6e3a154b3666ca
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/a13aa55654c66198049102ae6e6e3a154b3666ca
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/20170524/7c444338/attachment.html>
More information about the vc
mailing list