tests/test_string.c

changeset 1184
34d60b1664f2
parent 1176
247db6e629ad
--- a/tests/test_string.c	Tue Feb 11 19:31:01 2025 +0100
+++ b/tests/test_string.c	Tue Feb 11 19:37:53 2025 +0100
@@ -1003,6 +1003,7 @@
     int64_t i64;
     CX_TEST_DO {
         // do some brute force tests with all ranges
+        test_strtoint_rollout_signed(5, 10);
         test_strtoint_rollout_signed(47, 10);
         test_strtoint_rollout_signed(210, 10);
         test_strtoint_rollout_signed(5678, 10);
@@ -1119,6 +1120,10 @@
         // do some special case tests
         // --------------------------
 
+        // leading plus
+        CX_TEST_ASSERT(0 == cx_strtou32(cx_str("+5"), &u32, 10));
+        CX_TEST_ASSERT(u32 == 5);
+
         // group separators
         CX_TEST_ASSERT(0 == cx_strtou32(cx_str("123,456"), &u32, 10));
         CX_TEST_ASSERT(u32 == 123456);

mercurial