From ff0d256e9779efa1aef15cfe24aeab0c88fd4337 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Wed, 13 May 2026 08:14:58 -0400 Subject: [PATCH] xo-gc: address some coverage loose ends --- xo-gc/utest/GCObjectStore.test.cpp | 15 +++++++++++++++ xo-object2/src/object2/DList.cpp | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/xo-gc/utest/GCObjectStore.test.cpp b/xo-gc/utest/GCObjectStore.test.cpp index 6c7ed42b..3c82f922 100644 --- a/xo-gc/utest/GCObjectStore.test.cpp +++ b/xo-gc/utest/GCObjectStore.test.cpp @@ -5,6 +5,7 @@ #include "GcosTestutil.hpp" #include +#include #include #include #include @@ -32,6 +33,8 @@ namespace ut { using xo::mm::X1VerifyStats; using xo::mm::AGCObject; using xo::mm::AGCObjectVisitor; + using xo::mm::AGCObjectVisitor; + using xo::mm::DGCObjectStoreVisitor; using xo::mm::Generation; using xo::mm::Role; using xo::mm::object_age; @@ -381,6 +384,18 @@ namespace ut { report_gco.reset(); fixture.report_mm()->clear(); } + + // operate visitor (loose ends revealed by coverage). + // mostly tested by moving objects + { + DGCObjectStoreVisitor visitor(&gcos, Generation::g0()); + auto visitor_fop = obj(&visitor); + + REQUIRE(!visitor_fop.iface()->_has_null_vptr()); + REQUIRE(visitor_fop._typeseq() == typeseq::id()); + + visitor_fop._drop(); + } } } /* loop over test cases */ } /* TEST_CASE(GCObjectStore-1) */ diff --git a/xo-object2/src/object2/DList.cpp b/xo-object2/src/object2/DList.cpp index 98c82a09..54315823 100644 --- a/xo-object2/src/object2/DList.cpp +++ b/xo-object2/src/object2/DList.cpp @@ -143,7 +143,7 @@ namespace xo { { scope log(XO_DEBUG(true), xtag("gc.data", gc.data_)); - xo::mm::mm_do_assign(gc, this, &head_, rhs); + gc.assign_member(this, &head_, rhs); } void