1 /* gimarshallingtestsextra.c
3 * Copyright (C) 2016 Thibault Saunier <tsaunier@gnome.org>
5 * This file is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU Lesser General Public License as
7 * published by the Free Software Foundation; either version 3 of the
8 * License, or (at your option) any later version.
10 * This file is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #include "gimarshallingtestsextra.h"
22 gi_marshalling_tests_compare_two_gerrors_in_gvalue (GValue *v, GValue *v1)
24 GError *error, * error1;
26 g_assert_cmpstr (g_type_name (G_VALUE_TYPE (v)), ==,
27 g_type_name (G_TYPE_ERROR));
28 g_assert_cmpstr (g_type_name (G_VALUE_TYPE (v1)), ==,
29 g_type_name (G_TYPE_ERROR));
31 error = (GError*) g_value_get_boxed (v);
32 error1 = (GError*) g_value_get_boxed (v1);
34 g_assert_cmpint (error->domain, ==, error1->domain);
35 g_assert_cmpint (error->code, ==, error1->code);
36 g_assert_cmpstr (error->message, ==, error1->message);