Parent Issue
Part of #26 (Full Codebase Audit v3)
Category
Testing & Validation (1 day)
Problem
WorldGen should produce identical output for the same seed, but this isn't verified by tests.
Current State
Proposed Tests
test "WorldGen same seed produces identical chunks" {
const gen1 = TerrainGenerator.init(12345, allocator);
const gen2 = TerrainGenerator.init(12345, allocator);
var chunk1 = Chunk.init(0, 0);
var chunk2 = Chunk.init(0, 0);
gen1.generate(&chunk1, null);
gen2.generate(&chunk2, null);
// Compare block data
try testing.expectEqualSlices(BlockType, &chunk1.blocks, &chunk2.blocks);
}
test "WorldGen different seeds produce different chunks" {
// ...
}
test "WorldGen golden output for known seed" {
// Compare against saved expected output
}
Files to Create
src/tests/worldgen_determinism.zig or add to src/tests.zig
Risk
None - pure test addition
Acceptance Criteria
Parent Issue
Part of #26 (Full Codebase Audit v3)
Category
Testing & Validation (1 day)
Problem
WorldGen should produce identical output for the same seed, but this isn't verified by tests.
Current State
Proposed Tests
Files to Create
src/tests/worldgen_determinism.zigor add tosrc/tests.zigRisk
None - pure test addition
Acceptance Criteria