soylent r224 - in trunk: . libsoylent/test



Author: svenp
Date: Mon Jul 14 21:48:54 2008
New Revision: 224
URL: http://svn.gnome.org/viewvc/soylent?rev=224&view=rev

Log:
added tests for people-management

Modified:
   trunk/configure.ac
   trunk/libsoylent/test/test-playground.c

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Mon Jul 14 21:48:54 2008
@@ -114,6 +114,7 @@
 	PKG_CHECK_MODULES(TEST,
 	[
 		glib-2.0
+		libebook-1.2
 	])
 	
 	AC_DEFINE(ENABLE_LIBSOYLENT, 1, [Build libsoylent])

Modified: trunk/libsoylent/test/test-playground.c
==============================================================================
--- trunk/libsoylent/test/test-playground.c	(original)
+++ trunk/libsoylent/test/test-playground.c	Mon Jul 14 21:48:54 2008
@@ -26,17 +26,27 @@
 int
 main (int argc, char **argv)
 {
-  test_init ("Playground");
+  GError *error = NULL;
   
+  test_init ("Playground");
   test_soylent_init ();
   
-  test_print ("foo\n");
+  SlPerson *person = sl_person_new ("Tim");
+  
+  if (!sl_book_add_person (SL_BOOK_DEFAULT, person, &error))
+    {
+      test_fail ("couldn't add person to addressbook: %s", error->message);
+    }
+  
+  g_object_unref (person);
+  
+  /*test_print ("foo\n");
   SlEntity *entity = sl_entity_new ();
   test_print ("%s\n", (gchar *) sl_entity_get (entity, "x"));
   
   SlEntityHandlerEDS *entity_handler = sl_entity_handler_eds_new ();
   sl_entity_handler_eds_get (entity_handler, "foo");
-  sl_entity_handler_get (SL_ENTITY_HANDLER (entity_handler), "foo");
+  sl_entity_handler_get (SL_ENTITY_HANDLER (entity_handler), "foo");*/
   
   test_success ();
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]