[kazehakase-svn] [3549] more tests.

Back to archive index

svnno****@sourc***** svnno****@sourc*****
Sat Jan 24 14:57:06 JST 2009


Revision: 3549
          http://svn.sourceforge.jp/view?root=kazehakase&view=rev&rev=3549
Author:   ikezoe
Date:     2009-01-24 14:57:06 +0900 (Sat, 24 Jan 2009)

Log Message:
-----------
more tests.

Modified Paths:
--------------
    kazehakase/trunk/test/test-bookmark.c

Modified: kazehakase/trunk/test/test-bookmark.c
===================================================================
--- kazehakase/trunk/test/test-bookmark.c	2009-01-24 05:43:25 UTC (rev 3548)
+++ kazehakase/trunk/test/test-bookmark.c	2009-01-24 05:57:06 UTC (rev 3549)
@@ -7,6 +7,10 @@
 void test_new_with_attrs (void);
 void test_title (void);
 void test_id (void);
+void test_document_title (void);
+void test_last_modified (void);
+void test_added_time (void);
+void test_last_visited (void);
 
 void
 setup (void)
@@ -45,10 +49,47 @@
 test_id (void)
 {
     cut_trace(test_new_with_attrs());
+    cut_assert_null(kz_bookmark_get_id(bookmark));
     kz_bookmark_set_id(bookmark, "12345");
     cut_assert_equal_string("12345", kz_bookmark_get_id(bookmark));
 }
 
+void
+test_document_title (void)
+{
+    cut_trace(test_new_with_attrs());
+    cut_assert_null(kz_bookmark_get_document_title(bookmark));
+    kz_bookmark_set_document_title(bookmark, "12345");
+    cut_assert_equal_string("12345", kz_bookmark_get_document_title(bookmark));
+}
+
+void
+test_last_modified (void)
+{
+    cut_trace(test_new_with_attrs());
+    cut_assert_equal_uint(0, kz_bookmark_get_last_modified(bookmark));
+    kz_bookmark_set_last_modified(bookmark, 12345);
+    cut_assert_equal_uint(12345, kz_bookmark_get_last_modified(bookmark));
+}
+
+void
+test_last_visited (void)
+{
+    cut_trace(test_new_with_attrs());
+    cut_assert_equal_uint(0, kz_bookmark_get_last_visited(bookmark));
+    kz_bookmark_set_last_visited(bookmark, 12345);
+    cut_assert_equal_uint(12345, kz_bookmark_get_last_visited(bookmark));
+}
+
+void
+test_added_time (void)
+{
+    cut_trace(test_new_with_attrs());
+    cut_assert_equal_uint(0, kz_bookmark_get_added_time(bookmark));
+    kz_bookmark_set_added_time(bookmark, 12345);
+    cut_assert_equal_uint(12345, kz_bookmark_get_added_time(bookmark));
+}
+
 /*
 vi:ts=4:nowrap:ai:expandtab:sw=4
 */



More information about the Kazehakase-cvs mailing list
Back to archive index