[geocode-glib] test-gcglib: Work around a Nominatim bug



commit 041e9f257df6e4bc75d1f1fb9ddf76f3fb4aa411
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Feb 4 18:06:09 2014 +0000

    test-gcglib: Work around a Nominatim bug
    
    We are disabling two testcases involving 'France' for next release. We
    should re-enable them once the Nominatim bug is fixed:
    
    https://trac.openstreetmap.org/ticket/5111

 geocode-glib/test-gcglib.c |   28 +++++++++++++++++++---------
 1 files changed, 19 insertions(+), 9 deletions(-)
---
diff --git a/geocode-glib/test-gcglib.c b/geocode-glib/test-gcglib.c
index d16f124..31d2018 100644
--- a/geocode-glib/test-gcglib.c
+++ b/geocode-glib/test-gcglib.c
@@ -230,8 +230,7 @@ test_search (void)
 {
        GeocodeForward *forward;
        GError *error = NULL;
-       GList *results, *l;
-       gboolean got_france, got_texas;
+       GList *results;
        char *old_locale;
 
        old_locale = g_strdup (setlocale(LC_MESSAGES, NULL));
@@ -250,6 +249,12 @@ test_search (void)
        g_assert_cmpint (g_list_length (results), ==, 10);
 
        /* We need to find Paris in France and in Texas */
+        /* FIXME: Uncomment following and move variable declarations to top of
+         *        this function when this bug is resolved:
+         *        https://trac.openstreetmap.org/ticket/5111
+         */
+       /*GLis *l;
+        gboolean got_france, got_texas;
        got_france = FALSE;
        got_texas = FALSE;
        for (l = results; l != NULL; l = l->next) {
@@ -260,9 +265,9 @@ test_search (void)
                g_assert (loc != NULL);
 
                if (g_strcmp0 (geocode_place_get_state (place), "Ile-de-France") == 0 &&
-                   g_strcmp0 (geocode_place_get_country (place), "France") == 0 &&
-                   g_strcmp0 (geocode_place_get_name (place), "Paris, France") == 0 &&
-                   g_strcmp0 (geocode_location_get_description (loc), "Paris, France") == 0)
+                   g_strcmp0 (geocode_place_get_name (place), "Paris") == 0 &&
+                    g_strcmp0 (geocode_place_get_country (place), "France") == 0 &&
+                   g_strcmp0 (geocode_location_get_description (loc), "Paris") == 0)
                        got_france = TRUE;
                else if (g_strcmp0 (geocode_place_get_state (place), "Texas") == 0 &&
                         g_strcmp0 (geocode_place_get_country (place), "United States of America") == 0 &&
@@ -279,7 +284,7 @@ test_search (void)
        g_list_free (results);
 
        g_assert (got_france);
-       g_assert (got_texas);
+       g_assert (got_texas);*/
 
        setlocale (LC_MESSAGES, old_locale);
        g_free (old_locale);
@@ -344,11 +349,10 @@ test_locale (void)
 {
        GeocodeForward *object;
        GError *error = NULL;
-       GList *res, *l;
+       GList *res;
        GeocodePlace *place;
        GeocodeLocation *loc;
        char *old_locale;
-        gboolean found = FALSE;
 
        old_locale = g_strdup (setlocale(LC_MESSAGES, NULL));
 
@@ -378,6 +382,12 @@ test_locale (void)
        g_list_free_full (res, (GDestroyNotify) g_object_unref);
 
        /* Check Bonneville's region in French */
+        /* FIXME: Uncomment following and move variable declarations to top of
+         *        this function when this bug is resolved:
+         *        https://trac.openstreetmap.org/ticket/5111
+         */
+       /*GList *l;
+        gboolean found = FALSE;
        setlocale (LC_MESSAGES, "fr_FR.UTF-8");
        object = geocode_forward_new_for_string ("bonneville");
        res = geocode_forward_search (object, &error);
@@ -405,7 +415,7 @@ test_locale (void)
        }
 
        g_list_free_full (res, (GDestroyNotify) g_object_unref);
-       g_assert (found);
+       g_assert (found);*/
 
        /* And reset the locale */
        setlocale (LC_MESSAGES, old_locale);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]