diff options
Diffstat (limited to 'src/microhttpd/test_str.c')
-rw-r--r-- | src/microhttpd/test_str.c | 367 |
1 files changed, 179 insertions, 188 deletions
diff --git a/src/microhttpd/test_str.c b/src/microhttpd/test_str.c index 35e31319..650510a1 100644 --- a/src/microhttpd/test_str.c +++ b/src/microhttpd/test_str.c | |||
@@ -312,22 +312,22 @@ struct two_eq_strs | |||
312 | }; | 312 | }; |
313 | 313 | ||
314 | static const struct two_eq_strs eq_strings[] = { | 314 | static const struct two_eq_strs eq_strings[] = { |
315 | {D_STR_W_LEN ("1234567890!@~%&$@#{}[]\\/!?`."), D_STR_W_LEN ( | 315 | {D_STR_W_LEN ("1234567890!@~%&$@#{}[]\\/!?`."), |
316 | "1234567890!@~%&$@#{}[]\\/!?`.")}, | 316 | D_STR_W_LEN ("1234567890!@~%&$@#{}[]\\/!?`.")}, |
317 | {D_STR_W_LEN ("Simple string."), D_STR_W_LEN ("Simple string.")}, | 317 | {D_STR_W_LEN ("Simple string."), D_STR_W_LEN ("Simple string.")}, |
318 | {D_STR_W_LEN ("SIMPLE STRING."), D_STR_W_LEN ("SIMPLE STRING.")}, | 318 | {D_STR_W_LEN ("SIMPLE STRING."), D_STR_W_LEN ("SIMPLE STRING.")}, |
319 | {D_STR_W_LEN ("simple string."), D_STR_W_LEN ("simple string.")}, | 319 | {D_STR_W_LEN ("simple string."), D_STR_W_LEN ("simple string.")}, |
320 | {D_STR_W_LEN ("simple string."), D_STR_W_LEN ("Simple String.")}, | 320 | {D_STR_W_LEN ("simple string."), D_STR_W_LEN ("Simple String.")}, |
321 | {D_STR_W_LEN ("sImPlE StRiNg."), D_STR_W_LEN ("SiMpLe sTrInG.")}, | 321 | {D_STR_W_LEN ("sImPlE StRiNg."), D_STR_W_LEN ("SiMpLe sTrInG.")}, |
322 | {D_STR_W_LEN ("SIMPLE STRING."), D_STR_W_LEN ("simple string.")}, | 322 | {D_STR_W_LEN ("SIMPLE STRING."), D_STR_W_LEN ("simple string.")}, |
323 | {D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz"), D_STR_W_LEN ( | 323 | {D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz"), |
324 | "abcdefghijklmnopqrstuvwxyz")}, | 324 | D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz")}, |
325 | {D_STR_W_LEN ("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), D_STR_W_LEN ( | 325 | {D_STR_W_LEN ("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), |
326 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ")}, | 326 | D_STR_W_LEN ("ABCDEFGHIJKLMNOPQRSTUVWXYZ")}, |
327 | {D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz"), D_STR_W_LEN ( | 327 | {D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz"), |
328 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ")}, | 328 | D_STR_W_LEN ("ABCDEFGHIJKLMNOPQRSTUVWXYZ")}, |
329 | {D_STR_W_LEN ("zyxwvutsrqponMLKJIHGFEDCBA"), D_STR_W_LEN ( | 329 | {D_STR_W_LEN ("zyxwvutsrqponMLKJIHGFEDCBA"), |
330 | "ZYXWVUTSRQPONmlkjihgfedcba")}, | 330 | D_STR_W_LEN ("ZYXWVUTSRQPONmlkjihgfedcba")}, |
331 | 331 | ||
332 | {D_STR_W_LEN ("Cha\x8cne pour le test."), | 332 | {D_STR_W_LEN ("Cha\x8cne pour le test."), |
333 | D_STR_W_LEN ("Cha\x8cne pour le test.")}, /* "Chaîne pour le test." in CP850 */ | 333 | D_STR_W_LEN ("Cha\x8cne pour le test.")}, /* "Chaîne pour le test." in CP850 */ |
@@ -445,21 +445,21 @@ struct two_neq_strs | |||
445 | }; | 445 | }; |
446 | 446 | ||
447 | static const struct two_neq_strs neq_strings[] = { | 447 | static const struct two_neq_strs neq_strings[] = { |
448 | {D_STR_W_LEN ("1234567890!@~%&$@#{}[]\\/!?`."), D_STR_W_LEN ( | 448 | {D_STR_W_LEN ("1234567890!@~%&$@#{}[]\\/!?`."), |
449 | "1234567890!@~%&$@#{}[]\\/!?`"), 27}, | 449 | D_STR_W_LEN ("1234567890!@~%&$@#{}[]\\/!?`"), 27}, |
450 | {D_STR_W_LEN (".1234567890!@~%&$@#{}[]\\/!?`."), D_STR_W_LEN ( | 450 | {D_STR_W_LEN (".1234567890!@~%&$@#{}[]\\/!?`."), |
451 | "1234567890!@~%&$@#{}[]\\/!?`"), 0}, | 451 | D_STR_W_LEN ("1234567890!@~%&$@#{}[]\\/!?`"), 0}, |
452 | {D_STR_W_LEN ("Simple string."), D_STR_W_LEN ("Simple ctring."), 7}, | 452 | {D_STR_W_LEN ("Simple string."), D_STR_W_LEN ("Simple ctring."), 7}, |
453 | {D_STR_W_LEN ("simple string."), D_STR_W_LEN ("simple string"), 13}, | 453 | {D_STR_W_LEN ("simple string."), D_STR_W_LEN ("simple string"), 13}, |
454 | {D_STR_W_LEN ("simple strings"), D_STR_W_LEN ("Simple String."), 13}, | 454 | {D_STR_W_LEN ("simple strings"), D_STR_W_LEN ("Simple String."), 13}, |
455 | {D_STR_W_LEN ("sImPlE StRiNg."), D_STR_W_LEN ("SYMpLe sTrInG."), 1}, | 455 | {D_STR_W_LEN ("sImPlE StRiNg."), D_STR_W_LEN ("SYMpLe sTrInG."), 1}, |
456 | {D_STR_W_LEN ("SIMPLE STRING."), D_STR_W_LEN ("simple string.2"), 14}, | 456 | {D_STR_W_LEN ("SIMPLE STRING."), D_STR_W_LEN ("simple string.2"), 14}, |
457 | {D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz,"), D_STR_W_LEN ( | 457 | {D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz,"), |
458 | "abcdefghijklmnopqrstuvwxyz."), 26}, | 458 | D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz."), 26}, |
459 | {D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz!"), D_STR_W_LEN ( | 459 | {D_STR_W_LEN ("abcdefghijklmnopqrstuvwxyz!"), |
460 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ?"), 26}, | 460 | D_STR_W_LEN ("ABCDEFGHIJKLMNOPQRSTUVWXYZ?"), 26}, |
461 | {D_STR_W_LEN ("zyxwvutsrqponwMLKJIHGFEDCBA"), D_STR_W_LEN ( | 461 | {D_STR_W_LEN ("zyxwvutsrqponwMLKJIHGFEDCBA"), |
462 | "ZYXWVUTSRQPON%mlkjihgfedcba"), 13}, | 462 | D_STR_W_LEN ("ZYXWVUTSRQPON%mlkjihgfedcba"), 13}, |
463 | 463 | ||
464 | {D_STR_W_LEN ("S\xbdur veulent plus d'\xbdufs."), /* "Sœur veulent plus d'œufs." in ISO-8859-15 */ | 464 | {D_STR_W_LEN ("S\xbdur veulent plus d'\xbdufs."), /* "Sœur veulent plus d'œufs." in ISO-8859-15 */ |
465 | D_STR_W_LEN ("S\xbcUR VEULENT PLUS D'\xbcUFS."), 1}, /* "SŒUR VEULENT PLUS D'ŒUFS." in ISO-8859-15 */ | 465 | D_STR_W_LEN ("S\xbcUR VEULENT PLUS D'\xbcUFS."), 1}, /* "SŒUR VEULENT PLUS D'ŒUFS." in ISO-8859-15 */ |
@@ -644,11 +644,12 @@ check_eq_strings_n (void) | |||
644 | } | 644 | } |
645 | } | 645 | } |
646 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 646 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
647 | printf ( | 647 | printf ("PASSED: MHD_str_equal_caseless_n_(\"%s\", \"%s\", N) " \ |
648 | "PASSED: MHD_str_equal_caseless_n_(\"%s\", \"%s\", N) != 0 && \\\n" | 648 | "!= 0 && \\\n" \ |
649 | " MHD_str_equal_caseless_n_(\"%s\", \"%s\", N) != 0, where N is 0..%u\n", | 649 | " MHD_str_equal_caseless_n_(\"%s\", \"%s\", N) " \ |
650 | n_prnt (t->s1.str), n_prnt (t->s2.str), n_prnt (t->s2.str), | 650 | "!= 0, where N is 0..%u\n", |
651 | n_prnt (t->s1.str), (unsigned int) m_len + 1); | 651 | n_prnt (t->s1.str), n_prnt (t->s2.str), n_prnt (t->s2.str), |
652 | n_prnt (t->s1.str), (unsigned int) m_len + 1); | ||
652 | } | 653 | } |
653 | } | 654 | } |
654 | return t_failed; | 655 | return t_failed; |
@@ -1174,14 +1175,14 @@ check_str_to_uint64_valid (void) | |||
1174 | "FAILED: MHD_str_to_uint64_(\"%s\", ->%" PRIu64 | 1175 | "FAILED: MHD_str_to_uint64_(\"%s\", ->%" PRIu64 |
1175 | ") converted string to value %" | 1176 | ") converted string to value %" |
1176 | PRIu64 "," | 1177 | PRIu64 "," |
1177 | " while expecting result %" PRIu64 ". Locale: %s\n", n_prnt ( | 1178 | " while expecting result %" PRIu64 ". Locale: %s\n", |
1178 | t->str.str), rv, rv, | 1179 | n_prnt (t->str.str), rv, rv, |
1179 | t->val, get_current_locale_str ()); | 1180 | t->val, get_current_locale_str ()); |
1180 | } | 1181 | } |
1181 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 1182 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
1182 | printf ( | 1183 | printf ("PASSED: MHD_str_to_uint64_(\"%s\", ->%" PRIu64 ") == %" \ |
1183 | "PASSED: MHD_str_to_uint64_(\"%s\", ->%" PRIu64 ") == %" PRIuPTR "\n", | 1184 | PRIuPTR "\n", |
1184 | n_prnt (t->str.str), rv, rs); | 1185 | n_prnt (t->str.str), rv, rs); |
1185 | } | 1186 | } |
1186 | } | 1187 | } |
1187 | return t_failed; | 1188 | return t_failed; |
@@ -1245,9 +1246,9 @@ check_str_to_uint64_all_chars (void) | |||
1245 | char test_str[] = "0123"; | 1246 | char test_str[] = "0123"; |
1246 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ | 1247 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ |
1247 | 1248 | ||
1248 | printf ( | 1249 | printf ("PASSED: MHD_str_to_uint64_(\"%s\", &ret_val) == 0, " |
1249 | "PASSED: MHD_str_to_uint64_(\"%s\", &ret_val) == 0, value of ret_val is unmodified\n", | 1250 | "value of ret_val is unmodified\n", |
1250 | n_prnt (test_str)); | 1251 | n_prnt (test_str)); |
1251 | } | 1252 | } |
1252 | } | 1253 | } |
1253 | } | 1254 | } |
@@ -1304,9 +1305,9 @@ check_str_to_uint64_overflow (void) | |||
1304 | } | 1305 | } |
1305 | } | 1306 | } |
1306 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 1307 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
1307 | printf ( | 1308 | printf ("PASSED: MHD_str_to_uint64_(\"%s\", &ret_val) == 0, " |
1308 | "PASSED: MHD_str_to_uint64_(\"%s\", &ret_val) == 0, value of ret_val is unmodified\n", | 1309 | "value of ret_val is unmodified\n", |
1309 | n_prnt (t->str)); | 1310 | n_prnt (t->str)); |
1310 | } | 1311 | } |
1311 | } | 1312 | } |
1312 | return t_failed; | 1313 | return t_failed; |
@@ -1362,9 +1363,9 @@ check_str_to_uint64_no_val (void) | |||
1362 | } | 1363 | } |
1363 | } | 1364 | } |
1364 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 1365 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
1365 | printf ( | 1366 | printf ("PASSED: MHD_str_to_uint64_(\"%s\", &ret_val) == 0, " |
1366 | "PASSED: MHD_str_to_uint64_(\"%s\", &ret_val) == 0, value of ret_val is unmodified\n", | 1367 | "value of ret_val is unmodified\n", |
1367 | n_prnt (t->str)); | 1368 | n_prnt (t->str)); |
1368 | } | 1369 | } |
1369 | } | 1370 | } |
1370 | return t_failed; | 1371 | return t_failed; |
@@ -1431,12 +1432,11 @@ check_str_to_uint64_n_valid (void) | |||
1431 | } | 1432 | } |
1432 | } | 1433 | } |
1433 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 1434 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
1434 | printf ( | 1435 | printf ("PASSED: MHD_str_to_uint64_n_(\"%s\", %" PRIuPTR "..%" |
1435 | "PASSED: MHD_str_to_uint64_n_(\"%s\", %" PRIuPTR "..%" PRIuPTR ", ->%" | 1436 | PRIuPTR ", ->%" PRIu64 ")" " == %" PRIuPTR "\n", |
1436 | PRIu64 ")" | 1437 | n_prnt (t->str.str), |
1437 | " == %" PRIuPTR "\n", n_prnt (t->str.str), | 1438 | (uintptr_t) t->num_of_digt, |
1438 | (uintptr_t) t->num_of_digt, | 1439 | (uintptr_t) t->str.len + 1, rv, rs); |
1439 | (uintptr_t) t->str.len + 1, rv, rs); | ||
1440 | } | 1440 | } |
1441 | } | 1441 | } |
1442 | return t_failed; | 1442 | return t_failed; |
@@ -1510,9 +1510,9 @@ check_str_to_uint64_n_all_chars (void) | |||
1510 | char test_str[] = "0123"; | 1510 | char test_str[] = "0123"; |
1511 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ | 1511 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ |
1512 | 1512 | ||
1513 | printf ( | 1513 | printf ("PASSED: MHD_str_to_uint64_n_(\"%s\", 0..5, &ret_val) == 0, " |
1514 | "PASSED: MHD_str_to_uint64_n_(\"%s\", 0..5, &ret_val) == 0, value of ret_val is unmodified\n", | 1514 | "value of ret_val is unmodified\n", |
1515 | n_prnt (test_str)); | 1515 | n_prnt (test_str)); |
1516 | } | 1516 | } |
1517 | } | 1517 | } |
1518 | } | 1518 | } |
@@ -1577,12 +1577,11 @@ check_str_to_uint64_n_overflow (void) | |||
1577 | } | 1577 | } |
1578 | } | 1578 | } |
1579 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 1579 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
1580 | printf ( | 1580 | printf ("PASSED: MHD_str_to_uint64_n_(\"%s\", %" PRIuPTR "..%" PRIuPTR |
1581 | "PASSED: MHD_str_to_uint64_n_(\"%s\", %" PRIuPTR "..%" PRIuPTR | 1581 | ", &ret_val) == 0," |
1582 | ", &ret_val) == 0," | 1582 | " value of ret_val is unmodified\n", n_prnt (t->str), |
1583 | " value of ret_val is unmodified\n", n_prnt (t->str), | 1583 | (uintptr_t) t->len, |
1584 | (uintptr_t) t->len, | 1584 | (uintptr_t) t->len + 1); |
1585 | (uintptr_t) t->len + 1); | ||
1586 | } | 1585 | } |
1587 | } | 1586 | } |
1588 | return t_failed; | 1587 | return t_failed; |
@@ -1646,11 +1645,10 @@ check_str_to_uint64_n_no_val (void) | |||
1646 | } | 1645 | } |
1647 | } | 1646 | } |
1648 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 1647 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
1649 | printf ( | 1648 | printf ("PASSED: MHD_str_to_uint64_n_(\"%s\", 0..%" PRIuPTR |
1650 | "PASSED: MHD_str_to_uint64_n_(\"%s\", 0..%" PRIuPTR | 1649 | ", &ret_val) == 0," |
1651 | ", &ret_val) == 0," | 1650 | " value of ret_val is unmodified\n", n_prnt (t->str), |
1652 | " value of ret_val is unmodified\n", n_prnt (t->str), | 1651 | (uintptr_t) t->len + 1); |
1653 | (uintptr_t) t->len + 1); | ||
1654 | } | 1652 | } |
1655 | } | 1653 | } |
1656 | return t_failed; | 1654 | return t_failed; |
@@ -1715,15 +1713,14 @@ check_strx_to_uint32_valid (void) | |||
1715 | "FAILED: MHD_strx_to_uint32_(\"%s\", ->0x%" PRIX64 | 1713 | "FAILED: MHD_strx_to_uint32_(\"%s\", ->0x%" PRIX64 |
1716 | ") converted string to value 0x%" | 1714 | ") converted string to value 0x%" |
1717 | PRIX64 "," | 1715 | PRIX64 "," |
1718 | " while expecting result 0x%" PRIX64 ". Locale: %s\n", n_prnt ( | 1716 | " while expecting result 0x%" PRIX64 ". Locale: %s\n", |
1719 | t->str.str), (uint64_t) rv, (uint64_t) rv, | 1717 | n_prnt (t->str.str), (uint64_t) rv, (uint64_t) rv, |
1720 | t->val, get_current_locale_str ()); | 1718 | t->val, get_current_locale_str ()); |
1721 | } | 1719 | } |
1722 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 1720 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
1723 | printf ( | 1721 | printf ("PASSED: MHD_strx_to_uint32_(\"%s\", ->0x%" PRIX64 ") == %" |
1724 | "PASSED: MHD_strx_to_uint32_(\"%s\", ->0x%" PRIX64 ") == %" PRIuPTR | 1722 | PRIuPTR "\n", |
1725 | "\n", | 1723 | n_prnt (t->str.str), (uint64_t) rv, rs); |
1726 | n_prnt (t->str.str), (uint64_t) rv, rs); | ||
1727 | } | 1724 | } |
1728 | } | 1725 | } |
1729 | return t_failed; | 1726 | return t_failed; |
@@ -1792,9 +1789,9 @@ check_strx_to_uint32_all_chars (void) | |||
1792 | char test_str[] = "0123"; | 1789 | char test_str[] = "0123"; |
1793 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ | 1790 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ |
1794 | 1791 | ||
1795 | printf ( | 1792 | printf ("PASSED: MHD_strx_to_uint32_(\"%s\", &ret_val) == 0, " |
1796 | "PASSED: MHD_strx_to_uint32_(\"%s\", &ret_val) == 0, value of ret_val is unmodified\n", | 1793 | "value of ret_val is unmodified\n", |
1797 | n_prnt (test_str)); | 1794 | n_prnt (test_str)); |
1798 | } | 1795 | } |
1799 | } | 1796 | } |
1800 | } | 1797 | } |
@@ -1869,9 +1866,9 @@ check_strx_to_uint32_overflow (void) | |||
1869 | } | 1866 | } |
1870 | } | 1867 | } |
1871 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 1868 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
1872 | printf ( | 1869 | printf ("PASSED: MHD_strx_to_uint32_(\"%s\", &ret_val) == 0, " |
1873 | "PASSED: MHD_strx_to_uint32_(\"%s\", &ret_val) == 0, value of ret_val is unmodified\n", | 1870 | "value of ret_val is unmodified\n", |
1874 | n_prnt (str)); | 1871 | n_prnt (str)); |
1875 | } | 1872 | } |
1876 | } | 1873 | } |
1877 | return t_failed; | 1874 | return t_failed; |
@@ -1928,9 +1925,9 @@ check_strx_to_uint32_no_val (void) | |||
1928 | } | 1925 | } |
1929 | } | 1926 | } |
1930 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 1927 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
1931 | printf ( | 1928 | printf ("PASSED: MHD_strx_to_uint32_(\"%s\", &ret_val) == 0, " |
1932 | "PASSED: MHD_strx_to_uint32_(\"%s\", &ret_val) == 0, value of ret_val is unmodified\n", | 1929 | "value of ret_val is unmodified\n", |
1933 | n_prnt (t->str)); | 1930 | n_prnt (t->str)); |
1934 | } | 1931 | } |
1935 | } | 1932 | } |
1936 | return t_failed; | 1933 | return t_failed; |
@@ -2086,9 +2083,9 @@ check_strx_to_uint32_n_all_chars (void) | |||
2086 | char test_str[] = "0123"; | 2083 | char test_str[] = "0123"; |
2087 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ | 2084 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ |
2088 | 2085 | ||
2089 | printf ( | 2086 | printf ("PASSED: MHD_strx_to_uint32_n_(\"%s\", 0..5, &ret_val) == 0, " |
2090 | "PASSED: MHD_strx_to_uint32_n_(\"%s\", 0..5, &ret_val) == 0, value of ret_val is unmodified\n", | 2087 | "value of ret_val is unmodified\n", |
2091 | n_prnt (test_str)); | 2088 | n_prnt (test_str)); |
2092 | } | 2089 | } |
2093 | } | 2090 | } |
2094 | } | 2091 | } |
@@ -2186,12 +2183,11 @@ check_strx_to_uint32_n_overflow (void) | |||
2186 | } | 2183 | } |
2187 | } | 2184 | } |
2188 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 2185 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
2189 | printf ( | 2186 | printf ("PASSED: MHD_strx_to_uint32_n_(\"%s\", %" PRIuPTR "..%" PRIuPTR |
2190 | "PASSED: MHD_strx_to_uint32_n_(\"%s\", %" PRIuPTR "..%" PRIuPTR | 2187 | ", &ret_val) == 0," |
2191 | ", &ret_val) == 0," | 2188 | " value of ret_val is unmodified\n", n_prnt (str), |
2192 | " value of ret_val is unmodified\n", n_prnt (str), | 2189 | (uintptr_t) min_len, |
2193 | (uintptr_t) min_len, | 2190 | (uintptr_t) max_len); |
2194 | (uintptr_t) max_len); | ||
2195 | } | 2191 | } |
2196 | } | 2192 | } |
2197 | return t_failed; | 2193 | return t_failed; |
@@ -2256,11 +2252,10 @@ check_strx_to_uint32_n_no_val (void) | |||
2256 | } | 2252 | } |
2257 | } | 2253 | } |
2258 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 2254 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
2259 | printf ( | 2255 | printf ("PASSED: MHD_strx_to_uint32_n_(\"%s\", 0..%" PRIuPTR |
2260 | "PASSED: MHD_strx_to_uint32_n_(\"%s\", 0..%" PRIuPTR | 2256 | ", &ret_val) == 0," |
2261 | ", &ret_val) == 0," | 2257 | " value of ret_val is unmodified\n", n_prnt (t->str), |
2262 | " value of ret_val is unmodified\n", n_prnt (t->str), | 2258 | (uintptr_t) t->len + 1); |
2263 | (uintptr_t) t->len + 1); | ||
2264 | } | 2259 | } |
2265 | } | 2260 | } |
2266 | return t_failed; | 2261 | return t_failed; |
@@ -2326,10 +2321,9 @@ check_strx_to_uint64_valid (void) | |||
2326 | t->val, get_current_locale_str ()); | 2321 | t->val, get_current_locale_str ()); |
2327 | } | 2322 | } |
2328 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 2323 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
2329 | printf ( | 2324 | printf ("PASSED: MHD_strx_to_uint64_(\"%s\", ->0x%" PRIX64 ") == %" |
2330 | "PASSED: MHD_strx_to_uint64_(\"%s\", ->0x%" PRIX64 ") == %" PRIuPTR | 2325 | PRIuPTR "\n", |
2331 | "\n", | 2326 | n_prnt (t->str.str), rv, rs); |
2332 | n_prnt (t->str.str), rv, rs); | ||
2333 | } | 2327 | } |
2334 | } | 2328 | } |
2335 | return t_failed; | 2329 | return t_failed; |
@@ -2397,9 +2391,9 @@ check_strx_to_uint64_all_chars (void) | |||
2397 | char test_str[] = "0123"; | 2391 | char test_str[] = "0123"; |
2398 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ | 2392 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ |
2399 | 2393 | ||
2400 | printf ( | 2394 | printf ("PASSED: MHD_strx_to_uint64_(\"%s\", &ret_val) == 0, " |
2401 | "PASSED: MHD_strx_to_uint64_(\"%s\", &ret_val) == 0, value of ret_val is unmodified\n", | 2395 | "value of ret_val is unmodified\n", |
2402 | n_prnt (test_str)); | 2396 | n_prnt (test_str)); |
2403 | } | 2397 | } |
2404 | } | 2398 | } |
2405 | } | 2399 | } |
@@ -2456,9 +2450,9 @@ check_strx_to_uint64_overflow (void) | |||
2456 | } | 2450 | } |
2457 | } | 2451 | } |
2458 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 2452 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
2459 | printf ( | 2453 | printf ("PASSED: MHD_strx_to_uint64_(\"%s\", &ret_val) == 0, " |
2460 | "PASSED: MHD_strx_to_uint64_(\"%s\", &ret_val) == 0, value of ret_val is unmodified\n", | 2454 | "value of ret_val is unmodified\n", |
2461 | n_prnt (t->str)); | 2455 | n_prnt (t->str)); |
2462 | } | 2456 | } |
2463 | } | 2457 | } |
2464 | return t_failed; | 2458 | return t_failed; |
@@ -2514,9 +2508,9 @@ check_strx_to_uint64_no_val (void) | |||
2514 | } | 2508 | } |
2515 | } | 2509 | } |
2516 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 2510 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
2517 | printf ( | 2511 | printf ("PASSED: MHD_strx_to_uint64_(\"%s\", &ret_val) == 0, " |
2518 | "PASSED: MHD_strx_to_uint64_(\"%s\", &ret_val) == 0, value of ret_val is unmodified\n", | 2512 | "value of ret_val is unmodified\n", |
2519 | n_prnt (t->str)); | 2513 | n_prnt (t->str)); |
2520 | } | 2514 | } |
2521 | } | 2515 | } |
2522 | return t_failed; | 2516 | return t_failed; |
@@ -2583,13 +2577,12 @@ check_strx_to_uint64_n_valid (void) | |||
2583 | } | 2577 | } |
2584 | } | 2578 | } |
2585 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 2579 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
2586 | printf ( | 2580 | printf ("PASSED: MHD_strx_to_uint64_n_(\"%s\", %" PRIuPTR "..%" PRIuPTR |
2587 | "PASSED: MHD_strx_to_uint64_n_(\"%s\", %" PRIuPTR "..%" PRIuPTR | 2581 | ", ->0x%" |
2588 | ", ->0x%" | 2582 | PRIX64 ")" |
2589 | PRIX64 ")" | 2583 | " == %" PRIuPTR "\n", n_prnt (t->str.str), |
2590 | " == %" PRIuPTR "\n", n_prnt (t->str.str), | 2584 | (uintptr_t) t->num_of_digt, |
2591 | (uintptr_t) t->num_of_digt, | 2585 | (uintptr_t) t->str.len + 1, rv, rs); |
2592 | (uintptr_t) t->str.len + 1, rv, rs); | ||
2593 | } | 2586 | } |
2594 | } | 2587 | } |
2595 | return t_failed; | 2588 | return t_failed; |
@@ -2668,9 +2661,9 @@ check_strx_to_uint64_n_all_chars (void) | |||
2668 | char test_str[] = "0123"; | 2661 | char test_str[] = "0123"; |
2669 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ | 2662 | test_str[0] = (char) (unsigned char) c; /* replace first char with non-digit char */ |
2670 | 2663 | ||
2671 | printf ( | 2664 | printf ("PASSED: MHD_strx_to_uint64_n_(\"%s\", 0..5, &ret_val) == 0, " |
2672 | "PASSED: MHD_strx_to_uint64_n_(\"%s\", 0..5, &ret_val) == 0, value of ret_val is unmodified\n", | 2665 | "value of ret_val is unmodified\n", |
2673 | n_prnt (test_str)); | 2666 | n_prnt (test_str)); |
2674 | } | 2667 | } |
2675 | } | 2668 | } |
2676 | } | 2669 | } |
@@ -2736,12 +2729,11 @@ check_strx_to_uint64_n_overflow (void) | |||
2736 | } | 2729 | } |
2737 | } | 2730 | } |
2738 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 2731 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
2739 | printf ( | 2732 | printf ("PASSED: MHD_strx_to_uint64_n_(\"%s\", %" PRIuPTR "..%" PRIuPTR |
2740 | "PASSED: MHD_strx_to_uint64_n_(\"%s\", %" PRIuPTR "..%" PRIuPTR | 2733 | ", &ret_val) == 0," |
2741 | ", &ret_val) == 0," | 2734 | " value of ret_val is unmodified\n", n_prnt (t->str), |
2742 | " value of ret_val is unmodified\n", n_prnt (t->str), | 2735 | (uintptr_t) t->len, |
2743 | (uintptr_t) t->len, | 2736 | (uintptr_t) t->len + 1); |
2744 | (uintptr_t) t->len + 1); | ||
2745 | } | 2737 | } |
2746 | } | 2738 | } |
2747 | return t_failed; | 2739 | return t_failed; |
@@ -2806,11 +2798,10 @@ check_strx_to_uint64_n_no_val (void) | |||
2806 | } | 2798 | } |
2807 | } | 2799 | } |
2808 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) | 2800 | if ((verbose > 1) && (j == locale_name_count - 1) && ! c_failed[i]) |
2809 | printf ( | 2801 | printf ("PASSED: MHD_strx_to_uint64_n_(\"%s\", 0..%" PRIuPTR |
2810 | "PASSED: MHD_strx_to_uint64_n_(\"%s\", 0..%" PRIuPTR | 2802 | ", &ret_val) == 0," |
2811 | ", &ret_val) == 0," | 2803 | " value of ret_val is unmodified\n", n_prnt (t->str), |
2812 | " value of ret_val is unmodified\n", n_prnt (t->str), | 2804 | (uintptr_t) t->len + 1); |
2813 | (uintptr_t) t->len + 1); | ||
2814 | } | 2805 | } |
2815 | } | 2806 | } |
2816 | return t_failed; | 2807 | return t_failed; |
@@ -2847,8 +2838,8 @@ run_str_to_X_tests (void) | |||
2847 | "FAILED: testcase check_str_to_uint64_all_chars() failed.\n\n"); | 2838 | "FAILED: testcase check_str_to_uint64_all_chars() failed.\n\n"); |
2848 | } | 2839 | } |
2849 | else if (verbose > 1) | 2840 | else if (verbose > 1) |
2850 | printf ( | 2841 | printf ("PASSED: testcase check_str_to_uint64_all_chars() " |
2851 | "PASSED: testcase check_str_to_uint64_all_chars() successfully passed.\n\n"); | 2842 | "successfully passed.\n\n"); |
2852 | 2843 | ||
2853 | res = check_str_to_uint64_overflow (); | 2844 | res = check_str_to_uint64_overflow (); |
2854 | if (res != 0) | 2845 | if (res != 0) |
@@ -2858,8 +2849,8 @@ run_str_to_X_tests (void) | |||
2858 | "FAILED: testcase check_str_to_uint64_overflow() failed.\n\n"); | 2849 | "FAILED: testcase check_str_to_uint64_overflow() failed.\n\n"); |
2859 | } | 2850 | } |
2860 | else if (verbose > 1) | 2851 | else if (verbose > 1) |
2861 | printf ( | 2852 | printf ("PASSED: testcase check_str_to_uint64_overflow() " |
2862 | "PASSED: testcase check_str_to_uint64_overflow() successfully passed.\n\n"); | 2853 | "successfully passed.\n\n"); |
2863 | 2854 | ||
2864 | res = check_str_to_uint64_no_val (); | 2855 | res = check_str_to_uint64_no_val (); |
2865 | if (res != 0) | 2856 | if (res != 0) |
@@ -2869,8 +2860,8 @@ run_str_to_X_tests (void) | |||
2869 | "FAILED: testcase check_str_to_uint64_no_val() failed.\n\n"); | 2860 | "FAILED: testcase check_str_to_uint64_no_val() failed.\n\n"); |
2870 | } | 2861 | } |
2871 | else if (verbose > 1) | 2862 | else if (verbose > 1) |
2872 | printf ( | 2863 | printf ("PASSED: testcase check_str_to_uint64_no_val() " |
2873 | "PASSED: testcase check_str_to_uint64_no_val() successfully passed.\n\n"); | 2864 | "successfully passed.\n\n"); |
2874 | 2865 | ||
2875 | if (str_to_uint64_fails) | 2866 | if (str_to_uint64_fails) |
2876 | fprintf (stderr, | 2867 | fprintf (stderr, |
@@ -2878,8 +2869,8 @@ run_str_to_X_tests (void) | |||
2878 | (unsigned long) str_to_uint64_fails, | 2869 | (unsigned long) str_to_uint64_fails, |
2879 | str_to_uint64_fails == 1 ? "" : "s"); | 2870 | str_to_uint64_fails == 1 ? "" : "s"); |
2880 | else if (verbose > 0) | 2871 | else if (verbose > 0) |
2881 | printf ( | 2872 | printf ("PASSED: function MHD_str_to_uint64_() successfully " |
2882 | "PASSED: function MHD_str_to_uint64_() successfully passed all checks.\n\n"); | 2873 | "passed all checks.\n\n"); |
2883 | 2874 | ||
2884 | res = check_str_to_uint64_n_valid (); | 2875 | res = check_str_to_uint64_n_valid (); |
2885 | if (res != 0) | 2876 | if (res != 0) |
@@ -2889,8 +2880,8 @@ run_str_to_X_tests (void) | |||
2889 | "FAILED: testcase check_str_to_uint64_n_valid() failed.\n\n"); | 2880 | "FAILED: testcase check_str_to_uint64_n_valid() failed.\n\n"); |
2890 | } | 2881 | } |
2891 | else if (verbose > 1) | 2882 | else if (verbose > 1) |
2892 | printf ( | 2883 | printf ("PASSED: testcase check_str_to_uint64_n_valid() " |
2893 | "PASSED: testcase check_str_to_uint64_n_valid() successfully passed.\n\n"); | 2884 | "successfully passed.\n\n"); |
2894 | 2885 | ||
2895 | res = check_str_to_uint64_n_all_chars (); | 2886 | res = check_str_to_uint64_n_all_chars (); |
2896 | if (res != 0) | 2887 | if (res != 0) |
@@ -2900,8 +2891,8 @@ run_str_to_X_tests (void) | |||
2900 | "FAILED: testcase check_str_to_uint64_n_all_chars() failed.\n\n"); | 2891 | "FAILED: testcase check_str_to_uint64_n_all_chars() failed.\n\n"); |
2901 | } | 2892 | } |
2902 | else if (verbose > 1) | 2893 | else if (verbose > 1) |
2903 | printf ( | 2894 | printf ("PASSED: testcase check_str_to_uint64_n_all_chars() " |
2904 | "PASSED: testcase check_str_to_uint64_n_all_chars() successfully passed.\n\n"); | 2895 | "successfully passed.\n\n"); |
2905 | 2896 | ||
2906 | res = check_str_to_uint64_n_overflow (); | 2897 | res = check_str_to_uint64_n_overflow (); |
2907 | if (res != 0) | 2898 | if (res != 0) |
@@ -2911,8 +2902,8 @@ run_str_to_X_tests (void) | |||
2911 | "FAILED: testcase check_str_to_uint64_n_overflow() failed.\n\n"); | 2902 | "FAILED: testcase check_str_to_uint64_n_overflow() failed.\n\n"); |
2912 | } | 2903 | } |
2913 | else if (verbose > 1) | 2904 | else if (verbose > 1) |
2914 | printf ( | 2905 | printf ("PASSED: testcase check_str_to_uint64_n_overflow() " |
2915 | "PASSED: testcase check_str_to_uint64_n_overflow() successfully passed.\n\n"); | 2906 | "successfully passed.\n\n"); |
2916 | 2907 | ||
2917 | res = check_str_to_uint64_n_no_val (); | 2908 | res = check_str_to_uint64_n_no_val (); |
2918 | if (res != 0) | 2909 | if (res != 0) |
@@ -2922,8 +2913,8 @@ run_str_to_X_tests (void) | |||
2922 | "FAILED: testcase check_str_to_uint64_n_no_val() failed.\n\n"); | 2913 | "FAILED: testcase check_str_to_uint64_n_no_val() failed.\n\n"); |
2923 | } | 2914 | } |
2924 | else if (verbose > 1) | 2915 | else if (verbose > 1) |
2925 | printf ( | 2916 | printf ("PASSED: testcase check_str_to_uint64_n_no_val() " |
2926 | "PASSED: testcase check_str_to_uint64_n_no_val() successfully passed.\n\n"); | 2917 | "successfully passed.\n\n"); |
2927 | 2918 | ||
2928 | if (str_to_uint64_n_fails) | 2919 | if (str_to_uint64_n_fails) |
2929 | fprintf (stderr, | 2920 | fprintf (stderr, |
@@ -2931,8 +2922,8 @@ run_str_to_X_tests (void) | |||
2931 | (unsigned long) str_to_uint64_n_fails, | 2922 | (unsigned long) str_to_uint64_n_fails, |
2932 | str_to_uint64_n_fails == 1 ? "" : "s"); | 2923 | str_to_uint64_n_fails == 1 ? "" : "s"); |
2933 | else if (verbose > 0) | 2924 | else if (verbose > 0) |
2934 | printf ( | 2925 | printf ("PASSED: function MHD_str_to_uint64_n_() successfully " |
2935 | "PASSED: function MHD_str_to_uint64_n_() successfully passed all checks.\n\n"); | 2926 | "passed all checks.\n\n"); |
2936 | 2927 | ||
2937 | res = check_strx_to_uint32_valid (); | 2928 | res = check_strx_to_uint32_valid (); |
2938 | if (res != 0) | 2929 | if (res != 0) |
@@ -2942,8 +2933,8 @@ run_str_to_X_tests (void) | |||
2942 | "FAILED: testcase check_strx_to_uint32_valid() failed.\n\n"); | 2933 | "FAILED: testcase check_strx_to_uint32_valid() failed.\n\n"); |
2943 | } | 2934 | } |
2944 | else if (verbose > 1) | 2935 | else if (verbose > 1) |
2945 | printf ( | 2936 | printf ("PASSED: testcase check_strx_to_uint32_valid() " |
2946 | "PASSED: testcase check_strx_to_uint32_valid() successfully passed.\n\n"); | 2937 | "successfully passed.\n\n"); |
2947 | 2938 | ||
2948 | res = check_strx_to_uint32_all_chars (); | 2939 | res = check_strx_to_uint32_all_chars (); |
2949 | if (res != 0) | 2940 | if (res != 0) |
@@ -2953,8 +2944,8 @@ run_str_to_X_tests (void) | |||
2953 | "FAILED: testcase check_strx_to_uint32_all_chars() failed.\n\n"); | 2944 | "FAILED: testcase check_strx_to_uint32_all_chars() failed.\n\n"); |
2954 | } | 2945 | } |
2955 | else if (verbose > 1) | 2946 | else if (verbose > 1) |
2956 | printf ( | 2947 | printf ("PASSED: testcase check_strx_to_uint32_all_chars() " |
2957 | "PASSED: testcase check_strx_to_uint32_all_chars() successfully passed.\n\n"); | 2948 | "successfully passed.\n\n"); |
2958 | 2949 | ||
2959 | res = check_strx_to_uint32_overflow (); | 2950 | res = check_strx_to_uint32_overflow (); |
2960 | if (res != 0) | 2951 | if (res != 0) |
@@ -2964,8 +2955,8 @@ run_str_to_X_tests (void) | |||
2964 | "FAILED: testcase check_strx_to_uint32_overflow() failed.\n\n"); | 2955 | "FAILED: testcase check_strx_to_uint32_overflow() failed.\n\n"); |
2965 | } | 2956 | } |
2966 | else if (verbose > 1) | 2957 | else if (verbose > 1) |
2967 | printf ( | 2958 | printf ("PASSED: testcase check_strx_to_uint32_overflow() " |
2968 | "PASSED: testcase check_strx_to_uint32_overflow() successfully passed.\n\n"); | 2959 | "successfully passed.\n\n"); |
2969 | 2960 | ||
2970 | res = check_strx_to_uint32_no_val (); | 2961 | res = check_strx_to_uint32_no_val (); |
2971 | if (res != 0) | 2962 | if (res != 0) |
@@ -2975,8 +2966,8 @@ run_str_to_X_tests (void) | |||
2975 | "FAILED: testcase check_strx_to_uint32_no_val() failed.\n\n"); | 2966 | "FAILED: testcase check_strx_to_uint32_no_val() failed.\n\n"); |
2976 | } | 2967 | } |
2977 | else if (verbose > 1) | 2968 | else if (verbose > 1) |
2978 | printf ( | 2969 | printf ("PASSED: testcase check_strx_to_uint32_no_val() " |
2979 | "PASSED: testcase check_strx_to_uint32_no_val() successfully passed.\n\n"); | 2970 | "successfully passed.\n\n"); |
2980 | 2971 | ||
2981 | if (strx_to_uint32_fails) | 2972 | if (strx_to_uint32_fails) |
2982 | fprintf (stderr, | 2973 | fprintf (stderr, |
@@ -2984,8 +2975,8 @@ run_str_to_X_tests (void) | |||
2984 | (unsigned long) strx_to_uint32_fails, | 2975 | (unsigned long) strx_to_uint32_fails, |
2985 | strx_to_uint32_fails == 1 ? "" : "s"); | 2976 | strx_to_uint32_fails == 1 ? "" : "s"); |
2986 | else if (verbose > 0) | 2977 | else if (verbose > 0) |
2987 | printf ( | 2978 | printf ("PASSED: function MHD_strx_to_uint32_() successfully " |
2988 | "PASSED: function MHD_strx_to_uint32_() successfully passed all checks.\n\n"); | 2979 | "passed all checks.\n\n"); |
2989 | 2980 | ||
2990 | res = check_strx_to_uint32_n_valid (); | 2981 | res = check_strx_to_uint32_n_valid (); |
2991 | if (res != 0) | 2982 | if (res != 0) |
@@ -2995,8 +2986,8 @@ run_str_to_X_tests (void) | |||
2995 | "FAILED: testcase check_strx_to_uint32_n_valid() failed.\n\n"); | 2986 | "FAILED: testcase check_strx_to_uint32_n_valid() failed.\n\n"); |
2996 | } | 2987 | } |
2997 | else if (verbose > 1) | 2988 | else if (verbose > 1) |
2998 | printf ( | 2989 | printf ("PASSED: testcase check_strx_to_uint32_n_valid() " |
2999 | "PASSED: testcase check_strx_to_uint32_n_valid() successfully passed.\n\n"); | 2990 | "successfully passed.\n\n"); |
3000 | 2991 | ||
3001 | res = check_strx_to_uint32_n_all_chars (); | 2992 | res = check_strx_to_uint32_n_all_chars (); |
3002 | if (res != 0) | 2993 | if (res != 0) |
@@ -3006,8 +2997,8 @@ run_str_to_X_tests (void) | |||
3006 | "FAILED: testcase check_strx_to_uint32_n_all_chars() failed.\n\n"); | 2997 | "FAILED: testcase check_strx_to_uint32_n_all_chars() failed.\n\n"); |
3007 | } | 2998 | } |
3008 | else if (verbose > 1) | 2999 | else if (verbose > 1) |
3009 | printf ( | 3000 | printf ("PASSED: testcase check_strx_to_uint32_n_all_chars() " |
3010 | "PASSED: testcase check_strx_to_uint32_n_all_chars() successfully passed.\n\n"); | 3001 | "successfully passed.\n\n"); |
3011 | 3002 | ||
3012 | res = check_strx_to_uint32_n_overflow (); | 3003 | res = check_strx_to_uint32_n_overflow (); |
3013 | if (res != 0) | 3004 | if (res != 0) |
@@ -3017,8 +3008,8 @@ run_str_to_X_tests (void) | |||
3017 | "FAILED: testcase check_strx_to_uint32_n_overflow() failed.\n\n"); | 3008 | "FAILED: testcase check_strx_to_uint32_n_overflow() failed.\n\n"); |
3018 | } | 3009 | } |
3019 | else if (verbose > 1) | 3010 | else if (verbose > 1) |
3020 | printf ( | 3011 | printf ("PASSED: testcase check_strx_to_uint32_n_overflow() " |
3021 | "PASSED: testcase check_strx_to_uint32_n_overflow() successfully passed.\n\n"); | 3012 | "successfully passed.\n\n"); |
3022 | 3013 | ||
3023 | res = check_strx_to_uint32_n_no_val (); | 3014 | res = check_strx_to_uint32_n_no_val (); |
3024 | if (res != 0) | 3015 | if (res != 0) |
@@ -3028,8 +3019,8 @@ run_str_to_X_tests (void) | |||
3028 | "FAILED: testcase check_strx_to_uint32_n_no_val() failed.\n\n"); | 3019 | "FAILED: testcase check_strx_to_uint32_n_no_val() failed.\n\n"); |
3029 | } | 3020 | } |
3030 | else if (verbose > 1) | 3021 | else if (verbose > 1) |
3031 | printf ( | 3022 | printf ("PASSED: testcase check_strx_to_uint32_n_no_val() " |
3032 | "PASSED: testcase check_strx_to_uint32_n_no_val() successfully passed.\n\n"); | 3023 | "successfully passed.\n\n"); |
3033 | 3024 | ||
3034 | if (strx_to_uint32_n_fails) | 3025 | if (strx_to_uint32_n_fails) |
3035 | fprintf (stderr, | 3026 | fprintf (stderr, |
@@ -3037,8 +3028,8 @@ run_str_to_X_tests (void) | |||
3037 | (unsigned long) strx_to_uint32_n_fails, | 3028 | (unsigned long) strx_to_uint32_n_fails, |
3038 | strx_to_uint32_n_fails == 1 ? "" : "s"); | 3029 | strx_to_uint32_n_fails == 1 ? "" : "s"); |
3039 | else if (verbose > 0) | 3030 | else if (verbose > 0) |
3040 | printf ( | 3031 | printf ("PASSED: function MHD_strx_to_uint32_n_() successfully " |
3041 | "PASSED: function MHD_strx_to_uint32_n_() successfully passed all checks.\n\n"); | 3032 | "passed all checks.\n\n"); |
3042 | 3033 | ||
3043 | res = check_strx_to_uint64_valid (); | 3034 | res = check_strx_to_uint64_valid (); |
3044 | if (res != 0) | 3035 | if (res != 0) |
@@ -3048,8 +3039,8 @@ run_str_to_X_tests (void) | |||
3048 | "FAILED: testcase check_strx_to_uint64_valid() failed.\n\n"); | 3039 | "FAILED: testcase check_strx_to_uint64_valid() failed.\n\n"); |
3049 | } | 3040 | } |
3050 | else if (verbose > 1) | 3041 | else if (verbose > 1) |
3051 | printf ( | 3042 | printf ("PASSED: testcase check_strx_to_uint64_valid() " |
3052 | "PASSED: testcase check_strx_to_uint64_valid() successfully passed.\n\n"); | 3043 | "successfully passed.\n\n"); |
3053 | 3044 | ||
3054 | res = check_strx_to_uint64_all_chars (); | 3045 | res = check_strx_to_uint64_all_chars (); |
3055 | if (res != 0) | 3046 | if (res != 0) |
@@ -3059,8 +3050,8 @@ run_str_to_X_tests (void) | |||
3059 | "FAILED: testcase check_strx_to_uint64_all_chars() failed.\n\n"); | 3050 | "FAILED: testcase check_strx_to_uint64_all_chars() failed.\n\n"); |
3060 | } | 3051 | } |
3061 | else if (verbose > 1) | 3052 | else if (verbose > 1) |
3062 | printf ( | 3053 | printf ("PASSED: testcase check_strx_to_uint64_all_chars() " |
3063 | "PASSED: testcase check_strx_to_uint64_all_chars() successfully passed.\n\n"); | 3054 | "successfully passed.\n\n"); |
3064 | 3055 | ||
3065 | res = check_strx_to_uint64_overflow (); | 3056 | res = check_strx_to_uint64_overflow (); |
3066 | if (res != 0) | 3057 | if (res != 0) |
@@ -3070,8 +3061,8 @@ run_str_to_X_tests (void) | |||
3070 | "FAILED: testcase check_strx_to_uint64_overflow() failed.\n\n"); | 3061 | "FAILED: testcase check_strx_to_uint64_overflow() failed.\n\n"); |
3071 | } | 3062 | } |
3072 | else if (verbose > 1) | 3063 | else if (verbose > 1) |
3073 | printf ( | 3064 | printf ("PASSED: testcase check_strx_to_uint64_overflow() " |
3074 | "PASSED: testcase check_strx_to_uint64_overflow() successfully passed.\n\n"); | 3065 | "successfully passed.\n\n"); |
3075 | 3066 | ||
3076 | res = check_strx_to_uint64_no_val (); | 3067 | res = check_strx_to_uint64_no_val (); |
3077 | if (res != 0) | 3068 | if (res != 0) |
@@ -3081,8 +3072,8 @@ run_str_to_X_tests (void) | |||
3081 | "FAILED: testcase check_strx_to_uint64_no_val() failed.\n\n"); | 3072 | "FAILED: testcase check_strx_to_uint64_no_val() failed.\n\n"); |
3082 | } | 3073 | } |
3083 | else if (verbose > 1) | 3074 | else if (verbose > 1) |
3084 | printf ( | 3075 | printf ("PASSED: testcase check_strx_to_uint64_no_val() " |
3085 | "PASSED: testcase check_strx_to_uint64_no_val() successfully passed.\n\n"); | 3076 | "successfully passed.\n\n"); |
3086 | 3077 | ||
3087 | if (strx_to_uint64_fails) | 3078 | if (strx_to_uint64_fails) |
3088 | fprintf (stderr, | 3079 | fprintf (stderr, |
@@ -3090,8 +3081,8 @@ run_str_to_X_tests (void) | |||
3090 | (unsigned long) strx_to_uint64_fails, | 3081 | (unsigned long) strx_to_uint64_fails, |
3091 | strx_to_uint64_fails == 1 ? "" : "s"); | 3082 | strx_to_uint64_fails == 1 ? "" : "s"); |
3092 | else if (verbose > 0) | 3083 | else if (verbose > 0) |
3093 | printf ( | 3084 | printf ("PASSED: function MHD_strx_to_uint64_() successfully " |
3094 | "PASSED: function MHD_strx_to_uint64_() successfully passed all checks.\n\n"); | 3085 | "passed all checks.\n\n"); |
3095 | 3086 | ||
3096 | res = check_strx_to_uint64_n_valid (); | 3087 | res = check_strx_to_uint64_n_valid (); |
3097 | if (res != 0) | 3088 | if (res != 0) |
@@ -3101,8 +3092,8 @@ run_str_to_X_tests (void) | |||
3101 | "FAILED: testcase check_strx_to_uint64_n_valid() failed.\n\n"); | 3092 | "FAILED: testcase check_strx_to_uint64_n_valid() failed.\n\n"); |
3102 | } | 3093 | } |
3103 | else if (verbose > 1) | 3094 | else if (verbose > 1) |
3104 | printf ( | 3095 | printf ("PASSED: testcase check_strx_to_uint64_n_valid() " |
3105 | "PASSED: testcase check_strx_to_uint64_n_valid() successfully passed.\n\n"); | 3096 | "successfully passed.\n\n"); |
3106 | 3097 | ||
3107 | res = check_strx_to_uint64_n_all_chars (); | 3098 | res = check_strx_to_uint64_n_all_chars (); |
3108 | if (res != 0) | 3099 | if (res != 0) |
@@ -3112,8 +3103,8 @@ run_str_to_X_tests (void) | |||
3112 | "FAILED: testcase check_strx_to_uint64_n_all_chars() failed.\n\n"); | 3103 | "FAILED: testcase check_strx_to_uint64_n_all_chars() failed.\n\n"); |
3113 | } | 3104 | } |
3114 | else if (verbose > 1) | 3105 | else if (verbose > 1) |
3115 | printf ( | 3106 | printf ("PASSED: testcase check_strx_to_uint64_n_all_chars() " |
3116 | "PASSED: testcase check_strx_to_uint64_n_all_chars() successfully passed.\n\n"); | 3107 | "successfully passed.\n\n"); |
3117 | 3108 | ||
3118 | res = check_strx_to_uint64_n_overflow (); | 3109 | res = check_strx_to_uint64_n_overflow (); |
3119 | if (res != 0) | 3110 | if (res != 0) |
@@ -3123,8 +3114,8 @@ run_str_to_X_tests (void) | |||
3123 | "FAILED: testcase check_strx_to_uint64_n_overflow() failed.\n\n"); | 3114 | "FAILED: testcase check_strx_to_uint64_n_overflow() failed.\n\n"); |
3124 | } | 3115 | } |
3125 | else if (verbose > 1) | 3116 | else if (verbose > 1) |
3126 | printf ( | 3117 | printf ("PASSED: testcase check_strx_to_uint64_n_overflow() " |
3127 | "PASSED: testcase check_strx_to_uint64_n_overflow() successfully passed.\n\n"); | 3118 | "successfully passed.\n\n"); |
3128 | 3119 | ||
3129 | res = check_strx_to_uint64_n_no_val (); | 3120 | res = check_strx_to_uint64_n_no_val (); |
3130 | if (res != 0) | 3121 | if (res != 0) |
@@ -3134,8 +3125,8 @@ run_str_to_X_tests (void) | |||
3134 | "FAILED: testcase check_strx_to_uint64_n_no_val() failed.\n\n"); | 3125 | "FAILED: testcase check_strx_to_uint64_n_no_val() failed.\n\n"); |
3135 | } | 3126 | } |
3136 | else if (verbose > 1) | 3127 | else if (verbose > 1) |
3137 | printf ( | 3128 | printf ("PASSED: testcase check_strx_to_uint64_n_no_val() " |
3138 | "PASSED: testcase check_strx_to_uint64_n_no_val() successfully passed.\n\n"); | 3129 | "successfully passed.\n\n"); |
3139 | 3130 | ||
3140 | if (strx_to_uint64_n_fails) | 3131 | if (strx_to_uint64_n_fails) |
3141 | fprintf (stderr, | 3132 | fprintf (stderr, |
@@ -3143,8 +3134,8 @@ run_str_to_X_tests (void) | |||
3143 | (unsigned long) strx_to_uint64_n_fails, | 3134 | (unsigned long) strx_to_uint64_n_fails, |
3144 | strx_to_uint64_n_fails == 1 ? "" : "s"); | 3135 | strx_to_uint64_n_fails == 1 ? "" : "s"); |
3145 | else if (verbose > 0) | 3136 | else if (verbose > 0) |
3146 | printf ( | 3137 | printf ("PASSED: function MHD_strx_to_uint64_n_() successfully " |
3147 | "PASSED: function MHD_strx_to_uint64_n_() successfully passed all checks.\n\n"); | 3138 | "passed all checks.\n\n"); |
3148 | 3139 | ||
3149 | if (str_to_uint64_fails || str_to_uint64_n_fails || | 3140 | if (str_to_uint64_fails || str_to_uint64_n_fails || |
3150 | strx_to_uint32_fails || strx_to_uint32_n_fails || | 3141 | strx_to_uint32_fails || strx_to_uint32_n_fails || |
@@ -4454,8 +4445,8 @@ run_str_from_X_tests (void) | |||
4454 | failures += str_from_uint16; | 4445 | failures += str_from_uint16; |
4455 | } | 4446 | } |
4456 | else if (verbose > 1) | 4447 | else if (verbose > 1) |
4457 | printf ( | 4448 | printf ("PASSED: testcase check_str_from_uint16() successfully " |
4458 | "PASSED: testcase check_str_from_uint16() successfully passed.\n\n"); | 4449 | "passed.\n\n"); |
4459 | 4450 | ||
4460 | str_from_uint64 = check_str_from_uint64 (); | 4451 | str_from_uint64 = check_str_from_uint64 (); |
4461 | if (str_from_uint64 != 0) | 4452 | if (str_from_uint64 != 0) |
@@ -4465,8 +4456,8 @@ run_str_from_X_tests (void) | |||
4465 | failures += str_from_uint64; | 4456 | failures += str_from_uint64; |
4466 | } | 4457 | } |
4467 | else if (verbose > 1) | 4458 | else if (verbose > 1) |
4468 | printf ( | 4459 | printf ("PASSED: testcase check_str_from_uint16() successfully " |
4469 | "PASSED: testcase check_str_from_uint16() successfully passed.\n\n"); | 4460 | "passed.\n\n"); |
4470 | strx_from_uint32 = check_strx_from_uint32 (); | 4461 | strx_from_uint32 = check_strx_from_uint32 (); |
4471 | if (strx_from_uint32 != 0) | 4462 | if (strx_from_uint32 != 0) |
4472 | { | 4463 | { |
@@ -4475,8 +4466,8 @@ run_str_from_X_tests (void) | |||
4475 | failures += strx_from_uint32; | 4466 | failures += strx_from_uint32; |
4476 | } | 4467 | } |
4477 | else if (verbose > 1) | 4468 | else if (verbose > 1) |
4478 | printf ( | 4469 | printf ("PASSED: testcase check_strx_from_uint32() successfully " |
4479 | "PASSED: testcase check_strx_from_uint32() successfully passed.\n\n"); | 4470 | "passed.\n\n"); |
4480 | 4471 | ||
4481 | str_from_uint8_pad = check_str_from_uint8_pad (); | 4472 | str_from_uint8_pad = check_str_from_uint8_pad (); |
4482 | if (str_from_uint8_pad != 0) | 4473 | if (str_from_uint8_pad != 0) |
@@ -4486,8 +4477,8 @@ run_str_from_X_tests (void) | |||
4486 | failures += str_from_uint8_pad; | 4477 | failures += str_from_uint8_pad; |
4487 | } | 4478 | } |
4488 | else if (verbose > 1) | 4479 | else if (verbose > 1) |
4489 | printf ( | 4480 | printf ("PASSED: testcase check_str_from_uint8_pad() successfully " |
4490 | "PASSED: testcase check_str_from_uint8_pad() successfully passed.\n\n"); | 4481 | "passed.\n\n"); |
4491 | 4482 | ||
4492 | if (failures) | 4483 | if (failures) |
4493 | { | 4484 | { |