[gtk+] tests: Make the parser fail without assertions
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] tests: Make the parser fail without assertions
- Date: Wed, 18 May 2011 20:30:00 +0000 (UTC)
commit 2b807e574dfac1a534228c0a1a586f28919534d3
Author: Benjamin Otte <otte redhat com>
Date: Thu Apr 14 13:48:06 2011 +0200
tests: Make the parser fail without assertions
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 | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/tests/css/parser/test-css-parser.c b/tests/css/parser/test-css-parser.c
index 8ca86fb..ed1e3e0 100644
--- a/tests/css/parser/test-css-parser.c
+++ b/tests/css/parser/test-css-parser.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]