about summary refs log tree commit diff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/tst-ldbl-error.c9
-rw-r--r--misc/tst-ldbl-warn.c6
2 files changed, 2 insertions, 13 deletions
diff --git a/misc/tst-ldbl-error.c b/misc/tst-ldbl-error.c
index a02cb2772a..76b2c8f784 100644
--- a/misc/tst-ldbl-error.c
+++ b/misc/tst-ldbl-error.c
@@ -95,14 +95,7 @@ do_one_test (void *callback, const char *expected, ...)
   message = strstr (result.err.buffer, needle);
 
   /* Verify that the output message is as expected.  */
-  if (strcmp (message, expected) != 0)
-    {
-      support_record_failure ();
-      printf ("error:\n"
-	      "    expected: '%s'\n"
-	      "      actual: '%s'\n",
-	      expected, message);
-    }
+  TEST_COMPARE_STRING (message, expected);
 
   va_end (args);
 }
diff --git a/misc/tst-ldbl-warn.c b/misc/tst-ldbl-warn.c
index 3ac0e4c873..69a528755c 100644
--- a/misc/tst-ldbl-warn.c
+++ b/misc/tst-ldbl-warn.c
@@ -61,11 +61,7 @@ do_one_test (int select, const char *format, va_list args,
 
   /* Close the in-memory stream and check the output buffer.  */
   xfclose_memstream (&stream);
-  if (strcmp (stream.buffer, expected) != 0)
-    FAIL_EXIT1 ("error:\n"
-		"    expected: '%s'\n"
-		"      actual: '%s'\n",
-		expected, stream.buffer);
+  TEST_COMPARE_STRING (stream.buffer, expected);
 
   if (stream.buffer != NULL)
     free (stream.buffer);