summaryrefslogtreecommitdiff
path: root/tests/test-itemize.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-itemize.c')
-rw-r--r--tests/test-itemize.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/tests/test-itemize.c b/tests/test-itemize.c
index d66c40d1..167e4e80 100644
--- a/tests/test-itemize.c
+++ b/tests/test-itemize.c
@@ -118,12 +118,8 @@ test_file (const gchar *filename, GString *string)
GList *items, *l;
const char *sep = "";
- if (!g_file_get_contents (filename, &contents, &length, &error))
- {
- fprintf (stderr, "%s\n", error->message);
- g_error_free (error);
- return;
- }
+ g_file_get_contents (filename, &contents, &length, &error);
+ g_assert_no_error (error);
test = contents;
@@ -131,13 +127,8 @@ test_file (const gchar *filename, GString *string)
while (test[0] == '#')
test = strchr (test, '\n') + 1;
-
- if (!pango_parse_markup (test, -1, 0, &attrs, &text, NULL, &error))
- {
- fprintf (stderr, "%s\n", error->message);
- g_error_free (error);
- return;
- }
+ pango_parse_markup (test, -1, 0, &attrs, &text, NULL, &error);
+ g_assert_no_error (error);
s1 = g_string_new ("Items: ");
s2 = g_string_new ("Font: ");
@@ -257,7 +248,8 @@ test_itemize (gconstpointer d)
if (diff && diff[0])
{
- g_printerr ("Contents don't match expected contents:\n%s", diff);
+ g_test_message ("Contents don't match expected contents");
+ g_test_message ("%s", diff);
g_test_fail ();
g_free (diff);
}