Return a boolean instead of void.

2006-06-12  Emmanuele Bassi  <ebassi@cvs.gnome.org>

	* glib/gbookmarkfile.h:
	* glib/gbookmarkfile.c (g_bookmark_file_remove_item): Return
	a boolean instead of void.

	* tests/bookmarkfile-test.c (test_modify): Add a test case
	for g_bookmark_file_remove_item().
This commit is contained in:
Emmanuele Bassi
2006-06-12 17:19:13 +00:00
committed by Emmanuele Bassi
parent e39b793341
commit cc37f43d1d
5 changed files with 34 additions and 5 deletions

View File

@@ -193,6 +193,13 @@ test_modify (GBookmarkFile *bookmark)
g_assert (g_bookmark_file_has_group (bookmark, TEST_URI_1, "Test", NULL) == TRUE);
g_assert (g_bookmark_file_has_group (bookmark, TEST_URI_1, "Fail", NULL) == FALSE);
g_print ("ok\n");
g_print ("\t=> check remove...");
g_assert (g_bookmark_file_remove_item (bookmark, TEST_URI_1, &error) == TRUE);
test_assert_empty_error (&error);
g_assert (g_bookmark_file_remove_item (bookmark, TEST_URI_1, &error) == FALSE);
test_assert_not_empty_error (&error, G_BOOKMARK_FILE_ERROR, G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND);
g_print ("ok\n");
return TRUE;
}