]> git.0d.be Git - empathy.git/commitdiff
empathy-parser-test: stop as soon a test fails
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 8 Jun 2010 14:50:09 +0000 (16:50 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 8 Jun 2010 15:33:56 +0000 (17:33 +0200)
That's much easier to spot the test failing.

tests/empathy-parser-test.c

index 9562a37dd3162aa42779b541506c4bf63887982f..e767852fdf763a90f189206ffb1f2e9be6b14d49 100644 (file)
@@ -106,7 +106,6 @@ test_parsers (void)
       {NULL, NULL}
     };
   guint i;
-  gboolean failed = FALSE;
 
   DEBUG ("Started");
   for (i = 0; tests[i] != NULL; i += 2)
@@ -119,13 +118,10 @@ test_parsers (void)
 
       ok = !tp_strdiff (tests[i + 1], string->str);
       DEBUG ("'%s' => '%s': %s", tests[i], string->str, ok ? "OK" : "FAILED");
-      if (!ok)
-        failed = TRUE;
+      g_assert (ok);
 
       g_string_free (string, TRUE);
     }
-
-  g_assert (!failed);
 }
 
 int