diff options
author | Bastien Nocera <hadess@hadess.net> | 2018-03-08 12:23:51 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2018-03-09 12:10:37 +0100 |
commit | 567211986b53c443897fbe0ab559b7200516f37e (patch) | |
tree | f8d1d92a294c671c0b951a20fce4d5ade45b6f9f | |
parent | ff5b56aacdaf1174049b8930284d2d5cbaffc558 (diff) | |
download | libgweather-567211986b53c443897fbe0ab559b7200516f37e.tar.gz |
tests: Only check city to weather station distances
And not to country or state. As those don't have coordinates anyway,
they would have caused warnings and returned invalid values.
https://bugzilla.gnome.org/show_bug.cgi?id=792328
-rw-r--r-- | libgweather/test_libgweather.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libgweather/test_libgweather.c b/libgweather/test_libgweather.c index 85aa695..5342d35 100644 --- a/libgweather/test_libgweather.c +++ b/libgweather/test_libgweather.c @@ -124,6 +124,8 @@ test_distance (GWeatherLocation *location) double distance; parent = gweather_location_get_parent (location); + if (gweather_location_get_level (parent) < GWEATHER_LOCATION_CITY) + return; distance = gweather_location_get_distance (location, parent); if (distance > TOO_FAR) { |