diff options
Diffstat (limited to 'tests/rendernode.c')
-rw-r--r-- | tests/rendernode.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/tests/rendernode.c b/tests/rendernode.c index 786cc6d050..d0e3230663 100644 --- a/tests/rendernode.c +++ b/tests/rendernode.c @@ -14,15 +14,26 @@ static GOptionEntry options[] = { }; static void -deserialize_error_func (const GtkCssSection *section, - const GError *error, - gpointer user_data) +deserialize_error_func (const GskParseLocation *start, + const GskParseLocation *end, + const GError *error, + gpointer user_data) { - char *section_str = gtk_css_section_to_string (section); + GString *string = g_string_new ("<data>"); - g_warning ("Error at %s: %s", section_str, error->message); + g_string_append_printf (string, ":%zu:%zu", + start->lines + 1, start->line_chars + 1); + if (start->lines != end->lines || start->line_chars != end->line_chars) + { + g_string_append (string, "-"); + if (start->lines != end->lines) + g_string_append_printf (string, "%zu:", end->lines + 1); + g_string_append_printf (string, "%zu", end->line_chars + 1); + } + + g_warning ("Error at %s: %s", string->str, error->message); - g_free (section_str); + g_string_free (string, TRUE); } |