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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 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

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux