diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2021-11-19 17:54:20 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gmail.com> | 2021-11-19 18:25:44 +0000 |
commit | 161a019815053711521250617d2f5456ee823c35 (patch) | |
tree | a0891f7239febb9313a1b3f8a747e616d2c773ed | |
parent | 2b78434aa0d2c8f9092fa88173ba69c9dc94cb0b (diff) | |
download | libgweather-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.c | 5 |
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 (); |