[libgweather/benzea/pre-variant-backend-cleanups: 8/13] test: Check that countries have one or more timezones



commit 9572f910b3e15e7f17a2829ae388df08a61c74db
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]