[Git][NTPsec/ntpsec][master] tests/libntp/lfpfunc.c: add tests for sizeof(lfp), etc.

Gary E. Miller (@garyedmundsmiller) gitlab at mg.gitlab.com
Fri Feb 11 01:08:38 UTC 2022



Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
5943108d by Gary E. Miller at 2022-02-10T17:08:00-08:00
tests/libntp/lfpfunc.c: add tests for sizeof(lfp), etc.

- - - - -


1 changed file:

- tests/libntp/lfpfunc.c


Changes:

=====================================
tests/libntp/lfpfunc.c
=====================================
@@ -167,6 +167,11 @@ TEST(lfpfunc, Extraction) {
     const uint32_t hi = 0xFFEEDDBB;
     const uint32_t lo = 0x66554433;
     l_fp lfp = lfpinit_u(hi, lo);
+
+    // rumor that some cc gets this wrong
+    TEST_ASSERT_EQUAL(sizeof(hi), 4);
+    TEST_ASSERT_EQUAL(sizeof(lfp), 8);
+
     TEST_ASSERT_EQUAL(lfpuint(lfp), hi);
     TEST_ASSERT_EQUAL(lfpfrac(lfp), lo);
     TEST_ASSERT_EQUAL(lfpsint(lfp), -1122885);



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/5943108daf876f387727b0cd6f347f9987b51e12

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/5943108daf876f387727b0cd6f347f9987b51e12
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/20220211/398b3f58/attachment.htm>


More information about the vc mailing list