@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user