added test case for bug 28760
[hildon] / ut / hildon-widgets_tests.c
index 624b3fc..ae93bd1 100644 (file)
@@ -54,7 +54,7 @@
 #include <outo.h>
 
 /* Icon which must exist (HildonGridItem). */
-#define VALID_ICON  "Help"
+#define VALID_ICON  "qgn_list_gene_default_app"
 
 /*prototypes to keep the compiler happy*/
 testcase *get_tests(void);
@@ -342,6 +342,8 @@ int test41a(void);
 int test42 (void);
 int test43 (void);
 int test44 (void);
+int test45 (void);
+int test46 (void);
 
 /* this has to be like this (not static). outo
    calls for this! */
@@ -2961,6 +2963,33 @@ int test44 ()
   return 1;
 }
 
+int test45 ()
+{
+  GtkWidget *dialog;
+
+  dialog = hildon_calendar_popup_new (NULL, 1973, 5, 11);
+
+  g_assert (dialog);
+
+  return 1;
+}
+
+int test46 ()
+{
+  GtkWidget *dialog;
+
+  dialog = hildon_add_home_dialog_new (NULL, "oldname", "newname");
+
+  g_assert (dialog);
+
+  dialog = hildon_add_home_dialog_new (NULL, "oldname", NULL);
+
+  g_assert (dialog);
+
+  return 1;
+}
+
+
 testcase tcases[] =
 {
     {*test1a, "hildon_controlbar_new", EXPECT_OK},
@@ -3119,11 +3148,11 @@ testcase tcases[] =
     {*test32a, "hildon_rename_dialog: ok", EXPECT_OK},
     {*test32b, "hildon_rename_dialog: NULL(ok)", EXPECT_OK},
     {*test33a1, "grid_item_new (\"foo\")", EXPECT_OK},
-    {*test33a2, "grid_item_new (NULL)", EXPECT_ASSERT},
+    {*test33a2, "grid_item_new (NULL)", EXPECT_OK},
     {*test33b1, "grid_item_new_label (\"foo\", \"bar\")", EXPECT_OK},
     {*test33b2, "grid_item_new_label (\"foo\", NULL)", EXPECT_OK},
-    {*test33b3, "grid_item_new_label (NULL, \"bar\")", EXPECT_ASSERT},
-    {*test33b4, "grid_item_new_label (NULL, NULL)", EXPECT_ASSERT},
+    {*test33b3, "grid_item_new_label (NULL, \"bar\")", EXPECT_OK},
+    {*test33b4, "grid_item_new_label (NULL, NULL)", EXPECT_OK},
     {*test33c1, "grid_item_set_emblem (foo, \"bar\")", EXPECT_OK},
     {*test33c2, "grid_item_set_emblem (foo, NULL)", EXPECT_OK},
     {*test33c3, "grid_item_set_emblem (NULL, \"bar\")", EXPECT_ASSERT},
@@ -3187,6 +3216,8 @@ testcase tcases[] =
     { test42, "hildon_caption_new", EXPECT_OK },
     { test43, "hildon_get_password_dialog_new", EXPECT_OK },
     { test44, "hildon_get_password_dialog_new_with_default", EXPECT_OK },
+    { test45, "hildon_calendor_popup_new", EXPECT_OK },
+    { test46, "hildon_add_home_dialog_new", EXPECT_OK },
 
     {0} /*REMEMBER THE TERMINATING NULL*/
 };
@@ -3200,5 +3231,3 @@ testcase* get_tests()
     g_log_set_always_fatal (G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
     return tcases;
 }
-
-