[geocode-glib] test-gcglib: Update tests



commit db9b06d5bc3118fd9195a6d69ce20a335d807e93
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Sun Aug 16 15:03:13 2015 +0200

    test-gcglib: Update tests

 geocode-glib/test-gcglib.c |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/geocode-glib/test-gcglib.c b/geocode-glib/test-gcglib.c
index 748e19c..9ce9826 100644
--- a/geocode-glib/test-gcglib.c
+++ b/geocode-glib/test-gcglib.c
@@ -204,8 +204,8 @@ test_xep (void)
        place = res->data;
        loc = geocode_place_get_location (place);
        g_assert (loc != NULL);
-       g_assert_cmpfloat (geocode_location_get_latitude (loc), ==, 51.2371333);
-       g_assert_cmpfloat (geocode_location_get_longitude (loc), ==, -0.5894036);
+       g_assert_cmpfloat (geocode_location_get_latitude (loc), ==, 51.2371416);
+       g_assert_cmpfloat (geocode_location_get_longitude (loc), ==, -0.5894088);
 
        g_object_unref (place);
        g_list_free (res);
@@ -237,7 +237,7 @@ test_pub (void)
        g_assert (loc != NULL);
 
        g_assert_cmpfloat (geocode_location_get_latitude (loc), ==, 51.2368747);
-       g_assert_cmpfloat (geocode_location_get_longitude (loc), ==, -0.5912357);
+       g_assert_cmpfloat (geocode_location_get_longitude (loc), ==, -0.5912356);
 
        g_object_unref (place);
        g_list_free (res);
@@ -318,7 +318,7 @@ test_search_lat_long (void)
        GeocodeLocation *loc;
        GeocodeBoundingBox *bbox;
 
-       object = geocode_forward_new_for_string ("Santa María del Río");
+       object = geocode_forward_new_for_string ("Santa María del Río, San Luis Potosi");
        res = geocode_forward_search (object, &error);
        if (res == NULL) {
                g_warning ("Failed at geocoding: %s", error->message);
@@ -338,11 +338,8 @@ test_search_lat_long (void)
        g_assert_cmpfloat (geocode_location_get_latitude (loc) - 21.801729, <, 0.000001);
        g_assert_cmpfloat (geocode_location_get_longitude (loc) - -100.737418, <, 0.000001);
        g_assert (bbox_includes_location (bbox, geocode_place_get_location (place)));
-       g_assert_cmpstr (geocode_place_get_name (place), ==, "Santa Maria Del Rio, Santa Mar\303\255a del 
Rio, Mexico");
-       g_assert_cmpstr (geocode_place_get_town (place), ==, "Santa Maria Del Rio");
-       g_assert_cmpstr (geocode_place_get_state (place), ==, "San Luis Potosi");
-       g_assert_cmpstr (geocode_place_get_country (place), ==, "Mexico");
-       g_assert_cmpstr (geocode_location_get_description (loc), ==, "Santa Maria Del Rio, Santa Mar\303\255a 
del Rio, Mexico");
+       g_assert_cmpstr (geocode_place_get_name (place), ==, "Santa Mar\303\255a del Rio, Santa Mar\303\255a 
del Rio");
+       g_assert_cmpstr (geocode_location_get_description (loc), ==, "Santa Mar\303\255a del Rio, Santa 
Mar\303\255a del Rio");
 
        g_list_free_full (res, (GDestroyNotify) g_object_unref);
 }


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