]> Pileus Git - ~andy/gtk/commitdiff
tests: Make the parser fail without assertions
authorBenjamin Otte <otte@redhat.com>
Thu, 14 Apr 2011 11:48:06 +0000 (13:48 +0200)
committerBenjamin Otte <otte@redhat.com>
Wed, 18 May 2011 20:17:55 +0000 (22:17 +0200)
Use the new g_test_fail() function. This way, the testsuite usually
doesn't crash, but actually finishes.

tests/css/parser/test-css-parser.c

index 8ca86fb662613c8f922f1d683960a48bc6fc3f2a..ed1e3e09a91f89a71b33655a1b241c5c383bcab3 100644 (file)
@@ -193,7 +193,7 @@ test_css_file (GFile *file)
   if (diff && diff[0])
     {
       g_test_message ("%s", diff);
-      g_assert_not_reached ();
+      g_test_fail ();
     }
 
   g_free (css);
@@ -209,13 +209,13 @@ test_css_file (GFile *file)
       if (diff && diff[0])
         {
           g_test_message ("%s", diff);
-          g_assert_not_reached ();
+          g_test_fail ();
         }
     }
   else if (errors->str[0])
     {
       g_test_message ("Unexpected errors:\n%s", errors->str);
-      g_assert_not_reached ();
+      g_test_fail ();
     }
 
   g_free (errors_file);