summaryrefslogtreecommitdiff
path: root/libgweather/tests
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2021-11-22 21:42:29 +0000
committerEmmanuele Bassi <ebassi@gmail.com>2021-11-23 12:30:11 +0000
commitfedefd99fd2c6f6a2515dddaf72b43d05210af98 (patch)
tree9617a7102a1f73e4b45a6bafdacaae32893cd1eb /libgweather/tests
parent2b3fce1c26abc41d701090da58aa3348889aa260 (diff)
downloadlibgweather-fedefd99fd2c6f6a2515dddaf72b43d05210af98.tar.gz
Remove GWeatherTimezone
GWeatherTimezone can be replaced by GTimeZone, which has been available since GLib 2.26.
Diffstat (limited to 'libgweather/tests')
-rw-r--r--libgweather/tests/timezones.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libgweather/tests/timezones.c b/libgweather/tests/timezones.c
index 98a1da2..5475c22 100644
--- a/libgweather/tests/timezones.c
+++ b/libgweather/tests/timezones.c
@@ -115,13 +115,13 @@ test_named_timezones_deserialized (void)
list = get_list_from_configuration (world, CONFIGURATION, 3);
for (l = list; l != NULL; l = l->next) {
GWeatherLocation *loc = l->data;
- GWeatherTimezone *tz;
+ GTimeZone *tz;
const char *tzid;
tz = gweather_location_get_timezone (loc);
g_assert_nonnull (tz);
- tzid = gweather_timezone_get_tzid (tz);
+ tzid = g_time_zone_get_identifier (tz);
g_assert_nonnull (tzid);
g_object_unref (loc);
@@ -137,12 +137,12 @@ test_named_timezones_deserialized (void)
static void
test_timezone (GWeatherLocation *location)
{
- g_autoptr (GWeatherTimezone) gtz = NULL;
+ g_autoptr (GTimeZone) gtz = NULL;
const char *tz;
tz = gweather_location_get_timezone_str (location);
if (!tz) {
- GWeatherTimezone **tzs;
+ GTimeZone **tzs;
tzs = gweather_location_get_timezones (location);
g_assert_nonnull (tzs);
@@ -158,8 +158,8 @@ test_timezone (GWeatherLocation *location)
return;
}
- gtz = gweather_timezone_get_by_tzid (tz);
- if (!gtz) {
+ gtz = g_time_zone_new_identifier (tz);
+ if (gtz == NULL) {
g_test_message ("Location '%s' has invalid timezone '%s'\n",
gweather_location_get_name (location),
tz);