tests/test_string.c

changeset 1410
be4071f5e9aa
parent 1304
57e062a4bb05
--- a/tests/test_string.c	Tue Sep 30 22:35:24 2025 +0200
+++ b/tests/test_string.c	Wed Oct 01 22:43:48 2025 +0200
@@ -1065,7 +1065,11 @@
         test_strtoint_rollout_signed(0x6df9CE03, 16);
         test_strtoint_rollout_signed(0xFdf9CE03, 16);
         test_strtoint_rollout_signed(0x6df9CE03AbC90815, 16);
-        // TODO: roll out base 2 tests, but that needs C23
+#if __STDC_VERSION__ >= 202300L
+        test_strtoint_rollout_signed(0b01000010100100101110101001110101, 2);
+        test_strtoint_rollout_signed(0b00011010101100001111111001010100, 2);
+        test_strtoint_rollout_signed(0b10110001001001010001010111010011, 2);
+#endif
 
         // do some special case tests
         // --------------------------
@@ -1154,7 +1158,11 @@
         test_strtoint_rollout(0xFdf9CE03, 16);
         test_strtoint_rollout(0x6df9CE03AbC90815, 16);
         test_strtoint_rollout(0xfdf9CE03AbC90815, 16);
-        // TODO: roll out base 2 tests, but that needs C23
+#if __STDC_VERSION__ >= 202300L
+        test_strtoint_rollout(0b01000010100100101110101001110101, 2);
+        test_strtoint_rollout(0b00011010101100001111111001010100, 2);
+        test_strtoint_rollout(0b10110001001001010001010111010011, 2);
+#endif
 
         // do some special case tests
         // --------------------------

mercurial