[Libosinfo] [libosinfo PATCH 20/31] test-devicelinklist: Use _linklist_get_targets()

Fabiano Fidêncio fidencio at redhat.com
Fri Nov 23 10:15:09 UTC 2018


Let's replace the only usage of _devicelinklist_get_devices() for its
parent method _linklist_get_targets().

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 tests/test-devicelinklist.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/test-devicelinklist.c b/tests/test-devicelinklist.c
index e689057..e83eb64 100644
--- a/tests/test-devicelinklist.c
+++ b/tests/test-devicelinklist.c
@@ -246,7 +246,10 @@ test_get_devices(void)
     osinfo_list_add(OSINFO_LIST(devlink_list), OSINFO_ENTITY(ent4));
     g_assert_cmpint(osinfo_list_get_length(OSINFO_LIST(devlink_list)), ==, 4);
 
-    dev_list = osinfo_devicelinklist_get_devices(devlink_list, NULL);
+    dev_list = osinfo_devicelist_new();
+    osinfo_linklist_get_targets(OSINFO_LINKLIST(devlink_list),
+                                NULL,
+                                OSINFO_LIST(dev_list));
     g_assert_cmpint(osinfo_list_get_length(OSINFO_LIST(dev_list)), ==, 4);
 
     gboolean has1 = FALSE;
@@ -301,6 +304,7 @@ main(int argc, char *argv[])
     osinfo_device_get_type();
     osinfo_devicelist_get_type();
     osinfo_filter_get_type();
+    osinfo_linklist_get_type();
 
     return g_test_run();
 }
-- 
2.19.1




More information about the Libosinfo mailing list