[geocode-glib] test: Add test for the radix difference
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geocode-glib] test: Add test for the radix difference
- Date: Sun, 25 Nov 2012 02:02:07 +0000 (UTC)
commit 4ab3ac60f4dfdfcd5b5c1f99147396862416bba3
Author: Bastien Nocera <hadess hadess net>
Date: Sun Nov 25 02:18:14 2012 +0100
test: Add test for the radix difference
Note that we cannot directly compare the long/lat with the
expected results because
37.614970999999002 != 37.614971
Sigh.
geocode-glib/test-gcglib.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/geocode-glib/test-gcglib.c b/geocode-glib/test-gcglib.c
index 7fdb7ff..20acced 100644
--- a/geocode-glib/test-gcglib.c
+++ b/geocode-glib/test-gcglib.c
@@ -260,6 +260,8 @@ test_locale (void)
loc = res->data;
g_assert_cmpstr (loc->description, ==, "Moskva");
+ g_assert_cmpfloat (loc->latitude - 37.614971, <, 0.000001);
+ g_assert_cmpfloat (loc->longitude - 55.756950, <, 0.000001);
g_list_free_full (res, (GDestroyNotify) geocode_location_free);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]