]> granicus.if.org Git - libexpat/commitdiff
if the test reports a failure message, always display it (it was
authorFred L. Drake, Jr. <fdrake@users.sourceforge.net>
Sat, 1 Jul 2006 14:54:06 +0000 (14:54 +0000)
committerFred L. Drake, Jr. <fdrake@users.sourceforge.net>
Sat, 1 Jul 2006 14:54:06 +0000 (14:54 +0000)
ignored); it makes no sense to ever hide this, so we don't worry about
the verbosity setting for this

expat/tests/minicheck.c

index c059f63135177bb22d05ebd72a96515390beefb9..d2f4295ffb9e35c5eec0dd07360479d3ee06c9b8 100644 (file)
@@ -158,6 +158,12 @@ srunner_run_all(SRunner *runner, int verbosity)
 void
 _fail_unless(int condition, const char *file, int line, char *msg)
 {
+    /* Always print the error message so it isn't lost.  In this case,
+       we have a failure, so there's no reason to be quiet about what
+       it is.
+    */
+    if (msg != NULL)
+        printf("%s", msg);
     longjmp(env, 1);
 }