mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
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.
This commit is contained in:
parent
ac18330f65
commit
6b019d4dd0
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user