[glib] Improve test coverage of gtimezone.c
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Improve test coverage of gtimezone.c
- Date: Mon, 6 Jun 2011 04:33:14 +0000 (UTC)
commit ae9611839555a6aae975f12cd1103df9014d0579
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jun 6 00:31:52 2011 -0400
Improve test coverage of gtimezone.c
glib/tests/gdatetime.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
index 068d7d3..3d7e985 100644
--- a/glib/tests/gdatetime.c
+++ b/glib/tests/gdatetime.c
@@ -1105,6 +1105,22 @@ test_z (void)
g_free (p);
}
+static void
+test_refresh (void)
+{
+ GTimeZone *zone;
+
+ zone = g_time_zone_new (NULL);
+ g_assert (zone != NULL);
+ g_time_zone_unref (zone);
+
+ g_time_zone_refresh_local ();
+
+ zone = g_time_zone_new (NULL);
+ g_assert (zone != NULL);
+ g_time_zone_unref (zone);
+}
+
gint
main (gint argc,
gchar *argv[])
@@ -1151,6 +1167,7 @@ main (gint argc,
g_test_add_func ("/GDateTime/dst", test_GDateTime_dst);
g_test_add_func ("/GDateTime/test_z", test_z);
g_test_add_func ("/GDateTime/test-all-dates", test_all_dates);
+ g_test_add_func ("/GDateTime/refresh", test_refresh);
return g_test_run ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]