]> sigrok.org Git - libsigrok.git/commitdiff
tests: Fix incomplete fail message for locale tests.
authorFrank Stettner <redacted>
Mon, 19 Feb 2018 14:31:30 +0000 (15:31 +0100)
committerUwe Hermann <redacted>
Wed, 21 Feb 2018 10:37:19 +0000 (11:37 +0100)
tests/strutil.c

index a629486de045a58f86948be5a97570854bb575f2..abc3e897c907bb733de60e5749be008145e7012f 100644 (file)
@@ -37,9 +37,10 @@ static void test_vsnprintf(const char *expected, char *format, ...)
        len = vsnprintf(s, len, format, args);
        va_end(args);
 
-       fail_unless(s != NULL, "len = %i, s = s", len);
+       fail_unless(s != NULL,
+                       "Invalid result for '%s': len = %i.", expected, len);
        fail_unless(!strcmp(s, expected),
-                   "Invalid result for '%s': %s.", expected, s);
+                       "Invalid result for '%s': %s.", expected, s);
        g_free(s);
 }
 #endif
@@ -57,7 +58,8 @@ static void test_sr_vsnprintf_ascii(const char *expected, char *format, ...)
        len = sr_vsnprintf_ascii(s, len, format, args);
        va_end(args);
 
-       fail_unless(s != NULL, "len = %i, s = s", len);
+       fail_unless(s != NULL,
+                       "Invalid result for '%s': len = %i.", expected, len);
        fail_unless(!strcmp(s, expected),
                        "Invalid result for '%s': %s.", expected, s);
        g_free(s);