mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-23 22:16:16 +01:00
tests: Add more G_RESOURCE_ERROR_NOT_FOUND unit tests
Add coverage for handling of this situation for more API entry points. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3465
This commit is contained in:
parent
7ed386a10b
commit
c5e196f0c0
@ -602,6 +602,20 @@ test_resource_registered (void)
|
||||
g_assert_false (found);
|
||||
g_assert_error (error, G_RESOURCE_ERROR, G_RESOURCE_ERROR_NOT_FOUND);
|
||||
g_clear_error (&error);
|
||||
|
||||
data = g_resources_lookup_data ("/test1.txt",
|
||||
G_RESOURCE_LOOKUP_FLAGS_NONE,
|
||||
&error);
|
||||
g_assert_error (error, G_RESOURCE_ERROR, G_RESOURCE_ERROR_NOT_FOUND);
|
||||
g_assert_null (data);
|
||||
g_clear_error (&error);
|
||||
|
||||
in = g_resources_open_stream ("/test1.txt",
|
||||
G_RESOURCE_LOOKUP_FLAGS_NONE,
|
||||
&error);
|
||||
g_assert_error (error, G_RESOURCE_ERROR, G_RESOURCE_ERROR_NOT_FOUND);
|
||||
g_assert_null (in);
|
||||
g_clear_error (&error);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user