From d0496a32450b69ab3c5622c742e0e4384210c4a0 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Fri, 8 May 2026 08:19:31 -0400 Subject: [PATCH] xo-alloc2: tidy for ++ utest coverage --- src/gc/DX1Collector.cpp | 3 ++- utest/Collector.test.cpp | 2 ++ utest/DX1CollectorIterator.test.cpp | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gc/DX1Collector.cpp b/src/gc/DX1Collector.cpp index 7ea97982..3eec1a71 100644 --- a/src/gc/DX1Collector.cpp +++ b/src/gc/DX1Collector.cpp @@ -607,7 +607,8 @@ namespace xo { auto DX1Collector::alloc_copy(value_type src) noexcept -> value_type { - return with_facet::mkobj(this->new_space()).alloc_copy(src); + return this->new_space()->alloc_copy(src); + //return with_facet::mkobj(this->new_space()).alloc_copy(src); } bool diff --git a/utest/Collector.test.cpp b/utest/Collector.test.cpp index ceb277b4..9141b576 100644 --- a/utest/Collector.test.cpp +++ b/utest/Collector.test.cpp @@ -29,6 +29,7 @@ namespace xo { using xo::mm::CollectorTypeRegistry; using xo::mm::AAllocator; using xo::mm::ACollector; + using xo::mm::ICollector_Any; using xo::mm::AGCObject; using xo::mm::X1CollectorConfig; using xo::mm::DX1Collector; @@ -59,6 +60,7 @@ namespace xo { REQUIRE(!gc1); REQUIRE(gc1.iface() != nullptr); REQUIRE(gc1.data() == nullptr); + REQUIRE(gc1._typeseq() == typeseq::id()); } TEST_CASE("DX1Collector-1", "[alloc2][gc][DX1Collector]") diff --git a/utest/DX1CollectorIterator.test.cpp b/utest/DX1CollectorIterator.test.cpp index 4d3ca6c2..e61c6a99 100644 --- a/utest/DX1CollectorIterator.test.cpp +++ b/utest/DX1CollectorIterator.test.cpp @@ -179,6 +179,8 @@ namespace xo { obj ix = range.begin(); obj end_ix = range.end(); + REQUIRE(ix._typeseq() == typeseq::id()); + REQUIRE(end_ix._typeseq() == typeseq::id()); REQUIRE(ix.iface()); REQUIRE(ix.data()); REQUIRE(end_ix.iface());