Skip to content

Commit d4cc7f5

Browse files
committed
test(benchmark): Fix GridSpacing initializer in world coords benchmark
Changed GridSpacing({128}) to GridSpacing({128, 128, 128}) in the "Create and destroy World" benchmark. Single-value initializer only sets x-dimension to 128, leaving y and z as 0, which fails coordinate system validation requiring spacing > 0 in all dimensions. Also added .0 suffix to make Real3 type usage explicit. Fixes "Spacing must be positive" benchmark failure.
1 parent 0d7aed4 commit d4cc7f5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/benchmarks/bench_world_coords.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,9 @@ TEST_CASE("World zero-cost abstraction validation",
284284
TEST_CASE("World cache and memory access patterns", "[world][memory][benchmark]") {
285285
SECTION("Sequential world creation and destruction") {
286286
BENCHMARK("Create and destroy World (stack)") {
287-
auto world =
288-
world::create(GridSize({128}), PhysicalOrigin({128}), GridSpacing({128}));
287+
auto world = world::create(GridSize({128, 128, 128}),
288+
PhysicalOrigin({128.0, 128.0, 128.0}),
289+
GridSpacing({128.0, 128.0, 128.0}));
289290
return get_total_size(world);
290291
};
291292

0 commit comments

Comments
 (0)