[epiphany] tests: test ephy_bookmarks_set_address
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] tests: test ephy_bookmarks_set_address
- Date: Fri, 7 Sep 2012 22:03:05 +0000 (UTC)
commit 8257cf80b4f63b44b995fa090a66e361dc35629d
Author: Xan Lopez <xan igalia com>
Date: Sat Sep 8 00:02:42 2012 +0200
tests: test ephy_bookmarks_set_address
tests/ephy-bookmarks-test.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/tests/ephy-bookmarks-test.c b/tests/ephy-bookmarks-test.c
index 1fe273f..03bdcf0 100644
--- a/tests/ephy-bookmarks-test.c
+++ b/tests/ephy-bookmarks-test.c
@@ -76,6 +76,26 @@ test_ephy_bookmarks_add ()
clear_bookmark_files ();
}
+static void
+test_ephy_bookmarks_set_address ()
+{
+ EphyBookmarks *bookmarks;
+ EphyNode *node;
+
+ bookmarks = ephy_bookmarks_new ();
+ g_assert (bookmarks);
+ node = ephy_bookmarks_add (bookmarks, "GNOME", "http://www.gnome.org");
+ g_assert (node);
+ ephy_bookmarks_set_address (bookmarks, node, "http://www.google.com");
+ node = ephy_bookmarks_find_bookmark (bookmarks, "http://www.gnome.org");
+ g_assert (node == NULL);
+ node = ephy_bookmarks_find_bookmark (bookmarks, "http://www.google.com");
+ g_assert (node);
+
+ g_object_unref (bookmarks);
+ clear_bookmark_files ();
+}
+
int
main (int argc, char *argv[])
{
@@ -97,6 +117,9 @@ main (int argc, char *argv[])
g_test_add_func ("/src/bookmarks/ephy-bookmarks/add",
test_ephy_bookmarks_add);
+ g_test_add_func ("/src/bookmarks/ephy-bookmarks/set_address",
+ test_ephy_bookmarks_set_address);
+
ret = g_test_run ();
return ret;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]