summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/expat/tests/acc_tests.c
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/expat/tests/acc_tests.c')
-rw-r--r--3rdparty/expat/tests/acc_tests.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/3rdparty/expat/tests/acc_tests.c b/3rdparty/expat/tests/acc_tests.c
index f193aa58a49..b58647a2ab0 100644
--- a/3rdparty/expat/tests/acc_tests.c
+++ b/3rdparty/expat/tests/acc_tests.c
@@ -360,13 +360,16 @@ END_TEST
START_TEST(test_helper_unsigned_char_to_printable) {
// Smoke test
unsigned char uc = 0;
- for (; uc < (unsigned char)-1; uc++) {
+ for (;; uc++) {
set_subtest("char %u", (unsigned)uc);
const char *const printable = unsignedCharToPrintable(uc);
if (printable == NULL)
fail("unsignedCharToPrintable returned NULL");
else if (strlen(printable) < (size_t)1)
fail("unsignedCharToPrintable returned empty string");
+ if (uc == (unsigned char)-1) {
+ break;
+ }
}
// Two concrete samples