[geocode-glib] test: Use GeocodeReverse object
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geocode-glib] test: Use GeocodeReverse object
- Date: Sun, 25 Nov 2012 02:01:02 +0000 (UTC)
commit 41046d68f0f9ee95e8caf61d3cdf98652bf49c18
Author: Bastien Nocera <hadess hadess net>
Date: Sat Nov 24 21:12:21 2012 +0100
test: Use GeocodeReverse object
geocode-glib/test-gcglib.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/geocode-glib/test-gcglib.c b/geocode-glib/test-gcglib.c
index f7c4495..d6fe71a 100644
--- a/geocode-glib/test-gcglib.c
+++ b/geocode-glib/test-gcglib.c
@@ -78,18 +78,22 @@ got_geocode_search_cb (GObject *source_object,
static void
test_rev (void)
{
- GeocodeObject *object;
+ GeocodeLocation *loc;
+ GeocodeReverse *rev;
GError *error = NULL;
GHashTable *ht;
- object = geocode_object_new_for_coords (51.237070, -0.589669);
- ht = geocode_object_resolve (object, &error);
+ loc = geocode_location_new (51.237070, -0.589669);
+ rev = geocode_reverse_new_for_location (loc);
+ geocode_location_free (loc);
+
+ ht = geocode_reverse_resolve (rev, &error);
if (ht == NULL) {
g_warning ("Failed at reverse geocoding: %s", error->message);
g_error_free (error);
}
g_assert (ht != NULL);
- g_object_unref (object);
+ g_object_unref (rev);
g_assert (g_strcmp0 (g_hash_table_lookup (ht, "neighborhood"), "Onslow Village") == 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]