[Git][NTPsec/ntpsec][master] Fix tests to work with --enable-leap-testing
Hal Murray
gitlab at mg.gitlab.com
Mon Apr 3 01:42:27 UTC 2017
Hal Murray pushed to branch master at NTPsec / ntpsec
Commits:
a85e57f0 by Hal Murray at 2017-04-02T18:41:30-07:00
Fix tests to work with --enable-leap-testing
- - - - -
1 changed file:
- tests/ntpd/leapsec.c
Changes:
=====================================
tests/ntpd/leapsec.c
=====================================
--- a/tests/ntpd/leapsec.c
+++ b/tests/ntpd/leapsec.c
@@ -629,7 +629,11 @@ TEST(leapsec, addFixed) {
insns[idx].of,
insns[idx].tt - 20*SECSPERDAY - 100,
insns[idx].tt + SECSPERDAY);
+#ifdef ENABLE_LEAP_TESTING
+ TEST_ASSERT_TRUE(rc);
+#else
TEST_ASSERT_FALSE(rc);
+#endif
}
// no do it right
for (idx=0; insns[idx].tt; ++idx) {
@@ -637,7 +641,11 @@ TEST(leapsec, addFixed) {
insns[idx].of,
insns[idx].tt,
insns[idx].tt + SECSPERDAY);
+#ifdef ENABLE_LEAP_TESTING
+ TEST_ASSERT_FALSE(rc);
+#else
TEST_ASSERT_TRUE(rc);
+#endif
}
// try to slip in a previous entry
rc = leapsec_add_fix(
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/a85e57f0df90b42efe2c72db534cf98b21e44819
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170403/edbd2efb/attachment.html>
More information about the vc
mailing list