修复builder 调用方式

This commit is contained in:
2026-08-18 08:49:09 +08:00
parent 24315448f4
commit 97d2d1574b
19 changed files with 525 additions and 372 deletions
+6 -2
View File
@@ -9,8 +9,12 @@ namespace {
TEST(PointState, BuilderAndStateMutationShareOneAuthoritativeState) {
Point_State initial;
initial.style.stroke_width_px = 2.0F;
auto visual = Point_Visual::Builder{initial}.build(
std::vector<Point>{{{1.0F, 2.0F, 3.0F}, {1, 2, 3, 255}, 7.0F}});
auto visual = Point_Visual::Builder(
std::vector<Point>{{{1.0F, 2.0F, 3.0F}, {1, 2, 3, 255}, 7.0F}})
.configure([&](Point_Visual::Properties& properties) {
properties = initial;
})
.build();
ASSERT_TRUE(visual);
EXPECT_EQ(visual->get<&Point_State::style>(), initial.style);
auto changed = initial.style;