[gtk/matthiasc/for-master: 1/11] testsuite: Fix notify test no not fail on the 30th
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 1/11] testsuite: Fix notify test no not fail on the 30th
- Date: Sun, 29 Mar 2020 13:05:03 +0000 (UTC)
commit 8acd9ffc76630ea0119c487ba396daae0c210b5a
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Mar 29 09:01:13 2020 -0400
testsuite: Fix notify test no not fail on the 30th
We are setting the month property to 10 different values,
checking that the change succeeds. But the calendar defaults
to the current date, so on every 30th of the month, we
try to set a date of Febuary 30, which fails.
Lets fix this before the 31st, by setting the calendar
to a good date.
testsuite/gtk/notify.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/testsuite/gtk/notify.c b/testsuite/gtk/notify.c
index 4592b8db32..1c37c8cc66 100644
--- a/testsuite/gtk/notify.c
+++ b/testsuite/gtk/notify.c
@@ -465,6 +465,15 @@ test_type (gconstpointer data)
NULL);
g_object_unref (list_store);
}
+ else if (g_type_is_a (type, GTK_TYPE_CALENDAR))
+ {
+ /* avoid day 30 and 31, since they don't exist in February */
+ instance = g_object_new (type,
+ "year", 1984,
+ "month", 10,
+ "day", 05,
+ NULL);
+ }
/* special casing for singletons */
else if (g_type_is_a (type, GTK_TYPE_NEVER_TRIGGER))
instance = (GObject *) g_object_ref (gtk_never_trigger_get ());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]