From f1f951e1d24e3c36ac5c7b4b45977562f48c3380 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 --- utest/GCObjectStore.test.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/utest/GCObjectStore.test.cpp b/utest/GCObjectStore.test.cpp index 6c7ed42b..3c82f922 100644 --- a/utest/GCObjectStore.test.cpp +++ b/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) */