summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2021-11-19 17:54:20 +0000
committerEmmanuele Bassi <ebassi@gmail.com>2021-11-19 18:25:44 +0000
commit161a019815053711521250617d2f5456ee823c35 (patch)
treea0891f7239febb9313a1b3f8a747e616d2c773ed
parent2b78434aa0d2c8f9092fa88173ba69c9dc94cb0b (diff)
downloadlibgweather-161a019815053711521250617d2f5456ee823c35.tar.gz
tests: Use private API to access the locations database
Instead of accessing the internals of GWeatherLocation.
-rw-r--r--libgweather/tests/test_libgweather.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libgweather/tests/test_libgweather.c b/libgweather/tests/test_libgweather.c
index 023454d..a8fb7a1 100644
--- a/libgweather/tests/test_libgweather.c
+++ b/libgweather/tests/test_libgweather.c
@@ -309,9 +309,8 @@ test_walk_world (void)
/* Check that we visited a reasonable number of nodes.
* Due to implicit nearest nodes, this needs to be more than the number
* of DB entries. */
- cur = gweather_location_get_world ();
- g_assert_cmpint (visited, >, cur->db->locations->len);
- g_clear_object (&cur);
+ GWeatherDb *db = gweather_get_db ();
+ g_assert_cmpint (visited, >, db->locations->len);
/* noop, but asserts we did not leak */
gweather_test_reset_world ();