[glib] markup-subparser test: use a real GError domain



commit c48a0d881313676f2c215b30ba2f8674673071ad
Author: Simon McVittie <simon mcvittie collabora co uk>
Date:   Thu Sep 29 15:42:47 2011 +0100

    markup-subparser test: use a real GError domain
    
    Signed-off-by: Simon McVittie <simon mcvittie collabora co uk>
    Reviewed-by: Matthias Clasen <mclasen redhat com>
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=660371

 glib/tests/markup-subparser.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/glib/tests/markup-subparser.c b/glib/tests/markup-subparser.c
index b766ddf..631a61b 100644
--- a/glib/tests/markup-subparser.c
+++ b/glib/tests/markup-subparser.c
@@ -29,7 +29,8 @@ subparser_start_element (GMarkupParseContext  *context,
 
   /* we don't like trouble... */
   if (strcmp (element_name, "trouble") == 0)
-    g_set_error (error, 0, 0, "we don't like trouble");
+    g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
+                 "we don't like trouble");
 }
 
 static void
@@ -88,7 +89,8 @@ subparser_end (GMarkupParseContext  *ctx,
   if (result == NULL || result[0] == '\0')
     {
       g_free (result);
-      g_set_error (error, 0, 0, "got no data");
+      g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
+                   "got no data");
 
       return NULL;
     }
@@ -160,7 +162,8 @@ replay_parser_end (GMarkupParseContext  *ctx,
   if (result == NULL || result[0] == '\0')
     {
       g_free (result);
-      g_set_error (error, 0, 0, "got no data");
+      g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
+                   "got no data");
 
       return NULL;
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]