test: walls r1 review — tests and tools

Ref #52
This commit is contained in:
2026-11-20 08:59:24 +01:00
parent e1a5b297e4
commit 38941da003
14 changed files with 329 additions and 69 deletions
+12
View File
@@ -347,6 +347,18 @@ suite "validation (DESIGN 6.1 `wall.*`)":
check resolveWall(plain, none(Preset),
WallSettings(blocksSight: some(false), sightDir: some(sdLeft))).isNone
test "storable is the last gate: a secret or locked non-door is refused":
# `resolveWall` already refuses a named door-only setting on a non-door; `storable` is the
# backstop for every other caller (the importer, a future entry point), so it must say no to a
# record no path could build.
var r = defaultWall((0.0, 0.0), (10.0, 0.0))
check storable(r)
r.secret = true
check not storable(r)
r.secret = false
r.locked = true
check not storable(r)
test "a label is 1..64 code points, trimmed and free of control characters (#55)":
let (conn, d) = freshScene()
defer: