Adding missing debian changelog. Modyfying hildon-banner to allow creation with null...
authorMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Thu, 18 Jan 2007 09:00:49 +0000 (09:00 +0000)
committerMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Thu, 18 Jan 2007 09:00:49 +0000 (09:00 +0000)
ChangeLog.2
debian/changelog [new file with mode: 0644]
src/hildon-banner.c
tests/check-hildon-calendar-popup.c
tests/check-hildon-color-button.c
tests/check-hildon-note.c

index 4539574..6b48620 100644 (file)
@@ -1,5 +1,15 @@
 2007-01-18  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
 
+       * debian/changelog: Adding missing.
+
+       * src/hildon-banner.c: Modyfying to allow creation with null window.
+
+       * tests/check-hildon-calendar-popup.c:
+       * tests/check-hildon-color-button.c:
+       * tests/check-hildon-note.c: Fixing the unit tests.
+
+2007-01-18  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
+
        * ChangeLog-hildon-lgpl: Moving to ChangeLog.1.
 
        * ChangeLog.2: Creating from the ChangeLog. Will hold all changelogs
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..f985519
--- /dev/null
@@ -0,0 +1,6 @@
+hildon (0.9.9-1) unstable; urgency=low
+
+  * Unreleased.
+
+ -- Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>  Wed, 01 Jan 2007 12:00:00 +0300
+
index d4ad902..801dce4 100644 (file)
@@ -745,7 +745,6 @@ hildon_banner_show_information                  (GtkWidget *widget,
 {
     HildonBanner *banner;
 
-    g_return_if_fail (GTK_IS_WIDGET(widget));
     g_return_if_fail (icon_name == NULL || icon_name[0] != 0);
     g_return_if_fail (text != NULL);
 
@@ -804,7 +803,6 @@ hildon_banner_show_information_with_markup      (GtkWidget *widget,
 {
     HildonBanner *banner;
 
-    g_return_if_fail (GTK_IS_WIDGET (widget));
     g_return_if_fail (icon_name == NULL || icon_name[0] != 0);
     g_return_if_fail (markup != NULL);
 
@@ -862,7 +860,6 @@ hildon_banner_show_animation                    (GtkWidget *widget,
     GtkWidget *image_widget;
     const gchar *filename;
 
-    g_return_val_if_fail (GTK_IS_WIDGET(widget), NULL);
     g_return_val_if_fail (animation_name == NULL || animation_name[0] != 0, NULL);
     g_return_val_if_fail (text != NULL, NULL);
 
@@ -919,7 +916,6 @@ hildon_banner_show_progress                     (GtkWidget *widget,
     HildonBanner *banner;
     HildonBannerPrivate *priv;
 
-    g_return_val_if_fail (GTK_IS_WIDGET(widget), NULL);
     g_return_val_if_fail (bar == NULL || GTK_IS_PROGRESS_BAR (bar), NULL);
     g_return_val_if_fail (text != NULL, NULL);
 
index b0e076d..3992dfe 100644 (file)
@@ -262,20 +262,7 @@ START_TEST (test_set_get_date_invalid)
 
   g_value_init(&value, G_TYPE_UINT);
 
-  /* Test 1: Test above maximum year limit */
-  max_year = 2050;
-  g_value_set_uint (&value, max_year);
-  g_object_set_property (G_OBJECT (calendar), "max-year", &value);
-  year = max_year + 1;
-  month = 3;
-  day = 30;
-  hildon_calendar_popup_set_date(calendar, year, month, day);
-  hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
-  fail_if(max_year != ret_year, 
-          "hildon-calendar-popup: Set date to %u/%u/%u, with maximum year set to %u, but get date returned year = %u != %u", 
-          year, month, day, max_year, ret_year, max_year);
-
-  /* Test 2: Test under minimum year limit */
+  /* Test 1: Test under minimum year limit */
   min_year = 2000;
   g_value_set_uint (&value, min_year);
   g_object_set_property (G_OBJECT (calendar), "min-year", &value);
@@ -288,7 +275,7 @@ START_TEST (test_set_get_date_invalid)
           "hildon-calendar-popup: Set date to %u/%u/%u, with minimum year set to %u, but get date returned year = %u != %u",
           year, month, day, min_year, ret_year, min_year);
 
-  /* Test 3: Test above maximum month limit */
+  /* Test 2: Test above maximum month limit */
   valid_year = 2006;
   valid_month = 10;
   valid_day = 5;
@@ -312,7 +299,7 @@ START_TEST (test_set_get_date_invalid)
           valid_year, valid_month, valid_day, year, month, day, ret_year, ret_month, ret_day, current_year, current_month, current_day);
 
 
-  /* Test 4: Test under minimum month limit */
+  /* Test 3: Test under minimum month limit */
   valid_year = 2006;
   valid_month = 2;
   valid_day = 15;
@@ -336,7 +323,7 @@ START_TEST (test_set_get_date_invalid)
           valid_year, valid_month, valid_day, year, month, day, ret_year, ret_month, ret_day, current_year, current_month, current_day);
 
 
-  /* Test 5: Test above maximum day limit */
+  /* Test 4: Test above maximum day limit */
 
   /* 31 */
   valid_year = 2005;
@@ -432,7 +419,7 @@ START_TEST (test_set_get_date_invalid)
           "hildon-calendar-popup: Set valid date to %u/%u/%u, then set an invalid date %u/%u/%u, but get date returned %u/%u/%u instead of %u/%u/%u",
           valid_year, valid_month, valid_day, year, month, day, ret_year, ret_month, ret_day, current_year, current_month, current_day);
 
-  /* Test6: Test day minimum limit */
+  /* Test5: Test day minimum limit */
   valid_year = 2005;
   valid_month = 2;
   valid_day = 15;
@@ -455,7 +442,7 @@ START_TEST (test_set_get_date_invalid)
           "hildon-calendar-popup: Set valid date to %u/%u/%u, then set an invalid date %u/%u/%u, but get date returned %u/%u/%u instead of %u/%u/%u",
           valid_year, valid_month, valid_day, year, month, day, ret_year, ret_month, ret_day, current_year, current_month, current_day);
 
-  /* Test7: Test above maximum allowed date */
+  /* Test6: Test above maximum allowed date */
   max_year = 2050;
   g_value_set_uint (&value, max_year);
   g_object_set_property (G_OBJECT (calendar), "max-year", &value);
@@ -472,7 +459,7 @@ START_TEST (test_set_get_date_invalid)
           "hildon-calendar-popup: Set valid date to %u/%u/%u, then set an invalid date %u/%u/%u, with maximum year set to %u, but get date returned %u/%u/%u instead of %u/%u/%u",
           valid_year, valid_month, valid_day, year, month, day, max_year, ret_year, ret_month, ret_day, max_year, month, day);
 
-  /* Test8: Test minimum allowed date */
+  /* Test7: Test minimum allowed date */
   min_year = 2000;
   g_value_set_uint (&value, min_year);
   g_object_set_property (G_OBJECT (calendar), "min-year", &value);
@@ -489,7 +476,7 @@ START_TEST (test_set_get_date_invalid)
           "hildon-calendar-popup: Set valid date to %u/%u/%u, then set an invalid date %u/%u/%u, with minimum year set to %u, but get date returned %u/%u/%u instead of %u/%u/%u",
           valid_year, valid_month, valid_day, year, month, day, min_year, ret_year, ret_month, ret_day, min_year, month, day);
 
-  /* Test9: Set and get date with NULL calendar objects */
+  /* Test8: Set and get date with NULL calendar objects */
   hildon_calendar_popup_set_date(NULL, 2006, 10, 15);
   hildon_calendar_popup_get_date(NULL, &year, &month, &day);
 }
index 6961c89..967b2cd 100644 (file)
@@ -349,12 +349,17 @@ START_TEST (test_set_color_invalid)
   gdk_color_free(b_color);
 
   /* Test 4: Get color from GtkHBox object. */
+  ret_color->red = 99;
+  ret_color->green = 99;
+  ret_color->blue = 99;
   hildon_color_button_get_color((HildonColorButton *) (aux_object), ret_color);
     
-  if (ret_color != NULL) 
+  if (ret_color->red != 99      || 
+      ret_color->green != 99    ||
+      ret_color->blue != 99)
     {
       gtk_widget_destroy(aux_object);
-      fail ("hildon-color-button: get_color must not return any object");
+      fail ("hildon-color-button: get_color must not modify the color when launched on invalid widget");
     }
   
   gtk_widget_destroy(aux_object);
index 7ef0754..a5d9efb 100644 (file)
@@ -158,22 +158,8 @@ START_TEST (test_new_confirmation_invalid)
 
   /* Test 2: create new confirmation note with description set to "NULL" */
   invalid_note = HILDON_NOTE(hildon_note_new_confirmation(n_window,NULL));
-  fail_if(!HILDON_IS_NOTE(invalid_note),
-          "hildon-note: Creation failed with hildon_note_new_confirmation");
-
-  g_object_get_property(G_OBJECT (invalid_note),"description",&value);
-  ret_description = g_value_get_string (&value);
-  fail_if( ret_description != NULL,
-          "hildon-note: Empty description was not set properly on creation. Returned description: %s",
-          ret_description);
-
-  g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
-  note_type = g_value_get_int(&enum_value);
-  fail_if( note_type != HILDON_NOTE_CONFIRMATION_TYPE,
-          "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
-
-  gtk_widget_destroy (GTK_WIDGET (invalid_note));
-  note=NULL;
+  fail_if(HILDON_IS_NOTE(invalid_note),
+          "hildon-note: Creation succeeded with hildon_note_new_confirmation with NULL description");
 
   g_value_unset(&value);
   g_value_unset(&enum_value);
@@ -284,22 +270,8 @@ START_TEST (test_new_information_invalid)
 
   /* Test 2: create new information note with description set to "NULL" */
   invalid_note = HILDON_NOTE(hildon_note_new_information(n_window,NULL));
-  fail_if(!HILDON_IS_NOTE(invalid_note),
-          "hildon-note: Creation failed with hildon_note_new_information");
-
-  g_object_get_property(G_OBJECT (invalid_note),"description",&value);
-  ret_description = g_value_get_string (&value);
-  fail_if( ret_description != NULL,
-          "hildon-note: Empty description was not set properly on creation. Returned description: %s",
-          ret_description);
-
-  g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
-  note_type = g_value_get_int(&enum_value);
-  fail_if( note_type != HILDON_NOTE_INFORMATION_THEME_TYPE,
-          "hildon-note: Type was not set property on creation (HILDON_NOTE_INFORMATION_THEME_TYPE)",note_type);
-
-  gtk_widget_destroy (GTK_WIDGET (invalid_note));
-  note=NULL;
+  fail_if(HILDON_IS_NOTE(invalid_note),
+          "hildon-note: Creation succeeded with hildon_note_new_information where msg == NULL");
 
   g_value_unset(&value);
   g_value_unset(&enum_value);
@@ -438,28 +410,8 @@ START_TEST (test_new_confirmation_with_icon_name_invalid)
 
   /* Test 2: create new confirmation note with description set to "NULL" */
   invalid_note = HILDON_NOTE(hildon_note_new_confirmation_with_icon_name(n_window,NULL,"qgn_list_cp_calibration"));
-  fail_if(!HILDON_IS_NOTE(invalid_note),
-          "hildon-note: Creation failed with hildon_note_new_confirmation_with_icon_name");
-
-  g_object_get_property(G_OBJECT (invalid_note),"description",&value);
-  ret_description = g_value_get_string (&value);
-  fail_if( ret_description!=NULL,
-           "hildon-note: Description \"\" was not set properly on creation. Returned description: %s",
-           ret_description);
-
-  g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
-  note_type = g_value_get_int(&enum_value);
-  fail_if( note_type != HILDON_NOTE_CONFIRMATION_TYPE,
-          "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
-
-  g_object_get_property(G_OBJECT (invalid_note),"icon",&icon_name_value);
-  ret_icon_name = g_value_get_string (&icon_name_value);
-  fail_if( strcmp ("qgn_list_cp_calibration",ret_icon_name) != 0,
-          "hildon-note: Icon name qgn_list_cp_calibration was not set properly on creation. Returned icon name: %s",
-          ret_icon_name);
-
-  gtk_widget_destroy (GTK_WIDGET (invalid_note));
-  note=NULL;
+  fail_if(HILDON_IS_NOTE(invalid_note),
+          "hildon-note: Creation succeeded with hildon_note_new_confirmation_with_icon_name with message == NULL");
 
   g_value_unset(&icon_name_value);
   g_value_unset(&value);
@@ -563,23 +515,8 @@ START_TEST (test_new_cancel_with_progress_bar_invalid)
   /* Test 1: create new confirmation note with description set to NULL */
   description = NULL;
   note = HILDON_NOTE(hildon_note_new_cancel_with_progress_bar(n_window,description,NULL));
-  fail_if(!HILDON_IS_NOTE(note),
-          "hildon-note: Creation failed with hildon_note_new_cancel_with_progress_bar");
-
-  g_object_get_property(G_OBJECT (note),"description",&value);
-  ret_description = g_value_get_string (&value);
-  fail_if( ret_description != NULL,
-          "hildon-note: NULL description was not set properly on creation",
-          description,ret_description);
-
-  g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
-  note_type = g_value_get_int(&enum_value);
-  fail_if( note_type != HILDON_NOTE_PROGRESSBAR_TYPE,
-          "hildon-note: Type was not set property on creation (HILDON_NOTE_PROGRESSBAR_TYPE)",note_type);
-
-  gtk_widget_destroy (GTK_WIDGET (note));
-  note=NULL;
-
+  fail_if(HILDON_IS_NOTE(note),
+          "hildon-note: Creation succeeded with hildon_note_new_cancel_with_progress_bar where msg == NULL");
 
   /* Test 2: create new confirmation note with window set to NULL */
   description = "";