[libgweather] tests: Simplify weather station duplicates testing
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [libgweather] tests: Simplify weather station duplicates testing
- Date: Thu,  4 Jul 2019 10:28:34 +0000 (UTC)
commit afcfd71643a8aaff47afaa70e4c96c795225a2b2
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Jul 4 12:19:48 2019 +0200
    tests: Simplify weather station duplicates testing
    
    And bump the required glib to 2015's 2.44 version.
 libgweather/test_libgweather.c | 8 ++++++--
 meson.build                    | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/libgweather/test_libgweather.c b/libgweather/test_libgweather.c
index a92bffa..13e5036 100644
--- a/libgweather/test_libgweather.c
+++ b/libgweather/test_libgweather.c
@@ -331,8 +331,12 @@ parse_metar_stations (const char *contents)
         }
 
         if (g_hash_table_lookup (stations_ht, station)) {
-            if (g_str_equal (station, "VOGO") ||
-                g_str_equal (station, "KHQG")) {
+            const char * const known_duplicates[] = {
+                "VOGO",
+                "KHQG",
+                NULL
+            };
+            if (g_strv_contains (known_duplicates, station)) {
                 g_free (station);
                 continue;
             }
diff --git a/meson.build b/meson.build
index 588e201..287e4c8 100644
--- a/meson.build
+++ b/meson.build
@@ -39,7 +39,7 @@ libexecdir = join_paths(prefix, get_option('libexecdir'))
 sysconfdir = join_paths(prefix, get_option('sysconfdir'))
 pkgdatadir = join_paths(datadir, 'libgweather')
 
-glib_req_version = '>= 2.35.1'
+glib_req_version = '>= 2.44.0'
 gtk_req_version = '>= 3.13.5'
 libsoup_req_version = '>= 2.44.0'
 libxml_req_version = '>= 2.6.0'
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]