From 0fcdbf007e52e8328cde952d842bfc344c8687b9 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 20 Jun 2011 11:42:36 +0100 Subject: [PATCH 10/14] Use more modern assertions in errors test --- test/errors.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/errors.c b/test/errors.c index ba08595..95a47d9 100644 --- a/test/errors.c +++ b/test/errors.c @@ -52,9 +52,8 @@ test_errors (Fixture *f G_GNUC_UNUSED, dbus_set_g_error (&gerror, &err); g_assert (gerror != NULL); - g_assert (gerror->domain == DBUS_GERROR); - g_assert (gerror->code == DBUS_GERROR_NO_MEMORY); - g_assert (!strcmp (gerror->message, "Out of memory!")); + g_assert_error (gerror, DBUS_GERROR, DBUS_GERROR_NO_MEMORY); + g_assert_cmpstr (gerror->message, ==, "Out of memory!"); dbus_error_init (&err); g_clear_error (&gerror); -- 1.7.5.4