mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-06 09:26:17 +01:00
tests: Add g_resource_has_children() test for empty path
To get the code branch coverage up to 100% because it’s not that hard. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
6c80db2c24
commit
b5cab7c6b9
@ -1056,6 +1056,7 @@ test_resource_has_children (void)
|
||||
g_assert_true (g_resources_has_children ("/auto_loaded/"));
|
||||
g_assert_false (g_resources_has_children ("/auto_loaded/test1.txt"));
|
||||
g_assert_false (g_resources_has_children ("/no/such/prefix"));
|
||||
g_assert_false (g_resources_has_children (""));
|
||||
|
||||
resource = g_resource_load (g_test_get_filename (G_TEST_BUILT, "test.gresource", NULL), &error);
|
||||
g_assert_nonnull (resource);
|
||||
@ -1065,6 +1066,7 @@ test_resource_has_children (void)
|
||||
g_assert_true (g_resource_has_children (resource, "/a_prefix/"));
|
||||
g_assert_false (g_resource_has_children (resource, "/a_prefix/test2.txt"));
|
||||
g_assert_false (g_resource_has_children (resource, "/no/such/prefix"));
|
||||
g_assert_false (g_resource_has_children (resource, ""));
|
||||
|
||||
g_resource_unref (resource);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user