[gtk/improve-css-test-4.6: 4/4] tests: Check the error first
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/improve-css-test-4.6: 4/4] tests: Check the error first
- Date: Fri, 12 Aug 2022 00:10:57 +0000 (UTC)
commit 6b019d4dd0d454cecb0742fe4036d84b9264e18c
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Aug 11 07:18:39 2022 -0400
tests: Check the error first
The error contains useful information when
things fail, so check it first to get useful
output in case of failure.
testsuite/css/data.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/testsuite/css/data.c b/testsuite/css/data.c
index 3a5b722fd0..60cc2661cc 100644
--- a/testsuite/css/data.c
+++ b/testsuite/css/data.c
@@ -81,8 +81,8 @@ test_parse (gconstpointer data)
if (test->contents)
{
- g_assert_nonnull (bytes);
g_assert_no_error (error);
+ g_assert_nonnull (bytes);
if (test->mimetype == NULL)
g_assert_null (mimetype);
else
@@ -94,8 +94,8 @@ test_parse (gconstpointer data)
}
else
{
- g_assert_null (bytes);
g_assert_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_FILENAME);
+ g_assert_null (bytes);
g_error_free (error);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]