[libgweather/benzea/wip-variant-backend: 2/13] test: Check that countries have one or more timezones
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/benzea/wip-variant-backend: 2/13] test: Check that countries have one or more timezones
- Date: Mon, 27 Apr 2020 14:07:14 +0000 (UTC)
commit 43092cfb6bb42ff1c8e85d30e7f543a03ec4eea3
Author: Benjamin Berg <bberg redhat com>
Date: Mon Apr 27 16:04:41 2020 +0200
test: Check that countries have one or more timezones
It looks like the test should be inclusive for countries. Changing this
actually makes the test able to catch more errors.
libgweather/test_libgweather.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libgweather/test_libgweather.c b/libgweather/test_libgweather.c
index fba947b3..f482fcbc 100644
--- a/libgweather/test_libgweather.c
+++ b/libgweather/test_libgweather.c
@@ -208,7 +208,7 @@ test_timezone (GWeatherLocation *location)
/* Only countries should have multiple timezones associated */
if ((tzs[0] == NULL && gweather_location_get_level (location) < GWEATHER_LOCATION_WEATHER_STATION) &&
- gweather_location_get_level (location) > GWEATHER_LOCATION_COUNTRY) {
+ gweather_location_get_level (location) >= GWEATHER_LOCATION_COUNTRY) {
g_print ("Location '%s' does not have an associated timezone\n",
gweather_location_get_name (location));
g_test_fail ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]