[libgweather/ebassi/parallel-tests] tests: Use private API to access the locations database
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/ebassi/parallel-tests] tests: Use private API to access the locations database
- Date: Fri, 19 Nov 2021 18:11:22 +0000 (UTC)
commit 47ff48aa5eafca1f2f5923781758e4bf29e1c246
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Nov 19 17:54:20 2021 +0000
tests: Use private API to access the locations database
Instead of accessing the internals of GWeatherLocation.
libgweather/tests/test_libgweather.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/libgweather/tests/test_libgweather.c b/libgweather/tests/test_libgweather.c
index 023454da..a8fb7a1f 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 ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]