devbox run test green: 317 Nim [OK] blocks and 77/77 Node harness tests (migration step 6, the details group, the twelve fault classes). devbox run mutation green: control plus a..au, no survivors, no no-ops.
2620 lines
161 KiB
Plaintext
2620 lines
161 KiB
Plaintext
## control: unmutated copy (must pass)
|
|
[OK] first run creates the single GM and prints a key; re-run prints the same key
|
|
[OK] --new rotates: new key, old key invalid, GM sessions revoked, same player
|
|
[OK] key.create: unnamed player, working key, counts toward the cap
|
|
[OK] key comparison ignores case, dashes and spaces; a wrong key finds nobody
|
|
[OK] six non-GM players are allowed (unused keys count); the cap is a server check
|
|
[OK] key.replace: new key, old key invalid, sessions revoked, identity kept
|
|
[OK] key.replace refuses the GM and unknown ids
|
|
[OK] player.remove deletes key and sessions, frees the slot; the GM cannot be removed
|
|
[OK] only the hash is stored; the token itself appears nowhere
|
|
[OK] unknown hash gives no player; revoking one player leaves the other alone
|
|
[OK] defaults: dev origin, port 9000, state dir run
|
|
[OK] state dir is joined, not concatenated
|
|
[OK] bind address is fixed 127.0.0.1 and not a config key
|
|
[OK] env sets all three keys
|
|
[OK] empty env keys fall back to defaults
|
|
[OK] bad env port is an error, not a default
|
|
[OK] flags override env
|
|
[OK] --key=value and --key value are both accepted
|
|
[OK] trailing slash on the origin and on the state dir is dropped
|
|
[OK] root state dir is not mangled
|
|
[OK] last flag wins
|
|
[OK] unknown flag
|
|
[OK] positional arguments are refused
|
|
[OK] port must be a number in 1..65535
|
|
[OK] origin needs an http(s) scheme and a host
|
|
[OK] origin has no path, query or fragment
|
|
[OK] origin host is a DNS name or IPv4 literal, not arbitrary text
|
|
[OK] origin keeps an explicit port and lowercases the scheme and host
|
|
[OK] state dir must be non-empty
|
|
[OK] --help is not an error and asks for usage, even with a broken env
|
|
[OK] usage lists the three keys and says the bind is fixed
|
|
[OK] 16 reservations succeed, the 17th is refused
|
|
[OK] a cancelled reservation gives the slot back
|
|
[OK] activated connections keep the total cap; removing one frees a slot
|
|
[OK] the 5th connection of one player evicts that player's oldest
|
|
[OK] another player's connections are never evicted
|
|
[OK] the GM is capped like anyone else (caps are per player, not per role)
|
|
[OK] revokePlayer returns every live connection of that player and nothing else
|
|
[OK] remove works by conn id; an unknown id is a no-op
|
|
[OK] connForWs finds the registered socket (mummy hands the same value back)
|
|
[OK] the frame counter starts at 1 on each connection and is never global
|
|
[OK] a removed connection has no next frame number; the caller sends closing with frameNo
|
|
[OK] the intent bucket is per connection: draining one leaves the other full
|
|
[OK] the malformed window is per connection and fires on the tenth frame
|
|
[OK] a Pong is recorded on the right connection
|
|
[OK] a snapshot hands out every live connection without holding the lock afterwards
|
|
[OK] FIPS 180-4 known answers
|
|
[OK] padding boundaries: 55, 56 and 64 byte messages differ and are stable
|
|
[OK] 20 symbols in 5 groups of 4, no look-alike characters
|
|
[OK] 100 generated keys are distinct
|
|
[OK] generator output is upper-case; normalization is case/dash/space insensitive
|
|
[OK] generated keys draw from the whole alphabet (uniform sampling sanity)
|
|
[OK] 32 bytes hex encoded, distinct
|
|
[OK] equal only for identical strings, including the empty case
|
|
[OK] creates the file, sets WAL, synchronous NORMAL, busy_timeout, foreign_keys
|
|
[OK] fresh DB: applies every step, sets user_version and records history
|
|
[OK] re-open is a no-op: no step applied, history and timestamps untouched
|
|
[OK] history and user_version must agree
|
|
[OK] a DB from a newer server is refused, not downgraded
|
|
[OK] a failing step rolls back: no DDL, no history, version unchanged
|
|
[OK] a slice-2 DB migrates on: the scene is seeded, players and keys survive
|
|
[OK] a schema-4 DB migrates on: explored_chunk and entity_status appear, the world survives
|
|
[OK] the chunk bitmap layout is pinned
|
|
[OK] one chunk covers 64x64 cells
|
|
[OK] a dirty chunk carries the whole chunk, not just the new cells
|
|
[OK] a chunk of a map edge keeps out-of-scene cells at zero
|
|
[OK] two chunks in one chunk row are both written
|
|
[OK] a second write to the same chunk replaces the bitmap
|
|
[OK] a chunk row of the wrong size is refused by the schema
|
|
[OK] restore: the stored cells come back exactly
|
|
[OK] restore: two players' explored never mix
|
|
[OK] restore: an empty store restores nothing and a removed player takes its chunks
|
|
[OK] a mutation-scale chunk write stays inside the 4.3 commit budget
|
|
[OK] open space is a circle
|
|
[OK] wall blocks
|
|
[OK] shared endpoint: no leak at the vertex
|
|
[OK] shared vertex: both arms required (mutation d1/d2)
|
|
[OK] '<' apex: ray through the shared tip must not leak
|
|
[OK] every segment endpoint is a polygon vertex (lower and upper end inclusive)
|
|
[OK] rays nudged past a corner: area just beyond a wall end is visible
|
|
[OK] shared endpoint: closed corner of box has no crack
|
|
[OK] collinear walls act as one
|
|
[OK] collinear walls with a gap let light through
|
|
[OK] T-junction: no leak and correct shadow
|
|
[OK] pillar mid-room casts a shadow, sides visible
|
|
[OK] closed door blocks, open door passes
|
|
[OK] token exactly at wall endpoint
|
|
[OK] token at endpoint of free-standing wall sees along it
|
|
[OK] long thin corridor
|
|
[OK] wall endpoints behind the viewer: fan stays angularly ordered
|
|
[OK] radius clips
|
|
[OK] square polygon
|
|
[OK] tiny polygon inside one cell
|
|
[OK] polygon spanning a cell with no vertex in it
|
|
[OK] big polygon includes fully covered interior cells
|
|
[OK] degenerate input: fewer than 3 vertices
|
|
[OK] touching a cell line: inclusive on the max side, not on the bbox minimum side
|
|
[OK] concave polygon: a notch cell is not filled
|
|
[OK] every token in seed sees itself and is not walled in
|
|
[OK] visibilityPolygon and cellsTouched equal the prototype results
|
|
[OK] random visibility polygons: identical cell lists
|
|
[OK] random simple polygons (star-shaped, concave): identical cell lists
|
|
[OK] grid-aligned integer polygons (edges on cell lines): identical cell lists
|
|
[OK] prototype scene, all tokens, doors closed and opened
|
|
[OK] random wall fields, cell 32 and 25
|
|
[OK] negative control: the oracle notices a missing and an invented cell
|
|
[OK] acquires, creates the lock file, releases and re-acquires
|
|
[OK] release is idempotent
|
|
[OK] a secret passed as a field value never appears in the output
|
|
[OK] a secret inside free text, the event name or a nested value is scrubbed too
|
|
[OK] redact() is usable on any string
|
|
[OK] two secrets, one a prefix of the other, are both removed
|
|
[OK] registering a short value is refused: it would shred every line
|
|
[OK] sensitive field names are masked even for unregistered values
|
|
[OK] field names are matched case-insensitively and exactly
|
|
[OK] every line carries an ISO-8601 UTC timestamp, the level and the event
|
|
[OK] values with spaces or quotes are quoted, so one line stays one record
|
|
[OK] a value cannot forge a second log line
|
|
[OK] messages below the level are dropped
|
|
[OK] no fields is still one valid line
|
|
[OK] crossing blocked, parallel ok
|
|
[OK] grazing an endpoint is blocked
|
|
[OK] no leak through shared vertex
|
|
[OK] diagonal squeeze through corner vertex of L
|
|
[OK] moving along a collinear wall is blocked
|
|
[OK] doors
|
|
[OK] zero-length move
|
|
[OK] near pillar: circle overlapping blocked, clear ok (ported)
|
|
[OK] closed door blocks near, open door passes (ported)
|
|
[OK] 64px corridor and doorway passable on the centreline (ported)
|
|
[OK] corner clipping: path passes the wall end closer than r though both ends are clear
|
|
[OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear)
|
|
[OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked
|
|
[OK] leg of the path inside r of a non-start wall blocks even if start and end are clear
|
|
[OK] exactly on a wall: can step off perpendicular, either side, to a clear spot
|
|
[OK] exactly on a wall: still refused when it would stay overlapped or run along/through
|
|
[OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype
|
|
[OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
|
|
[OK] escaping one wall does not excuse another
|
|
[OK] escape from a closed door; an open door never needed an escape
|
|
[OK] overlapping at a wall end: leave past the end without crossing
|
|
[OK] owner check: not yours is mkError, no position
|
|
[OK] GM-controlled token (no owner): players get mkError
|
|
[OK] step cap = scene default without vision, token vision radius with it
|
|
[OK] over-cap, wall, lock-flag and out-of-bounds nacks are identical
|
|
[OK] an accepted move applies and echoes the destination
|
|
[OK] player move honours walls (capsule) via moveToken
|
|
[OK] GM: ignores walls, step cap and the lock; bounds still apply
|
|
[OK] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
[OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does
|
|
[OK] open door added or opened never sets; closing a door on a token pushes it, never sets
|
|
[OK] a stuck token: player moves refused, GM move allowed
|
|
[OK] cleared by removing the wall; unrelated removals keep it
|
|
[OK] cleared by opening the door; a second open is a no-op
|
|
[OK] cleared by the GM; not re-set by itself
|
|
[OK] wall update = remove then add
|
|
[OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear
|
|
[OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
[OK] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
[OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door
|
|
[OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side
|
|
[OK] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
[OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody
|
|
[OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged
|
|
[OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
|
|
[OK] KEEP: wall update away from one of two overlapping walls keeps blocked
|
|
[OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
|
|
[OK] GM drops a token inside a wall -> blocked; a door counts only while closed
|
|
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
|
|
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
|
|
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
|
|
[OK] the overlap test, the escape and the push use the token's own radius
|
|
[OK] a big token is refused where a small one passes, on the same geometry
|
|
[OK] the door push clears the token's own radius
|
|
[OK] a grow that already fits does not move the token
|
|
[OK] grow inside r of a wall pushes it out by the minimal perpendicular distance
|
|
[OK] grow with no room on either side squeezes the token and leaves it in place
|
|
[OK] a squeeze from a failed grow clears when a later shrink ends the overlap
|
|
[OK] a shrink that still overlaps keeps the stuck entry
|
|
[OK] a grow out of a corner relaxes off both walls
|
|
[OK] a grow that would have to cross a wall squeezes instead of jumping through it
|
|
[OK] a grow that would leave the world squeezes instead of teleporting the token
|
|
[OK] resize ignores an out-of-range token index
|
|
[OK] a GM-sourced lock refuses player moves without touching the walls entries
|
|
[OK] a wall added over a GM-locked token only adds the walls entry
|
|
[OK] the GM clear of the walls entries leaves a GM-sourced entry alone (no rule runs)
|
|
[OK] P1: probes longer than the cap get one fixed nack regardless of the scene
|
|
[OK] P2: scenes differing only beyond the bound give identical replies over 3000 probes
|
|
[OK] P3 negative control: a wall inside the disc IS visible through replies (the harness can fail)
|
|
[OK] P4: probing cannot unlock or move a locked token
|
|
[OK] doors beyond the bound: opening or closing them changes no reply
|
|
[OK] 64 keys per bucket, the 65th is refused and nothing changes
|
|
[OK] an existing key can still be overwritten at the cap
|
|
[OK] a key is 1..64 code points, trimmed, with no control characters
|
|
[OK] a value is at most 8 KB of serialized JSON
|
|
[OK] absent and null mean three empty buckets
|
|
[OK] the three bucket names are the only ones accepted
|
|
[OK] the caps are enforced while parsing
|
|
[OK] with no entries every key is accepted in every bucket
|
|
[OK] a registered key is enforced: kind and bucket
|
|
[OK] a schema with no bucket accepts the key anywhere
|
|
[OK] unsetting an absent key is allowed and reports it did nothing
|
|
[OK] buckets are independent: the same key may live in all three
|
|
[OK] propsJson carries all three buckets, always as objects
|
|
[OK] clone gives fresh buckets: editing the copy cannot reach the original
|
|
[OK] normalize repairs nil buckets
|
|
[OK] a well-formed intent parses and keeps its reqId and node
|
|
[OK] reqId boundaries: 0 and 2^31-1 pass, 2^31 and -1 are malformed
|
|
[OK] every unreadable frame is malformed, never an ack
|
|
[OK] a payload that is not UTF-8 is malformed even when it parses as JSON bytes
|
|
[OK] the catalogue is the 29 intents of 6.1 and the built set is a subset
|
|
[OK] role classes: the GM-only set never swallows the intents both roles may send
|
|
[OK] only the built slices' intents answer with a real handler
|
|
[OK] a fresh bucket allows exactly the burst, then refuses
|
|
[OK] refill is continuous at 30/s, capped at the burst
|
|
[OK] the refill never exceeds the burst, however long the connection idles
|
|
[OK] the bucket is per connection and starts full: no shared state
|
|
[OK] nine malformed frames are tolerated, the tenth closes
|
|
[OK] a frame slower than the window does not count: 9 fast + 1 slow is not a flood
|
|
[OK] the window slides: the flood fires again only on a fresh ten inside it
|
|
[OK] a second connection has its own window
|
|
[OK] hello carries proto, role, me and n; an unnamed player's name is null
|
|
[OK] a named recipient's hello carries the scene block, and the GM also `extra`
|
|
[OK] ack ok carries its result fields and never a code
|
|
[OK] a refusal is a static code and no state
|
|
[OK] the uniform move refusal carries pos and no code (5.5, T9)
|
|
[OK] error and closing frames have no reqId
|
|
[OK] the close-code table of 6.5 is the app range plus 1008
|
|
[OK] one wall carries id, a, b, kind, open and flags in the 6.1 shape
|
|
[OK] `walls` is the full list plus the scene, `wall` is one upsert, `wall_gone` an id
|
|
[OK] the fan-out frames carry no n: the sender stamps it per recipient
|
|
[OK] exactly n walls, deterministic per seed, seeds differ
|
|
[OK] doors are every 10th wall, all closed; walls stay inside the world (+- jitter)
|
|
[OK] walls are non-degenerate and axis-ish segments of room-edge length
|
|
[OK] 12 characters from the documented alphabet
|
|
[OK] freshId never returns an id that is taken
|
|
[OK] a name is trimmed, non-empty and free of control characters
|
|
[OK] kind is a short free string
|
|
[OK] vision_radius is a positive finite number or null
|
|
[OK] only a true boolean flag counts
|
|
[OK] the range is the token's own radius when it has vision, else the scene default
|
|
[OK] the effective radius is the scene default in this slice
|
|
[OK] create assigns the id, stores every column and reloads identically
|
|
[OK] a controller round-trips, and a move rewrites only the position
|
|
[OK] update replaces the whole row and keeps the id
|
|
[OK] remove deletes the row; a second remove reports nothing
|
|
[OK] player.remove hands the player's tokens to the GM (DESIGN 3.2)
|
|
[OK] tokens load in creation order
|
|
[OK] an out-of-bounds position writes nothing
|
|
[OK] an empty name writes nothing
|
|
[OK] the same id is never handed out twice by the caller-supplied taken list
|
|
[OK] a lookup by id is exact
|
|
[OK] a per-token radius round-trips and overrides the scene default (5.6)
|
|
[OK] a non-positive radius is refused, and nothing is written
|
|
[OK] the three property buckets round-trip unchanged (6.1, 8)
|
|
[OK] a new token starts with three empty buckets, never null
|
|
[OK] statuses round-trip sorted, and a store replaces them (5.5)
|
|
[OK] removing a token removes its status rows (FK cascade)
|
|
[OK] status helpers keep the entry set unique and ordered
|
|
[OK] every token, in token order, with controller and both names
|
|
[OK] a GM-controlled token shows controller null
|
|
[OK] the GM never gets vision polygons or explored cells
|
|
[OK] the set of tokens follows the visibility rule
|
|
[OK] a player frame carries no GM-only field and no wall-like key
|
|
[OK] the controller gets `mine`, the owner bucket and its vision_radius
|
|
[OK] a scan of every player frame finds no wall-ish or GM-only key
|
|
[OK] the first pass sends the resync order, then nothing changes and nothing is sent
|
|
[OK] a token that moved sends one `token` frame with the new position
|
|
[OK] leaving view sends `token_gone` once, and never for a token that was never sent
|
|
[OK] a token becoming gm_only is taken away from a player who could see it (6.1)
|
|
[OK] vision is re-sent only when the polygons change
|
|
[OK] a changed wall is enough to re-send vision
|
|
[OK] explored full is RLE rows of contiguous columns
|
|
[OK] explored fresh is a list of [cx, cy]
|
|
[OK] the vision payload uses integer pixels (6.4, Q16 FIXED)
|
|
[OK] the hello scene block carries the 6.1 fields and no counts
|
|
[OK] the GM frame carries all three buckets and the source of every status
|
|
[OK] a player who sees the token gets the public bucket only
|
|
[OK] the controller gets public + owner, never the gm bucket
|
|
[OK] the controller is not told what caused a status either (5.5, 6.1 note 6)
|
|
[OK] a prop change and a status change each reach a viewer as one `token` frame
|
|
[OK] a radius change reaches every viewer as the effective radius
|
|
[OK] only the player's own vision tokens produce one, in token order
|
|
[OK] a player with no vision token has no polygons at all
|
|
[OK] the polygon is bounded by the token's range, and a closer wall cuts it
|
|
[OK] the token's own vision_radius overrides the scene default
|
|
[OK] an open door does not block; closing it does (5.1, 5.5)
|
|
[OK] the cells under the polygon are explored, and `fresh` reports them once
|
|
[OK] moving adds cells and never forgets the old ones
|
|
[OK] a closed door hides the cells behind it; opening it adds them
|
|
[OK] each player has their own set; nobody shares explored cells (Q9 FIXED)
|
|
[OK] the full payload is sorted by row and never contains a cell twice
|
|
[OK] ver moves with the polygons and stands still without a change
|
|
[OK] a controlled token is always visible, gm_only included
|
|
[OK] another token needs to be inside the polygon
|
|
[OK] a gm_only token inside the LOS is not visible to anyone else
|
|
[OK] a player with no vision token sees only what they control
|
|
[OK] the migration seeds scene 1 with the v1 defaults, no walls, next_wall_id 1
|
|
[OK] an unknown scene id is not there (the wire answers not-found)
|
|
[OK] a point is exactly two finite numbers, ints included
|
|
[OK] kind, open and flags accept only their own shape
|
|
[OK] undefined and null are the same as an absent field
|
|
[OK] adds count from 1 and the counter advances
|
|
[OK] a removal never renumbers and the next add never reuses the id
|
|
[OK] the id counter survives a reload, even when the newest wall was removed
|
|
[OK] add, update, door set and remove round-trip through a reload
|
|
[OK] authoring runs with synchronous=FULL and leaves NORMAL behind (Q12)
|
|
[OK] a failing write leaves memory and the pragma alone
|
|
[OK] walls load in id order whatever the insertion order was
|
|
[OK] a zero-length wall is invalid and writes nothing
|
|
[OK] both endpoints must be inside [0,w] x [0,h]; the border itself is allowed
|
|
[OK] a wall is never open: the stored row normalizes it
|
|
[OK] update keeps the row's id and open flag unless the kind changes
|
|
[OK] dot patching: only the given fields change
|
|
[OK] unknown ids are not-found, wrong kinds are their own outcome
|
|
[OK] the first wall of a fresh scene is id 1, not 0
|
|
# test exit=0; expected tests failed: 0
|
|
|
|
control: exit=0 expected_failed=0 ok
|
|
## a: remove the +-RayEps rays
|
|
# diff server/geometry.nim -> mutated copy:
|
|
# 62,63d61
|
|
# < angles.add ang - RayEps
|
|
# < angles.add ang + RayEps
|
|
[OK] open space is a circle
|
|
[OK] wall blocks
|
|
[OK] shared endpoint: no leak at the vertex
|
|
[OK] shared vertex: both arms required (mutation d1/d2)
|
|
[OK] '<' apex: ray through the shared tip must not leak
|
|
[OK] every segment endpoint is a polygon vertex (lower and upper end inclusive)
|
|
[FAILED] rays nudged past a corner: area just beyond a wall end is visible
|
|
[OK] shared endpoint: closed corner of box has no crack
|
|
[OK] collinear walls act as one
|
|
[OK] collinear walls with a gap let light through
|
|
[OK] T-junction: no leak and correct shadow
|
|
[OK] pillar mid-room casts a shadow, sides visible
|
|
[OK] closed door blocks, open door passes
|
|
[OK] token exactly at wall endpoint
|
|
[OK] token at endpoint of free-standing wall sees along it
|
|
[OK] long thin corridor
|
|
[OK] wall endpoints behind the viewer: fan stays angularly ordered
|
|
[OK] radius clips
|
|
[OK] square polygon
|
|
[OK] tiny polygon inside one cell
|
|
[OK] polygon spanning a cell with no vertex in it
|
|
[OK] big polygon includes fully covered interior cells
|
|
[OK] degenerate input: fewer than 3 vertices
|
|
[OK] touching a cell line: inclusive on the max side, not on the bbox minimum side
|
|
[OK] concave polygon: a notch cell is not filled
|
|
[OK] every token in seed sees itself and is not walled in
|
|
[FAILED] visibilityPolygon and cellsTouched equal the prototype results
|
|
[OK] random visibility polygons: identical cell lists
|
|
[OK] random simple polygons (star-shaped, concave): identical cell lists
|
|
[OK] grid-aligned integer polygons (edges on cell lines): identical cell lists
|
|
[FAILED] prototype scene, all tokens, doors closed and opened
|
|
[FAILED] random wall fields, cell 32 and 25
|
|
[OK] negative control: the oracle notices a missing and an invented cell
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/a/w/tests/tgeometry'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] rays nudged past a corner: area just beyond a wall end is visible
|
|
|
|
a: exit=1 expected_failed=1 ok
|
|
## b: upper segment end exclusive
|
|
# diff server/geometry.nim -> mutated copy:
|
|
# 39c39
|
|
# < if t > Eps and u >= -Eps and u <= 1 + Eps: t else: Inf
|
|
# ---
|
|
# > if t > Eps and u >= -Eps and u < 1 - Eps: t else: Inf
|
|
[OK] open space is a circle
|
|
[OK] wall blocks
|
|
[OK] shared endpoint: no leak at the vertex
|
|
[OK] shared vertex: both arms required (mutation d1/d2)
|
|
[FAILED] '<' apex: ray through the shared tip must not leak
|
|
[FAILED] every segment endpoint is a polygon vertex (lower and upper end inclusive)
|
|
[OK] rays nudged past a corner: area just beyond a wall end is visible
|
|
[OK] shared endpoint: closed corner of box has no crack
|
|
[OK] collinear walls act as one
|
|
[OK] collinear walls with a gap let light through
|
|
[OK] T-junction: no leak and correct shadow
|
|
[OK] pillar mid-room casts a shadow, sides visible
|
|
[OK] closed door blocks, open door passes
|
|
[OK] token exactly at wall endpoint
|
|
[OK] token at endpoint of free-standing wall sees along it
|
|
[OK] long thin corridor
|
|
[OK] wall endpoints behind the viewer: fan stays angularly ordered
|
|
[OK] radius clips
|
|
[OK] square polygon
|
|
[OK] tiny polygon inside one cell
|
|
[OK] polygon spanning a cell with no vertex in it
|
|
[OK] big polygon includes fully covered interior cells
|
|
[OK] degenerate input: fewer than 3 vertices
|
|
[OK] touching a cell line: inclusive on the max side, not on the bbox minimum side
|
|
[OK] concave polygon: a notch cell is not filled
|
|
[OK] every token in seed sees itself and is not walled in
|
|
[FAILED] visibilityPolygon and cellsTouched equal the prototype results
|
|
[OK] random visibility polygons: identical cell lists
|
|
[OK] random simple polygons (star-shaped, concave): identical cell lists
|
|
[OK] grid-aligned integer polygons (edges on cell lines): identical cell lists
|
|
[OK] prototype scene, all tokens, doors closed and opened
|
|
[OK] random wall fields, cell 32 and 25
|
|
[OK] negative control: the oracle notices a missing and an invented cell
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/b/w/tests/tgeometry'
|
|
# test exit=1; expected tests failed: 2
|
|
[FAILED] '<' apex: ray through the shared tip must not leak
|
|
[FAILED] every segment endpoint is a polygon vertex (lower and upper end inclusive)
|
|
|
|
b: exit=1 expected_failed=2 ok
|
|
## c: lower segment end exclusive
|
|
# diff server/geometry.nim -> mutated copy:
|
|
# 39c39
|
|
# < if t > Eps and u >= -Eps and u <= 1 + Eps: t else: Inf
|
|
# ---
|
|
# > if t > Eps and u > Eps and u <= 1 + Eps: t else: Inf
|
|
[OK] open space is a circle
|
|
[OK] wall blocks
|
|
[OK] shared endpoint: no leak at the vertex
|
|
[OK] shared vertex: both arms required (mutation d1/d2)
|
|
[FAILED] '<' apex: ray through the shared tip must not leak
|
|
[FAILED] every segment endpoint is a polygon vertex (lower and upper end inclusive)
|
|
[OK] rays nudged past a corner: area just beyond a wall end is visible
|
|
[OK] shared endpoint: closed corner of box has no crack
|
|
[OK] collinear walls act as one
|
|
[OK] collinear walls with a gap let light through
|
|
[OK] T-junction: no leak and correct shadow
|
|
[OK] pillar mid-room casts a shadow, sides visible
|
|
[OK] closed door blocks, open door passes
|
|
[OK] token exactly at wall endpoint
|
|
[OK] token at endpoint of free-standing wall sees along it
|
|
[OK] long thin corridor
|
|
[OK] wall endpoints behind the viewer: fan stays angularly ordered
|
|
[OK] radius clips
|
|
[OK] square polygon
|
|
[OK] tiny polygon inside one cell
|
|
[OK] polygon spanning a cell with no vertex in it
|
|
[OK] big polygon includes fully covered interior cells
|
|
[OK] degenerate input: fewer than 3 vertices
|
|
[OK] touching a cell line: inclusive on the max side, not on the bbox minimum side
|
|
[OK] concave polygon: a notch cell is not filled
|
|
[OK] every token in seed sees itself and is not walled in
|
|
[FAILED] visibilityPolygon and cellsTouched equal the prototype results
|
|
[OK] random visibility polygons: identical cell lists
|
|
[OK] random simple polygons (star-shaped, concave): identical cell lists
|
|
[OK] grid-aligned integer polygons (edges on cell lines): identical cell lists
|
|
[FAILED] prototype scene, all tokens, doors closed and opened
|
|
[OK] random wall fields, cell 32 and 25
|
|
[OK] negative control: the oracle notices a missing and an invented cell
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/c/w/tests/tgeometry'
|
|
# test exit=1; expected tests failed: 2
|
|
[FAILED] '<' apex: ray through the shared tip must not leak
|
|
[FAILED] every segment endpoint is a polygon vertex (lower and upper end inclusive)
|
|
|
|
c: exit=1 expected_failed=2 ok
|
|
## d1: shared-vertex fixture without arm 1
|
|
# diff tests/tgeometry.nim -> mutated copy:
|
|
# 43c43
|
|
# < let w = @[arm1, arm2] # SHARED-VERTEX
|
|
# ---
|
|
# > let w = @[arm2]
|
|
[OK] open space is a circle
|
|
[OK] wall blocks
|
|
[OK] shared endpoint: no leak at the vertex
|
|
[FAILED] shared vertex: both arms required (mutation d1/d2)
|
|
[OK] '<' apex: ray through the shared tip must not leak
|
|
[OK] every segment endpoint is a polygon vertex (lower and upper end inclusive)
|
|
[OK] rays nudged past a corner: area just beyond a wall end is visible
|
|
[OK] shared endpoint: closed corner of box has no crack
|
|
[OK] collinear walls act as one
|
|
[OK] collinear walls with a gap let light through
|
|
[OK] T-junction: no leak and correct shadow
|
|
[OK] pillar mid-room casts a shadow, sides visible
|
|
[OK] closed door blocks, open door passes
|
|
[OK] token exactly at wall endpoint
|
|
[OK] token at endpoint of free-standing wall sees along it
|
|
[OK] long thin corridor
|
|
[OK] wall endpoints behind the viewer: fan stays angularly ordered
|
|
[OK] radius clips
|
|
[OK] square polygon
|
|
[OK] tiny polygon inside one cell
|
|
[OK] polygon spanning a cell with no vertex in it
|
|
[OK] big polygon includes fully covered interior cells
|
|
[OK] degenerate input: fewer than 3 vertices
|
|
[OK] touching a cell line: inclusive on the max side, not on the bbox minimum side
|
|
[OK] concave polygon: a notch cell is not filled
|
|
[OK] every token in seed sees itself and is not walled in
|
|
[OK] visibilityPolygon and cellsTouched equal the prototype results
|
|
[OK] random visibility polygons: identical cell lists
|
|
[OK] random simple polygons (star-shaped, concave): identical cell lists
|
|
[OK] grid-aligned integer polygons (edges on cell lines): identical cell lists
|
|
[OK] prototype scene, all tokens, doors closed and opened
|
|
[OK] random wall fields, cell 32 and 25
|
|
[OK] negative control: the oracle notices a missing and an invented cell
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/d1/w/tests/tgeometry'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] shared vertex: both arms required (mutation d1/d2)
|
|
|
|
d1: exit=1 expected_failed=1 ok
|
|
## d2: shared-vertex fixture without arm 2
|
|
# diff tests/tgeometry.nim -> mutated copy:
|
|
# 43c43
|
|
# < let w = @[arm1, arm2] # SHARED-VERTEX
|
|
# ---
|
|
# > let w = @[arm1]
|
|
[OK] open space is a circle
|
|
[OK] wall blocks
|
|
[OK] shared endpoint: no leak at the vertex
|
|
[FAILED] shared vertex: both arms required (mutation d1/d2)
|
|
[OK] '<' apex: ray through the shared tip must not leak
|
|
[OK] every segment endpoint is a polygon vertex (lower and upper end inclusive)
|
|
[OK] rays nudged past a corner: area just beyond a wall end is visible
|
|
[OK] shared endpoint: closed corner of box has no crack
|
|
[OK] collinear walls act as one
|
|
[OK] collinear walls with a gap let light through
|
|
[OK] T-junction: no leak and correct shadow
|
|
[OK] pillar mid-room casts a shadow, sides visible
|
|
[OK] closed door blocks, open door passes
|
|
[OK] token exactly at wall endpoint
|
|
[OK] token at endpoint of free-standing wall sees along it
|
|
[OK] long thin corridor
|
|
[OK] wall endpoints behind the viewer: fan stays angularly ordered
|
|
[OK] radius clips
|
|
[OK] square polygon
|
|
[OK] tiny polygon inside one cell
|
|
[OK] polygon spanning a cell with no vertex in it
|
|
[OK] big polygon includes fully covered interior cells
|
|
[OK] degenerate input: fewer than 3 vertices
|
|
[OK] touching a cell line: inclusive on the max side, not on the bbox minimum side
|
|
[OK] concave polygon: a notch cell is not filled
|
|
[OK] every token in seed sees itself and is not walled in
|
|
[OK] visibilityPolygon and cellsTouched equal the prototype results
|
|
[OK] random visibility polygons: identical cell lists
|
|
[OK] random simple polygons (star-shaped, concave): identical cell lists
|
|
[OK] grid-aligned integer polygons (edges on cell lines): identical cell lists
|
|
[OK] prototype scene, all tokens, doors closed and opened
|
|
[OK] random wall fields, cell 32 and 25
|
|
[OK] negative control: the oracle notices a missing and an invented cell
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/d2/w/tests/tgeometry'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] shared vertex: both arms required (mutation d1/d2)
|
|
|
|
d2: exit=1 expected_failed=1 ok
|
|
## e: cellsTouched without fill spans
|
|
# diff server/geometry.nim -> mutated copy:
|
|
# 138d137
|
|
# < for k in countup(0, xs[row].len - 2, 2): mark(row, xs[row][k], xs[row][k + 1])
|
|
[OK] open space is a circle
|
|
[OK] wall blocks
|
|
[OK] shared endpoint: no leak at the vertex
|
|
[OK] shared vertex: both arms required (mutation d1/d2)
|
|
[OK] '<' apex: ray through the shared tip must not leak
|
|
[OK] every segment endpoint is a polygon vertex (lower and upper end inclusive)
|
|
[OK] rays nudged past a corner: area just beyond a wall end is visible
|
|
[OK] shared endpoint: closed corner of box has no crack
|
|
[OK] collinear walls act as one
|
|
[OK] collinear walls with a gap let light through
|
|
[OK] T-junction: no leak and correct shadow
|
|
[OK] pillar mid-room casts a shadow, sides visible
|
|
[OK] closed door blocks, open door passes
|
|
[OK] token exactly at wall endpoint
|
|
[OK] token at endpoint of free-standing wall sees along it
|
|
[OK] long thin corridor
|
|
[OK] wall endpoints behind the viewer: fan stays angularly ordered
|
|
[OK] radius clips
|
|
[OK] square polygon
|
|
[OK] tiny polygon inside one cell
|
|
[OK] polygon spanning a cell with no vertex in it
|
|
[FAILED] big polygon includes fully covered interior cells
|
|
[OK] degenerate input: fewer than 3 vertices
|
|
[OK] touching a cell line: inclusive on the max side, not on the bbox minimum side
|
|
[OK] concave polygon: a notch cell is not filled
|
|
[OK] every token in seed sees itself and is not walled in
|
|
[FAILED] visibilityPolygon and cellsTouched equal the prototype results
|
|
[FAILED] random visibility polygons: identical cell lists
|
|
[FAILED] random simple polygons (star-shaped, concave): identical cell lists
|
|
[FAILED] grid-aligned integer polygons (edges on cell lines): identical cell lists
|
|
[FAILED] prototype scene, all tokens, doors closed and opened
|
|
[FAILED] random wall fields, cell 32 and 25
|
|
[FAILED] negative control: the oracle notices a missing and an invented cell
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/e/w/tests/tgeometry'
|
|
# test exit=1; expected tests failed: 4
|
|
[FAILED] random visibility polygons: identical cell lists
|
|
[FAILED] random simple polygons (star-shaped, concave): identical cell lists
|
|
[FAILED] prototype scene, all tokens, doors closed and opened
|
|
[FAILED] random wall fields, cell 32 and 25
|
|
|
|
e: exit=1 expected_failed=4 ok
|
|
## f: escape rule without the crossing check
|
|
# diff server/moverules.nim -> mutated copy:
|
|
# 147c147
|
|
# < if pathCrosses(s, d, w.a, w.b) or segDist(d, w.a, w.b) < r: return false
|
|
# ---
|
|
# > if segDist(d, w.a, w.b) < r: return false
|
|
[OK] crossing blocked, parallel ok
|
|
[OK] grazing an endpoint is blocked
|
|
[OK] no leak through shared vertex
|
|
[OK] diagonal squeeze through corner vertex of L
|
|
[OK] moving along a collinear wall is blocked
|
|
[OK] doors
|
|
[OK] zero-length move
|
|
[OK] near pillar: circle overlapping blocked, clear ok (ported)
|
|
[OK] closed door blocks near, open door passes (ported)
|
|
[OK] 64px corridor and doorway passable on the centreline (ported)
|
|
[OK] corner clipping: path passes the wall end closer than r though both ends are clear
|
|
[OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear)
|
|
[OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked
|
|
[OK] leg of the path inside r of a non-start wall blocks even if start and end are clear
|
|
[OK] exactly on a wall: can step off perpendicular, either side, to a clear spot
|
|
[FAILED] exactly on a wall: still refused when it would stay overlapped or run along/through
|
|
[OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype
|
|
[FAILED] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
|
|
[OK] escaping one wall does not excuse another
|
|
[OK] escape from a closed door; an open door never needed an escape
|
|
[OK] overlapping at a wall end: leave past the end without crossing
|
|
[OK] owner check: not yours is mkError, no position
|
|
[OK] GM-controlled token (no owner): players get mkError
|
|
[OK] step cap = scene default without vision, token vision radius with it
|
|
[OK] over-cap, wall, lock-flag and out-of-bounds nacks are identical
|
|
[OK] an accepted move applies and echoes the destination
|
|
[OK] player move honours walls (capsule) via moveToken
|
|
[OK] GM: ignores walls, step cap and the lock; bounds still apply
|
|
[OK] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
[OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does
|
|
[OK] open door added or opened never sets; closing a door on a token pushes it, never sets
|
|
[OK] a stuck token: player moves refused, GM move allowed
|
|
[OK] cleared by removing the wall; unrelated removals keep it
|
|
[OK] cleared by opening the door; a second open is a no-op
|
|
[OK] cleared by the GM; not re-set by itself
|
|
[OK] wall update = remove then add
|
|
[OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear
|
|
[OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
[OK] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
[OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door
|
|
[OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side
|
|
[OK] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
[OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody
|
|
[OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged
|
|
[OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
|
|
[OK] KEEP: wall update away from one of two overlapping walls keeps blocked
|
|
[OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
|
|
[OK] GM drops a token inside a wall -> blocked; a door counts only while closed
|
|
[FAILED] GM manual clear inside a wall: player escapes sideways, cannot cross
|
|
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
|
|
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
|
|
[OK] the overlap test, the escape and the push use the token's own radius
|
|
[OK] a big token is refused where a small one passes, on the same geometry
|
|
[OK] the door push clears the token's own radius
|
|
[OK] a grow that already fits does not move the token
|
|
[OK] grow inside r of a wall pushes it out by the minimal perpendicular distance
|
|
[OK] grow with no room on either side squeezes the token and leaves it in place
|
|
[OK] a squeeze from a failed grow clears when a later shrink ends the overlap
|
|
[OK] a shrink that still overlaps keeps the stuck entry
|
|
[OK] a grow out of a corner relaxes off both walls
|
|
[OK] a grow that would have to cross a wall squeezes instead of jumping through it
|
|
[OK] a grow that would leave the world squeezes instead of teleporting the token
|
|
[OK] resize ignores an out-of-range token index
|
|
[OK] a GM-sourced lock refuses player moves without touching the walls entries
|
|
[OK] a wall added over a GM-locked token only adds the walls entry
|
|
[OK] the GM clear of the walls entries leaves a GM-sourced entry alone (no rule runs)
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/f/w/tests/tmoverules'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
|
|
|
|
f: exit=1 expected_failed=1 ok
|
|
## g: GM moves checked against walls
|
|
# diff server/moverules.nim -> mutated copy:
|
|
# 219c219
|
|
# < if not inBounds(sc, d): return nack(s)
|
|
# ---
|
|
# > if not inBounds(sc, d) or not pathClear(sc.walls, s, d, sc.tokens[ti].radius): return nack(s)
|
|
[OK] crossing blocked, parallel ok
|
|
[OK] grazing an endpoint is blocked
|
|
[OK] no leak through shared vertex
|
|
[OK] diagonal squeeze through corner vertex of L
|
|
[OK] moving along a collinear wall is blocked
|
|
[OK] doors
|
|
[OK] zero-length move
|
|
[OK] near pillar: circle overlapping blocked, clear ok (ported)
|
|
[OK] closed door blocks near, open door passes (ported)
|
|
[OK] 64px corridor and doorway passable on the centreline (ported)
|
|
[OK] corner clipping: path passes the wall end closer than r though both ends are clear
|
|
[OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear)
|
|
[OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked
|
|
[OK] leg of the path inside r of a non-start wall blocks even if start and end are clear
|
|
[OK] exactly on a wall: can step off perpendicular, either side, to a clear spot
|
|
[OK] exactly on a wall: still refused when it would stay overlapped or run along/through
|
|
[OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype
|
|
[OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
|
|
[OK] escaping one wall does not excuse another
|
|
[OK] escape from a closed door; an open door never needed an escape
|
|
[OK] overlapping at a wall end: leave past the end without crossing
|
|
[OK] owner check: not yours is mkError, no position
|
|
[OK] GM-controlled token (no owner): players get mkError
|
|
[OK] step cap = scene default without vision, token vision radius with it
|
|
[OK] over-cap, wall, lock-flag and out-of-bounds nacks are identical
|
|
[OK] an accepted move applies and echoes the destination
|
|
[OK] player move honours walls (capsule) via moveToken
|
|
[FAILED] GM: ignores walls, step cap and the lock; bounds still apply
|
|
[OK] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
[OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does
|
|
[OK] open door added or opened never sets; closing a door on a token pushes it, never sets
|
|
[OK] a stuck token: player moves refused, GM move allowed
|
|
[OK] cleared by removing the wall; unrelated removals keep it
|
|
[OK] cleared by opening the door; a second open is a no-op
|
|
[OK] cleared by the GM; not re-set by itself
|
|
[OK] wall update = remove then add
|
|
[FAILED] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear
|
|
[OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
[OK] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
[OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door
|
|
[OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side
|
|
[FAILED] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
[OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody
|
|
[OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged
|
|
[OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
|
|
[OK] KEEP: wall update away from one of two overlapping walls keeps blocked
|
|
[FAILED] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
|
|
[FAILED] GM drops a token inside a wall -> blocked; a door counts only while closed
|
|
[FAILED] GM manual clear inside a wall: player escapes sideways, cannot cross
|
|
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
|
|
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
|
|
[OK] the overlap test, the escape and the push use the token's own radius
|
|
[OK] a big token is refused where a small one passes, on the same geometry
|
|
[OK] the door push clears the token's own radius
|
|
[OK] a grow that already fits does not move the token
|
|
[OK] grow inside r of a wall pushes it out by the minimal perpendicular distance
|
|
[OK] grow with no room on either side squeezes the token and leaves it in place
|
|
[OK] a squeeze from a failed grow clears when a later shrink ends the overlap
|
|
[OK] a shrink that still overlaps keeps the stuck entry
|
|
[OK] a grow out of a corner relaxes off both walls
|
|
[OK] a grow that would have to cross a wall squeezes instead of jumping through it
|
|
[OK] a grow that would leave the world squeezes instead of teleporting the token
|
|
[OK] resize ignores an out-of-range token index
|
|
[OK] a GM-sourced lock refuses player moves without touching the walls entries
|
|
[OK] a wall added over a GM-locked token only adds the walls entry
|
|
[OK] the GM clear of the walls entries leaves a GM-sourced entry alone (no rule runs)
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/g/w/tests/tmoverules'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] GM: ignores walls, step cap and the lock; bounds still apply
|
|
|
|
g: exit=1 expected_failed=1 ok
|
|
## h: capsule = centre path + destination circle (prototype)
|
|
# diff server/moverules.nim -> mutated copy:
|
|
# 148c148
|
|
# < elif segsCross(s, d, w.a, w.b) or segSegDist(s, d, w.a, w.b) < r: return false
|
|
# ---
|
|
# > elif segsCross(s, d, w.a, w.b) or segDist(d, w.a, w.b) < r: return false
|
|
[OK] crossing blocked, parallel ok
|
|
[OK] grazing an endpoint is blocked
|
|
[OK] no leak through shared vertex
|
|
[OK] diagonal squeeze through corner vertex of L
|
|
[OK] moving along a collinear wall is blocked
|
|
[OK] doors
|
|
[OK] zero-length move
|
|
[OK] near pillar: circle overlapping blocked, clear ok (ported)
|
|
[OK] closed door blocks near, open door passes (ported)
|
|
[OK] 64px corridor and doorway passable on the centreline (ported)
|
|
[FAILED] corner clipping: path passes the wall end closer than r though both ends are clear
|
|
[OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear)
|
|
[OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked
|
|
[FAILED] leg of the path inside r of a non-start wall blocks even if start and end are clear
|
|
[OK] exactly on a wall: can step off perpendicular, either side, to a clear spot
|
|
[OK] exactly on a wall: still refused when it would stay overlapped or run along/through
|
|
[OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype
|
|
[OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
|
|
[OK] escaping one wall does not excuse another
|
|
[OK] escape from a closed door; an open door never needed an escape
|
|
[OK] overlapping at a wall end: leave past the end without crossing
|
|
[OK] owner check: not yours is mkError, no position
|
|
[OK] GM-controlled token (no owner): players get mkError
|
|
[OK] step cap = scene default without vision, token vision radius with it
|
|
[OK] over-cap, wall, lock-flag and out-of-bounds nacks are identical
|
|
[OK] an accepted move applies and echoes the destination
|
|
[OK] player move honours walls (capsule) via moveToken
|
|
[OK] GM: ignores walls, step cap and the lock; bounds still apply
|
|
[OK] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
[OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does
|
|
[OK] open door added or opened never sets; closing a door on a token pushes it, never sets
|
|
[OK] a stuck token: player moves refused, GM move allowed
|
|
[OK] cleared by removing the wall; unrelated removals keep it
|
|
[OK] cleared by opening the door; a second open is a no-op
|
|
[OK] cleared by the GM; not re-set by itself
|
|
[OK] wall update = remove then add
|
|
[OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear
|
|
[OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
[OK] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
[OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door
|
|
[OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side
|
|
[OK] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
[OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody
|
|
[OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged
|
|
[OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
|
|
[OK] KEEP: wall update away from one of two overlapping walls keeps blocked
|
|
[OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
|
|
[OK] GM drops a token inside a wall -> blocked; a door counts only while closed
|
|
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
|
|
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
|
|
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
|
|
[OK] the overlap test, the escape and the push use the token's own radius
|
|
[OK] a big token is refused where a small one passes, on the same geometry
|
|
[OK] the door push clears the token's own radius
|
|
[OK] a grow that already fits does not move the token
|
|
[OK] grow inside r of a wall pushes it out by the minimal perpendicular distance
|
|
[OK] grow with no room on either side squeezes the token and leaves it in place
|
|
[OK] a squeeze from a failed grow clears when a later shrink ends the overlap
|
|
[OK] a shrink that still overlaps keeps the stuck entry
|
|
[OK] a grow out of a corner relaxes off both walls
|
|
[OK] a grow that would have to cross a wall squeezes instead of jumping through it
|
|
[OK] a grow that would leave the world squeezes instead of teleporting the token
|
|
[OK] resize ignores an out-of-range token index
|
|
[OK] a GM-sourced lock refuses player moves without touching the walls entries
|
|
[OK] a wall added over a GM-locked token only adds the walls entry
|
|
[OK] the GM clear of the walls entries leaves a GM-sourced entry alone (no rule runs)
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/h/w/tests/tmoverules'
|
|
# test exit=1; expected tests failed: 2
|
|
[FAILED] corner clipping: path passes the wall end closer than r though both ends are clear
|
|
[FAILED] leg of the path inside r of a non-start wall blocks even if start and end are clear
|
|
|
|
h: exit=1 expected_failed=2 ok
|
|
## i: no step cap
|
|
# diff server/moverules.nim -> mutated copy:
|
|
# 226d225
|
|
# < if hypot(dd.x, dd.y) > stepCap(sc, sc.tokens[ti]): return nack(s)
|
|
[OK] crossing blocked, parallel ok
|
|
[OK] grazing an endpoint is blocked
|
|
[OK] no leak through shared vertex
|
|
[OK] diagonal squeeze through corner vertex of L
|
|
[OK] moving along a collinear wall is blocked
|
|
[OK] doors
|
|
[OK] zero-length move
|
|
[OK] near pillar: circle overlapping blocked, clear ok (ported)
|
|
[OK] closed door blocks near, open door passes (ported)
|
|
[OK] 64px corridor and doorway passable on the centreline (ported)
|
|
[OK] corner clipping: path passes the wall end closer than r though both ends are clear
|
|
[OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear)
|
|
[OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked
|
|
[OK] leg of the path inside r of a non-start wall blocks even if start and end are clear
|
|
[OK] exactly on a wall: can step off perpendicular, either side, to a clear spot
|
|
[OK] exactly on a wall: still refused when it would stay overlapped or run along/through
|
|
[OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype
|
|
[OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
|
|
[OK] escaping one wall does not excuse another
|
|
[OK] escape from a closed door; an open door never needed an escape
|
|
[OK] overlapping at a wall end: leave past the end without crossing
|
|
[OK] owner check: not yours is mkError, no position
|
|
[OK] GM-controlled token (no owner): players get mkError
|
|
[FAILED] step cap = scene default without vision, token vision radius with it
|
|
[OK] over-cap, wall, lock-flag and out-of-bounds nacks are identical
|
|
[OK] an accepted move applies and echoes the destination
|
|
[OK] player move honours walls (capsule) via moveToken
|
|
[OK] GM: ignores walls, step cap and the lock; bounds still apply
|
|
[OK] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
[OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does
|
|
[OK] open door added or opened never sets; closing a door on a token pushes it, never sets
|
|
[OK] a stuck token: player moves refused, GM move allowed
|
|
[OK] cleared by removing the wall; unrelated removals keep it
|
|
[OK] cleared by opening the door; a second open is a no-op
|
|
[OK] cleared by the GM; not re-set by itself
|
|
[OK] wall update = remove then add
|
|
[OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear
|
|
[OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
[OK] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
[OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door
|
|
[OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side
|
|
[OK] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
[OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody
|
|
[OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged
|
|
[OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
|
|
[OK] KEEP: wall update away from one of two overlapping walls keeps blocked
|
|
[OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
|
|
[OK] GM drops a token inside a wall -> blocked; a door counts only while closed
|
|
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
|
|
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
|
|
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
|
|
[OK] the overlap test, the escape and the push use the token's own radius
|
|
[OK] a big token is refused where a small one passes, on the same geometry
|
|
[OK] the door push clears the token's own radius
|
|
[OK] a grow that already fits does not move the token
|
|
[OK] grow inside r of a wall pushes it out by the minimal perpendicular distance
|
|
[OK] grow with no room on either side squeezes the token and leaves it in place
|
|
[OK] a squeeze from a failed grow clears when a later shrink ends the overlap
|
|
[OK] a shrink that still overlaps keeps the stuck entry
|
|
[OK] a grow out of a corner relaxes off both walls
|
|
[OK] a grow that would have to cross a wall squeezes instead of jumping through it
|
|
[OK] a grow that would leave the world squeezes instead of teleporting the token
|
|
[OK] resize ignores an out-of-range token index
|
|
[OK] a GM-sourced lock refuses player moves without touching the walls entries
|
|
[OK] a wall added over a GM-locked token only adds the walls entry
|
|
[OK] the GM clear of the walls entries leaves a GM-sourced entry alone (no rule runs)
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/i/w/tests/tmoverules'
|
|
[FAILED] P1: probes longer than the cap get one fixed nack regardless of the scene
|
|
[OK] P2: scenes differing only beyond the bound give identical replies over 3000 probes
|
|
[OK] P3 negative control: a wall inside the disc IS visible through replies (the harness can fail)
|
|
[OK] P4: probing cannot unlock or move a locked token
|
|
[OK] doors beyond the bound: opening or closing them changes no reply
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/i/w/tests/tprobing'
|
|
# test exit=1; expected tests failed: 2
|
|
[FAILED] step cap = scene default without vision, token vision radius with it
|
|
[FAILED] P1: probes longer than the cap get one fixed nack regardless of the scene
|
|
|
|
i: exit=1 expected_failed=2 ok
|
|
## j: stuck trigger needs the centre on the wall
|
|
# diff server/moverules.nim -> mutated copy:
|
|
# 159c159
|
|
# < segDist(t.pos, w.a, w.b) < t.radius
|
|
# ---
|
|
# > segDist(t.pos, w.a, w.b) < 1e-9
|
|
[OK] crossing blocked, parallel ok
|
|
[OK] grazing an endpoint is blocked
|
|
[OK] no leak through shared vertex
|
|
[OK] diagonal squeeze through corner vertex of L
|
|
[OK] moving along a collinear wall is blocked
|
|
[OK] doors
|
|
[OK] zero-length move
|
|
[OK] near pillar: circle overlapping blocked, clear ok (ported)
|
|
[OK] closed door blocks near, open door passes (ported)
|
|
[OK] 64px corridor and doorway passable on the centreline (ported)
|
|
[OK] corner clipping: path passes the wall end closer than r though both ends are clear
|
|
[OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear)
|
|
[OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked
|
|
[OK] leg of the path inside r of a non-start wall blocks even if start and end are clear
|
|
[OK] exactly on a wall: can step off perpendicular, either side, to a clear spot
|
|
[OK] exactly on a wall: still refused when it would stay overlapped or run along/through
|
|
[OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype
|
|
[OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
|
|
[OK] escaping one wall does not excuse another
|
|
[OK] escape from a closed door; an open door never needed an escape
|
|
[OK] overlapping at a wall end: leave past the end without crossing
|
|
[OK] owner check: not yours is mkError, no position
|
|
[OK] GM-controlled token (no owner): players get mkError
|
|
[OK] step cap = scene default without vision, token vision radius with it
|
|
[OK] over-cap, wall, lock-flag and out-of-bounds nacks are identical
|
|
[OK] an accepted move applies and echoes the destination
|
|
[OK] player move honours walls (capsule) via moveToken
|
|
[OK] GM: ignores walls, step cap and the lock; bounds still apply
|
|
[FAILED] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
[FAILED] GM-controlled tokens get the flag too; wall bbox does not matter, distance does
|
|
[OK] open door added or opened never sets; closing a door on a token pushes it, never sets
|
|
[FAILED] a stuck token: player moves refused, GM move allowed
|
|
[FAILED] cleared by removing the wall; unrelated removals keep it
|
|
[FAILED] cleared by opening the door; a second open is a no-op
|
|
[OK] cleared by the GM; not re-set by itself
|
|
[FAILED] wall update = remove then add
|
|
[FAILED] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear
|
|
[FAILED] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
[OK] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
[FAILED] push: past the end of the door the offset shrinks (minimal), still >= r from the door
|
|
[FAILED] push: one side blocked by another wall -> the other side; out of bounds -> the other side
|
|
[FAILED] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
[FAILED] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody
|
|
[OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged
|
|
[FAILED] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
|
|
[FAILED] KEEP: wall update away from one of two overlapping walls keeps blocked
|
|
[FAILED] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
|
|
[FAILED] GM drops a token inside a wall -> blocked; a door counts only while closed
|
|
[FAILED] GM manual clear inside a wall: player escapes sideways, cannot cross
|
|
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
|
|
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
|
|
[OK] the overlap test, the escape and the push use the token's own radius
|
|
[OK] a big token is refused where a small one passes, on the same geometry
|
|
[FAILED] the door push clears the token's own radius
|
|
[OK] a grow that already fits does not move the token
|
|
[FAILED] grow inside r of a wall pushes it out by the minimal perpendicular distance
|
|
[FAILED] grow with no room on either side squeezes the token and leaves it in place
|
|
[FAILED] a squeeze from a failed grow clears when a later shrink ends the overlap
|
|
[FAILED] a shrink that still overlaps keeps the stuck entry
|
|
[FAILED] a grow out of a corner relaxes off both walls
|
|
[FAILED] a grow that would have to cross a wall squeezes instead of jumping through it
|
|
[FAILED] a grow that would leave the world squeezes instead of teleporting the token
|
|
[OK] resize ignores an out-of-range token index
|
|
[OK] a GM-sourced lock refuses player moves without touching the walls entries
|
|
[FAILED] a wall added over a GM-locked token only adds the walls entry
|
|
[OK] the GM clear of the walls entries leaves a GM-sourced entry alone (no rule runs)
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/j/w/tests/tmoverules'
|
|
# test exit=1; expected tests failed: 2
|
|
[FAILED] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
[FAILED] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
|
|
j: exit=1 expected_failed=2 ok
|
|
## k: removal/open clears stuck unconditionally (no KEEP)
|
|
# diff server/moverules.nim -> mutated copy:
|
|
# 190c190
|
|
# < if not overlapsAny(sc, sc.tokens[i]): sc.tokens[i].clearWalls()
|
|
# ---
|
|
# > sc.tokens[i].clearWalls()
|
|
[OK] crossing blocked, parallel ok
|
|
[OK] grazing an endpoint is blocked
|
|
[OK] no leak through shared vertex
|
|
[OK] diagonal squeeze through corner vertex of L
|
|
[OK] moving along a collinear wall is blocked
|
|
[OK] doors
|
|
[OK] zero-length move
|
|
[OK] near pillar: circle overlapping blocked, clear ok (ported)
|
|
[OK] closed door blocks near, open door passes (ported)
|
|
[OK] 64px corridor and doorway passable on the centreline (ported)
|
|
[OK] corner clipping: path passes the wall end closer than r though both ends are clear
|
|
[OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear)
|
|
[OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked
|
|
[OK] leg of the path inside r of a non-start wall blocks even if start and end are clear
|
|
[OK] exactly on a wall: can step off perpendicular, either side, to a clear spot
|
|
[OK] exactly on a wall: still refused when it would stay overlapped or run along/through
|
|
[OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype
|
|
[OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
|
|
[OK] escaping one wall does not excuse another
|
|
[OK] escape from a closed door; an open door never needed an escape
|
|
[OK] overlapping at a wall end: leave past the end without crossing
|
|
[OK] owner check: not yours is mkError, no position
|
|
[OK] GM-controlled token (no owner): players get mkError
|
|
[OK] step cap = scene default without vision, token vision radius with it
|
|
[OK] over-cap, wall, lock-flag and out-of-bounds nacks are identical
|
|
[OK] an accepted move applies and echoes the destination
|
|
[OK] player move honours walls (capsule) via moveToken
|
|
[OK] GM: ignores walls, step cap and the lock; bounds still apply
|
|
[OK] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
[OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does
|
|
[OK] open door added or opened never sets; closing a door on a token pushes it, never sets
|
|
[OK] a stuck token: player moves refused, GM move allowed
|
|
[OK] cleared by removing the wall; unrelated removals keep it
|
|
[OK] cleared by opening the door; a second open is a no-op
|
|
[OK] cleared by the GM; not re-set by itself
|
|
[OK] wall update = remove then add
|
|
[OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear
|
|
[OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
[OK] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
[OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door
|
|
[OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side
|
|
[FAILED] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
[OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody
|
|
[OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged
|
|
[FAILED] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
|
|
[FAILED] KEEP: wall update away from one of two overlapping walls keeps blocked
|
|
[OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
|
|
[OK] GM drops a token inside a wall -> blocked; a door counts only while closed
|
|
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
|
|
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
|
|
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
|
|
[OK] the overlap test, the escape and the push use the token's own radius
|
|
[OK] a big token is refused where a small one passes, on the same geometry
|
|
[OK] the door push clears the token's own radius
|
|
[OK] a grow that already fits does not move the token
|
|
[OK] grow inside r of a wall pushes it out by the minimal perpendicular distance
|
|
[OK] grow with no room on either side squeezes the token and leaves it in place
|
|
[OK] a squeeze from a failed grow clears when a later shrink ends the overlap
|
|
[OK] a shrink that still overlaps keeps the stuck entry
|
|
[OK] a grow out of a corner relaxes off both walls
|
|
[OK] a grow that would have to cross a wall squeezes instead of jumping through it
|
|
[OK] a grow that would leave the world squeezes instead of teleporting the token
|
|
[OK] resize ignores an out-of-range token index
|
|
[OK] a GM-sourced lock refuses player moves without touching the walls entries
|
|
[OK] a wall added over a GM-locked token only adds the walls entry
|
|
[OK] the GM clear of the walls entries leaves a GM-sourced entry alone (no rule runs)
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/k/w/tests/tmoverules'
|
|
# test exit=1; expected tests failed: 2
|
|
[FAILED] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
|
|
[FAILED] KEEP: wall update away from one of two overlapping walls keeps blocked
|
|
|
|
k: exit=1 expected_failed=2 ok
|
|
## l: GM moves never set or clear stuck
|
|
# diff server/moverules.nim -> mutated copy:
|
|
# 230d229
|
|
# < if who.role == roleGM: sc.placeToken(ti)
|
|
[OK] crossing blocked, parallel ok
|
|
[OK] grazing an endpoint is blocked
|
|
[OK] no leak through shared vertex
|
|
[OK] diagonal squeeze through corner vertex of L
|
|
[OK] moving along a collinear wall is blocked
|
|
[OK] doors
|
|
[OK] zero-length move
|
|
[OK] near pillar: circle overlapping blocked, clear ok (ported)
|
|
[OK] closed door blocks near, open door passes (ported)
|
|
[OK] 64px corridor and doorway passable on the centreline (ported)
|
|
[OK] corner clipping: path passes the wall end closer than r though both ends are clear
|
|
[OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear)
|
|
[OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked
|
|
[OK] leg of the path inside r of a non-start wall blocks even if start and end are clear
|
|
[OK] exactly on a wall: can step off perpendicular, either side, to a clear spot
|
|
[OK] exactly on a wall: still refused when it would stay overlapped or run along/through
|
|
[OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype
|
|
[OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
|
|
[OK] escaping one wall does not excuse another
|
|
[OK] escape from a closed door; an open door never needed an escape
|
|
[OK] overlapping at a wall end: leave past the end without crossing
|
|
[OK] owner check: not yours is mkError, no position
|
|
[OK] GM-controlled token (no owner): players get mkError
|
|
[OK] step cap = scene default without vision, token vision radius with it
|
|
[OK] over-cap, wall, lock-flag and out-of-bounds nacks are identical
|
|
[OK] an accepted move applies and echoes the destination
|
|
[OK] player move honours walls (capsule) via moveToken
|
|
[OK] GM: ignores walls, step cap and the lock; bounds still apply
|
|
[OK] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
[OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does
|
|
[OK] open door added or opened never sets; closing a door on a token pushes it, never sets
|
|
[FAILED] a stuck token: player moves refused, GM move allowed
|
|
[OK] cleared by removing the wall; unrelated removals keep it
|
|
[OK] cleared by opening the door; a second open is a no-op
|
|
[OK] cleared by the GM; not re-set by itself
|
|
[OK] wall update = remove then add
|
|
[FAILED] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear
|
|
[OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
[OK] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
[OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door
|
|
[OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side
|
|
[FAILED] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
[OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody
|
|
[OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged
|
|
[OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
|
|
[OK] KEEP: wall update away from one of two overlapping walls keeps blocked
|
|
[FAILED] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
|
|
[FAILED] GM drops a token inside a wall -> blocked; a door counts only while closed
|
|
[FAILED] GM manual clear inside a wall: player escapes sideways, cannot cross
|
|
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
|
|
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
|
|
[OK] the overlap test, the escape and the push use the token's own radius
|
|
[OK] a big token is refused where a small one passes, on the same geometry
|
|
[OK] the door push clears the token's own radius
|
|
[OK] a grow that already fits does not move the token
|
|
[OK] grow inside r of a wall pushes it out by the minimal perpendicular distance
|
|
[OK] grow with no room on either side squeezes the token and leaves it in place
|
|
[OK] a squeeze from a failed grow clears when a later shrink ends the overlap
|
|
[OK] a shrink that still overlaps keeps the stuck entry
|
|
[OK] a grow out of a corner relaxes off both walls
|
|
[OK] a grow that would have to cross a wall squeezes instead of jumping through it
|
|
[OK] a grow that would leave the world squeezes instead of teleporting the token
|
|
[OK] resize ignores an out-of-range token index
|
|
[OK] a GM-sourced lock refuses player moves without touching the walls entries
|
|
[OK] a wall added over a GM-locked token only adds the walls entry
|
|
[OK] the GM clear of the walls entries leaves a GM-sourced entry alone (no rule runs)
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/l/w/tests/tmoverules'
|
|
# test exit=1; expected tests failed: 3
|
|
[FAILED] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
|
|
[FAILED] GM drops a token inside a wall -> blocked; a door counts only while closed
|
|
[FAILED] GM manual clear inside a wall: player escapes sideways, cannot cross
|
|
|
|
l: exit=1 expected_failed=3 ok
|
|
## m: door push: wrong side first
|
|
# diff server/moverules.nim -> mutated copy:
|
|
# 263c263
|
|
# < for sg in [(if side > 0: 1.0 else: -1.0), (if side > 0: -1.0 else: 1.0)]:
|
|
# ---
|
|
# > for sg in [(if side > 0: -1.0 else: 1.0), (if side > 0: 1.0 else: -1.0)]:
|
|
[OK] crossing blocked, parallel ok
|
|
[OK] grazing an endpoint is blocked
|
|
[OK] no leak through shared vertex
|
|
[OK] diagonal squeeze through corner vertex of L
|
|
[OK] moving along a collinear wall is blocked
|
|
[OK] doors
|
|
[OK] zero-length move
|
|
[OK] near pillar: circle overlapping blocked, clear ok (ported)
|
|
[OK] closed door blocks near, open door passes (ported)
|
|
[OK] 64px corridor and doorway passable on the centreline (ported)
|
|
[OK] corner clipping: path passes the wall end closer than r though both ends are clear
|
|
[OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear)
|
|
[OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked
|
|
[OK] leg of the path inside r of a non-start wall blocks even if start and end are clear
|
|
[OK] exactly on a wall: can step off perpendicular, either side, to a clear spot
|
|
[OK] exactly on a wall: still refused when it would stay overlapped or run along/through
|
|
[OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype
|
|
[OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
|
|
[OK] escaping one wall does not excuse another
|
|
[OK] escape from a closed door; an open door never needed an escape
|
|
[OK] overlapping at a wall end: leave past the end without crossing
|
|
[OK] owner check: not yours is mkError, no position
|
|
[OK] GM-controlled token (no owner): players get mkError
|
|
[OK] step cap = scene default without vision, token vision radius with it
|
|
[OK] over-cap, wall, lock-flag and out-of-bounds nacks are identical
|
|
[OK] an accepted move applies and echoes the destination
|
|
[OK] player move honours walls (capsule) via moveToken
|
|
[OK] GM: ignores walls, step cap and the lock; bounds still apply
|
|
[OK] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
[OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does
|
|
[OK] open door added or opened never sets; closing a door on a token pushes it, never sets
|
|
[OK] a stuck token: player moves refused, GM move allowed
|
|
[OK] cleared by removing the wall; unrelated removals keep it
|
|
[OK] cleared by opening the door; a second open is a no-op
|
|
[OK] cleared by the GM; not re-set by itself
|
|
[OK] wall update = remove then add
|
|
[OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear
|
|
[FAILED] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
[FAILED] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
[FAILED] push: past the end of the door the offset shrinks (minimal), still >= r from the door
|
|
[OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side
|
|
[OK] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
[OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody
|
|
[FAILED] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged
|
|
[OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
|
|
[OK] KEEP: wall update away from one of two overlapping walls keeps blocked
|
|
[OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
|
|
[OK] GM drops a token inside a wall -> blocked; a door counts only while closed
|
|
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
|
|
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
|
|
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
|
|
[OK] the overlap test, the escape and the push use the token's own radius
|
|
[OK] a big token is refused where a small one passes, on the same geometry
|
|
[FAILED] the door push clears the token's own radius
|
|
[OK] a grow that already fits does not move the token
|
|
[OK] grow inside r of a wall pushes it out by the minimal perpendicular distance
|
|
[OK] grow with no room on either side squeezes the token and leaves it in place
|
|
[OK] a squeeze from a failed grow clears when a later shrink ends the overlap
|
|
[OK] a shrink that still overlaps keeps the stuck entry
|
|
[OK] a grow out of a corner relaxes off both walls
|
|
[OK] a grow that would have to cross a wall squeezes instead of jumping through it
|
|
[OK] a grow that would leave the world squeezes instead of teleporting the token
|
|
[OK] resize ignores an out-of-range token index
|
|
[OK] a GM-sourced lock refuses player moves without touching the walls entries
|
|
[OK] a wall added over a GM-locked token only adds the walls entry
|
|
[OK] the GM clear of the walls entries leaves a GM-sourced entry alone (no rule runs)
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/m/w/tests/tmoverules'
|
|
# test exit=1; expected tests failed: 3
|
|
[FAILED] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
[FAILED] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
[FAILED] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged
|
|
|
|
m: exit=1 expected_failed=3 ok
|
|
## n: door push: no validity check
|
|
# diff server/moverules.nim -> mutated copy:
|
|
# 267c267
|
|
# < if inBounds(sc, p) and not overlapsAny(sc, tt): return (true, p)
|
|
# ---
|
|
# > return (true, p)
|
|
[OK] crossing blocked, parallel ok
|
|
[OK] grazing an endpoint is blocked
|
|
[OK] no leak through shared vertex
|
|
[OK] diagonal squeeze through corner vertex of L
|
|
[OK] moving along a collinear wall is blocked
|
|
[OK] doors
|
|
[OK] zero-length move
|
|
[OK] near pillar: circle overlapping blocked, clear ok (ported)
|
|
[OK] closed door blocks near, open door passes (ported)
|
|
[OK] 64px corridor and doorway passable on the centreline (ported)
|
|
[OK] corner clipping: path passes the wall end closer than r though both ends are clear
|
|
[OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear)
|
|
[OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked
|
|
[OK] leg of the path inside r of a non-start wall blocks even if start and end are clear
|
|
[OK] exactly on a wall: can step off perpendicular, either side, to a clear spot
|
|
[OK] exactly on a wall: still refused when it would stay overlapped or run along/through
|
|
[OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype
|
|
[OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
|
|
[OK] escaping one wall does not excuse another
|
|
[OK] escape from a closed door; an open door never needed an escape
|
|
[OK] overlapping at a wall end: leave past the end without crossing
|
|
[OK] owner check: not yours is mkError, no position
|
|
[OK] GM-controlled token (no owner): players get mkError
|
|
[OK] step cap = scene default without vision, token vision radius with it
|
|
[OK] over-cap, wall, lock-flag and out-of-bounds nacks are identical
|
|
[OK] an accepted move applies and echoes the destination
|
|
[OK] player move honours walls (capsule) via moveToken
|
|
[OK] GM: ignores walls, step cap and the lock; bounds still apply
|
|
[OK] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
[OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does
|
|
[OK] open door added or opened never sets; closing a door on a token pushes it, never sets
|
|
[OK] a stuck token: player moves refused, GM move allowed
|
|
[OK] cleared by removing the wall; unrelated removals keep it
|
|
[OK] cleared by opening the door; a second open is a no-op
|
|
[OK] cleared by the GM; not re-set by itself
|
|
[OK] wall update = remove then add
|
|
[OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear
|
|
[OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
[OK] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
[OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door
|
|
[FAILED] push: one side blocked by another wall -> the other side; out of bounds -> the other side
|
|
[FAILED] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
[OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody
|
|
[OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged
|
|
[OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
|
|
[OK] KEEP: wall update away from one of two overlapping walls keeps blocked
|
|
[OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
|
|
[OK] GM drops a token inside a wall -> blocked; a door counts only while closed
|
|
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
|
|
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
|
|
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
|
|
[OK] the overlap test, the escape and the push use the token's own radius
|
|
[OK] a big token is refused where a small one passes, on the same geometry
|
|
[OK] the door push clears the token's own radius
|
|
[OK] a grow that already fits does not move the token
|
|
[OK] grow inside r of a wall pushes it out by the minimal perpendicular distance
|
|
[OK] grow with no room on either side squeezes the token and leaves it in place
|
|
[OK] a squeeze from a failed grow clears when a later shrink ends the overlap
|
|
[OK] a shrink that still overlaps keeps the stuck entry
|
|
[OK] a grow out of a corner relaxes off both walls
|
|
[OK] a grow that would have to cross a wall squeezes instead of jumping through it
|
|
[OK] a grow that would leave the world squeezes instead of teleporting the token
|
|
[OK] resize ignores an out-of-range token index
|
|
[OK] a GM-sourced lock refuses player moves without touching the walls entries
|
|
[OK] a wall added over a GM-locked token only adds the walls entry
|
|
[OK] the GM clear of the walls entries leaves a GM-sourced entry alone (no rule runs)
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/n/w/tests/tmoverules'
|
|
# test exit=1; expected tests failed: 2
|
|
[FAILED] push: one side blocked by another wall -> the other side; out of bounds -> the other side
|
|
[FAILED] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
|
|
n: exit=1 expected_failed=2 ok
|
|
## o: door push: previous position ignored on the line
|
|
# diff server/moverules.nim -> mutated copy:
|
|
# 258c258
|
|
# < side = if t.hasPrev: dot(t.prev - w.a, n) else: 0.0
|
|
# ---
|
|
# > side = 0.0
|
|
# 330c330
|
|
# < var side = if t.hasPrev: dot(t.prev - w.a, n) else: 0.0
|
|
# ---
|
|
# > var side = 0.0
|
|
[OK] crossing blocked, parallel ok
|
|
[OK] grazing an endpoint is blocked
|
|
[OK] no leak through shared vertex
|
|
[OK] diagonal squeeze through corner vertex of L
|
|
[OK] moving along a collinear wall is blocked
|
|
[OK] doors
|
|
[OK] zero-length move
|
|
[OK] near pillar: circle overlapping blocked, clear ok (ported)
|
|
[OK] closed door blocks near, open door passes (ported)
|
|
[OK] 64px corridor and doorway passable on the centreline (ported)
|
|
[OK] corner clipping: path passes the wall end closer than r though both ends are clear
|
|
[OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear)
|
|
[OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked
|
|
[OK] leg of the path inside r of a non-start wall blocks even if start and end are clear
|
|
[OK] exactly on a wall: can step off perpendicular, either side, to a clear spot
|
|
[OK] exactly on a wall: still refused when it would stay overlapped or run along/through
|
|
[OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype
|
|
[OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
|
|
[OK] escaping one wall does not excuse another
|
|
[OK] escape from a closed door; an open door never needed an escape
|
|
[OK] overlapping at a wall end: leave past the end without crossing
|
|
[OK] owner check: not yours is mkError, no position
|
|
[OK] GM-controlled token (no owner): players get mkError
|
|
[OK] step cap = scene default without vision, token vision radius with it
|
|
[OK] over-cap, wall, lock-flag and out-of-bounds nacks are identical
|
|
[OK] an accepted move applies and echoes the destination
|
|
[OK] player move honours walls (capsule) via moveToken
|
|
[OK] GM: ignores walls, step cap and the lock; bounds still apply
|
|
[OK] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
[OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does
|
|
[OK] open door added or opened never sets; closing a door on a token pushes it, never sets
|
|
[OK] a stuck token: player moves refused, GM move allowed
|
|
[OK] cleared by removing the wall; unrelated removals keep it
|
|
[OK] cleared by opening the door; a second open is a no-op
|
|
[OK] cleared by the GM; not re-set by itself
|
|
[OK] wall update = remove then add
|
|
[OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear
|
|
[OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
[FAILED] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
[OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door
|
|
[OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side
|
|
[OK] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
[OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody
|
|
[OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged
|
|
[OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
|
|
[OK] KEEP: wall update away from one of two overlapping walls keeps blocked
|
|
[OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
|
|
[OK] GM drops a token inside a wall -> blocked; a door counts only while closed
|
|
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
|
|
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
|
|
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
|
|
[OK] the overlap test, the escape and the push use the token's own radius
|
|
[OK] a big token is refused where a small one passes, on the same geometry
|
|
[OK] the door push clears the token's own radius
|
|
[OK] a grow that already fits does not move the token
|
|
[OK] grow inside r of a wall pushes it out by the minimal perpendicular distance
|
|
[OK] grow with no room on either side squeezes the token and leaves it in place
|
|
[OK] a squeeze from a failed grow clears when a later shrink ends the overlap
|
|
[OK] a shrink that still overlaps keeps the stuck entry
|
|
[OK] a grow out of a corner relaxes off both walls
|
|
[OK] a grow that would have to cross a wall squeezes instead of jumping through it
|
|
[OK] a grow that would leave the world squeezes instead of teleporting the token
|
|
[OK] resize ignores an out-of-range token index
|
|
[OK] a GM-sourced lock refuses player moves without touching the walls entries
|
|
[OK] a wall added over a GM-locked token only adds the walls entry
|
|
[OK] the GM clear of the walls entries leaves a GM-sourced entry alone (no rule runs)
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/o/w/tests/tmoverules'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
|
|
o: exit=1 expected_failed=1 ok
|
|
## p: token bucket never refills
|
|
# diff server/protocol.nim -> mutated copy:
|
|
# 223d222
|
|
# < r.tokens = min(r.burst, r.tokens + float(elapsed) * r.perSecond / 1000.0)
|
|
[OK] a well-formed intent parses and keeps its reqId and node
|
|
[OK] reqId boundaries: 0 and 2^31-1 pass, 2^31 and -1 are malformed
|
|
[OK] every unreadable frame is malformed, never an ack
|
|
[OK] a payload that is not UTF-8 is malformed even when it parses as JSON bytes
|
|
[OK] the catalogue is the 29 intents of 6.1 and the built set is a subset
|
|
[OK] role classes: the GM-only set never swallows the intents both roles may send
|
|
[OK] only the built slices' intents answer with a real handler
|
|
[OK] a fresh bucket allows exactly the burst, then refuses
|
|
[FAILED] refill is continuous at 30/s, capped at the burst
|
|
[FAILED] the refill never exceeds the burst, however long the connection idles
|
|
[OK] the bucket is per connection and starts full: no shared state
|
|
[OK] nine malformed frames are tolerated, the tenth closes
|
|
[OK] a frame slower than the window does not count: 9 fast + 1 slow is not a flood
|
|
[OK] the window slides: the flood fires again only on a fresh ten inside it
|
|
[OK] a second connection has its own window
|
|
[OK] hello carries proto, role, me and n; an unnamed player's name is null
|
|
[OK] a named recipient's hello carries the scene block, and the GM also `extra`
|
|
[OK] ack ok carries its result fields and never a code
|
|
[OK] a refusal is a static code and no state
|
|
[OK] the uniform move refusal carries pos and no code (5.5, T9)
|
|
[OK] error and closing frames have no reqId
|
|
[OK] the close-code table of 6.5 is the app range plus 1008
|
|
[OK] one wall carries id, a, b, kind, open and flags in the 6.1 shape
|
|
[OK] `walls` is the full list plus the scene, `wall` is one upsert, `wall_gone` an id
|
|
[OK] the fan-out frames carry no n: the sender stamps it per recipient
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/p/w/tests/tprotocol'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] refill is continuous at 30/s, capped at the burst
|
|
|
|
p: exit=1 expected_failed=1 ok
|
|
## q: reqId upper bound dropped
|
|
# diff server/protocol.nim -> mutated copy:
|
|
# 133c133
|
|
# < if reqId < 0 or reqId > MaxReqId: return
|
|
# ---
|
|
# > if reqId < 0: return
|
|
[OK] a well-formed intent parses and keeps its reqId and node
|
|
[FAILED] reqId boundaries: 0 and 2^31-1 pass, 2^31 and -1 are malformed
|
|
[OK] every unreadable frame is malformed, never an ack
|
|
[OK] a payload that is not UTF-8 is malformed even when it parses as JSON bytes
|
|
[OK] the catalogue is the 29 intents of 6.1 and the built set is a subset
|
|
[OK] role classes: the GM-only set never swallows the intents both roles may send
|
|
[OK] only the built slices' intents answer with a real handler
|
|
[OK] a fresh bucket allows exactly the burst, then refuses
|
|
[OK] refill is continuous at 30/s, capped at the burst
|
|
[OK] the refill never exceeds the burst, however long the connection idles
|
|
[OK] the bucket is per connection and starts full: no shared state
|
|
[OK] nine malformed frames are tolerated, the tenth closes
|
|
[OK] a frame slower than the window does not count: 9 fast + 1 slow is not a flood
|
|
[OK] the window slides: the flood fires again only on a fresh ten inside it
|
|
[OK] a second connection has its own window
|
|
[OK] hello carries proto, role, me and n; an unnamed player's name is null
|
|
[OK] a named recipient's hello carries the scene block, and the GM also `extra`
|
|
[OK] ack ok carries its result fields and never a code
|
|
[OK] a refusal is a static code and no state
|
|
[OK] the uniform move refusal carries pos and no code (5.5, T9)
|
|
[OK] error and closing frames have no reqId
|
|
[OK] the close-code table of 6.5 is the app range plus 1008
|
|
[OK] one wall carries id, a, b, kind, open and flags in the 6.1 shape
|
|
[OK] `walls` is the full list plus the scene, `wall` is one upsert, `wall_gone` an id
|
|
[OK] the fan-out frames carry no n: the sender stamps it per recipient
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/q/w/tests/tprotocol'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] reqId boundaries: 0 and 2^31-1 pass, 2^31 and -1 are malformed
|
|
|
|
q: exit=1 expected_failed=1 ok
|
|
## r: malformed flood never fires
|
|
# diff server/protocol.nim -> mutated copy:
|
|
# 244c244
|
|
# < result = f.count >= MalformedFloodLimit and (nowMs - oldest) <= MalformedFloodWindowMs
|
|
# ---
|
|
# > result = f.count > MalformedFloodLimit and (nowMs - oldest) <= MalformedFloodWindowMs
|
|
[OK] a well-formed intent parses and keeps its reqId and node
|
|
[OK] reqId boundaries: 0 and 2^31-1 pass, 2^31 and -1 are malformed
|
|
[OK] every unreadable frame is malformed, never an ack
|
|
[OK] a payload that is not UTF-8 is malformed even when it parses as JSON bytes
|
|
[OK] the catalogue is the 29 intents of 6.1 and the built set is a subset
|
|
[OK] role classes: the GM-only set never swallows the intents both roles may send
|
|
[OK] only the built slices' intents answer with a real handler
|
|
[OK] a fresh bucket allows exactly the burst, then refuses
|
|
[OK] refill is continuous at 30/s, capped at the burst
|
|
[OK] the refill never exceeds the burst, however long the connection idles
|
|
[OK] the bucket is per connection and starts full: no shared state
|
|
[FAILED] nine malformed frames are tolerated, the tenth closes
|
|
[OK] a frame slower than the window does not count: 9 fast + 1 slow is not a flood
|
|
[FAILED] the window slides: the flood fires again only on a fresh ten inside it
|
|
[OK] a second connection has its own window
|
|
[OK] hello carries proto, role, me and n; an unnamed player's name is null
|
|
[OK] a named recipient's hello carries the scene block, and the GM also `extra`
|
|
[OK] ack ok carries its result fields and never a code
|
|
[OK] a refusal is a static code and no state
|
|
[OK] the uniform move refusal carries pos and no code (5.5, T9)
|
|
[OK] error and closing frames have no reqId
|
|
[OK] the close-code table of 6.5 is the app range plus 1008
|
|
[OK] one wall carries id, a, b, kind, open and flags in the 6.1 shape
|
|
[OK] `walls` is the full list plus the scene, `wall` is one upsert, `wall_gone` an id
|
|
[OK] the fan-out frames carry no n: the sender stamps it per recipient
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/r/w/tests/tprotocol'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] nine malformed frames are tolerated, the tenth closes
|
|
|
|
r: exit=1 expected_failed=1 ok
|
|
## s: the frame counter never advances
|
|
# diff server/conns.nim -> mutated copy:
|
|
# 143c143
|
|
# < inc c.active[i].frames
|
|
# ---
|
|
# > discard
|
|
[OK] 16 reservations succeed, the 17th is refused
|
|
[OK] a cancelled reservation gives the slot back
|
|
[OK] activated connections keep the total cap; removing one frees a slot
|
|
[OK] the 5th connection of one player evicts that player's oldest
|
|
[OK] another player's connections are never evicted
|
|
[OK] the GM is capped like anyone else (caps are per player, not per role)
|
|
[OK] revokePlayer returns every live connection of that player and nothing else
|
|
[OK] remove works by conn id; an unknown id is a no-op
|
|
[OK] connForWs finds the registered socket (mummy hands the same value back)
|
|
[FAILED] the frame counter starts at 1 on each connection and is never global
|
|
[FAILED] a removed connection has no next frame number; the caller sends closing with frameNo
|
|
[OK] the intent bucket is per connection: draining one leaves the other full
|
|
[OK] the malformed window is per connection and fires on the tenth frame
|
|
[OK] a Pong is recorded on the right connection
|
|
[OK] a snapshot hands out every live connection without holding the lock afterwards
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/s/w/tests/tconns'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] the frame counter starts at 1 on each connection and is never global
|
|
|
|
s: exit=1 expected_failed=1 ok
|
|
## t: wall removal renumbers next_wall_id
|
|
# diff server/world.nim -> mutated copy:
|
|
# 217c217
|
|
# < sc.walls.delete idx.get
|
|
# ---
|
|
# > sc.walls.delete idx.get; sc.nextWallId = sc.walls.len + 1
|
|
[OK] the migration seeds scene 1 with the v1 defaults, no walls, next_wall_id 1
|
|
[OK] an unknown scene id is not there (the wire answers not-found)
|
|
[OK] a point is exactly two finite numbers, ints included
|
|
[OK] kind, open and flags accept only their own shape
|
|
[OK] undefined and null are the same as an absent field
|
|
[OK] adds count from 1 and the counter advances
|
|
/home/davide/Projects/GDR/FFF_vtt/.devbox/nimble/pkgs2/db_connector-0.1.0-4f2e67d0e4b61af9ac5575509305660b473f01a4/db_connector/db_sqlite.nim(211) dbError
|
|
Unhandled exception: UNIQUE constraint failed: wall.scene_id, wall.id [DbError]
|
|
[FAILED] a removal never renumbers and the next add never reuses the id
|
|
[OK] the id counter survives a reload, even when the newest wall was removed
|
|
[OK] add, update, door set and remove round-trip through a reload
|
|
[OK] authoring runs with synchronous=FULL and leaves NORMAL behind (Q12)
|
|
[OK] a failing write leaves memory and the pragma alone
|
|
/home/davide/Projects/GDR/FFF_vtt/.devbox/nimble/pkgs2/db_connector-0.1.0-4f2e67d0e4b61af9ac5575509305660b473f01a4/db_connector/db_sqlite.nim(211) dbError
|
|
Unhandled exception: UNIQUE constraint failed: wall.scene_id, wall.id [DbError]
|
|
[FAILED] walls load in id order whatever the insertion order was
|
|
[OK] a zero-length wall is invalid and writes nothing
|
|
[OK] both endpoints must be inside [0,w] x [0,h]; the border itself is allowed
|
|
[OK] a wall is never open: the stored row normalizes it
|
|
[OK] update keeps the row's id and open flag unless the kind changes
|
|
[OK] dot patching: only the given fields change
|
|
[OK] unknown ids are not-found, wrong kinds are their own outcome
|
|
[OK] the first wall of a fresh scene is id 1, not 0
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/t/w/tests/tworld'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] a removal never renumbers and the next add never reuses the id
|
|
|
|
t: exit=1 expected_failed=1 ok
|
|
## u: the id counter is not loaded from the DB
|
|
# diff server/world.nim -> mutated copy:
|
|
# 270c270
|
|
# < nextWallId: parseInt(row[10]),
|
|
# ---
|
|
# > nextWallId: 1,
|
|
[OK] the migration seeds scene 1 with the v1 defaults, no walls, next_wall_id 1
|
|
[OK] an unknown scene id is not there (the wire answers not-found)
|
|
[OK] a point is exactly two finite numbers, ints included
|
|
[OK] kind, open and flags accept only their own shape
|
|
[OK] undefined and null are the same as an absent field
|
|
[OK] adds count from 1 and the counter advances
|
|
[OK] a removal never renumbers and the next add never reuses the id
|
|
/home/davide/Projects/GDR/FFF_vtt/.devbox/nimble/pkgs2/db_connector-0.1.0-4f2e67d0e4b61af9ac5575509305660b473f01a4/db_connector/db_sqlite.nim(211) dbError
|
|
Unhandled exception: UNIQUE constraint failed: wall.scene_id, wall.id [DbError]
|
|
[FAILED] the id counter survives a reload, even when the newest wall was removed
|
|
[FAILED] add, update, door set and remove round-trip through a reload
|
|
[OK] authoring runs with synchronous=FULL and leaves NORMAL behind (Q12)
|
|
[OK] a failing write leaves memory and the pragma alone
|
|
[OK] walls load in id order whatever the insertion order was
|
|
[OK] a zero-length wall is invalid and writes nothing
|
|
[OK] both endpoints must be inside [0,w] x [0,h]; the border itself is allowed
|
|
[OK] a wall is never open: the stored row normalizes it
|
|
[OK] update keeps the row's id and open flag unless the kind changes
|
|
[OK] dot patching: only the given fields change
|
|
[OK] unknown ids are not-found, wrong kinds are their own outcome
|
|
[OK] the first wall of a fresh scene is id 1, not 0
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/u/w/tests/tworld'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] the id counter survives a reload, even when the newest wall was removed
|
|
|
|
u: exit=1 expected_failed=1 ok
|
|
## v: the id counter is never written to the DB
|
|
# diff server/world.nim -> mutated copy:
|
|
# 194d193
|
|
# < db.exec(sql"UPDATE scene SET next_wall_id = ? WHERE id = ?", stored.id + 1, sc.id)
|
|
[OK] the migration seeds scene 1 with the v1 defaults, no walls, next_wall_id 1
|
|
[OK] an unknown scene id is not there (the wire answers not-found)
|
|
[OK] a point is exactly two finite numbers, ints included
|
|
[OK] kind, open and flags accept only their own shape
|
|
[OK] undefined and null are the same as an absent field
|
|
[OK] adds count from 1 and the counter advances
|
|
[OK] a removal never renumbers and the next add never reuses the id
|
|
/home/davide/Projects/GDR/FFF_vtt/.devbox/nimble/pkgs2/db_connector-0.1.0-4f2e67d0e4b61af9ac5575509305660b473f01a4/db_connector/db_sqlite.nim(211) dbError
|
|
Unhandled exception: UNIQUE constraint failed: wall.scene_id, wall.id [DbError]
|
|
[FAILED] the id counter survives a reload, even when the newest wall was removed
|
|
[FAILED] add, update, door set and remove round-trip through a reload
|
|
[OK] authoring runs with synchronous=FULL and leaves NORMAL behind (Q12)
|
|
[OK] a failing write leaves memory and the pragma alone
|
|
[OK] walls load in id order whatever the insertion order was
|
|
[OK] a zero-length wall is invalid and writes nothing
|
|
[OK] both endpoints must be inside [0,w] x [0,h]; the border itself is allowed
|
|
[OK] a wall is never open: the stored row normalizes it
|
|
[OK] update keeps the row's id and open flag unless the kind changes
|
|
[OK] dot patching: only the given fields change
|
|
[OK] unknown ids are not-found, wrong kinds are their own outcome
|
|
[OK] the first wall of a fresh scene is id 1, not 0
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/v/w/tests/tworld'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] the id counter survives a reload, even when the newest wall was removed
|
|
|
|
v: exit=1 expected_failed=1 ok
|
|
## w: a wall may stay open
|
|
# diff server/world.nim -> mutated copy:
|
|
# 130c130
|
|
# < if result.kind == wkWall: result.open = false
|
|
# ---
|
|
# > discard
|
|
[OK] the migration seeds scene 1 with the v1 defaults, no walls, next_wall_id 1
|
|
[OK] an unknown scene id is not there (the wire answers not-found)
|
|
[OK] a point is exactly two finite numbers, ints included
|
|
[OK] kind, open and flags accept only their own shape
|
|
[OK] undefined and null are the same as an absent field
|
|
[OK] adds count from 1 and the counter advances
|
|
[OK] a removal never renumbers and the next add never reuses the id
|
|
[OK] the id counter survives a reload, even when the newest wall was removed
|
|
[OK] add, update, door set and remove round-trip through a reload
|
|
[OK] authoring runs with synchronous=FULL and leaves NORMAL behind (Q12)
|
|
[OK] a failing write leaves memory and the pragma alone
|
|
[OK] walls load in id order whatever the insertion order was
|
|
[OK] a zero-length wall is invalid and writes nothing
|
|
[OK] both endpoints must be inside [0,w] x [0,h]; the border itself is allowed
|
|
[FAILED] a wall is never open: the stored row normalizes it
|
|
[FAILED] update keeps the row's id and open flag unless the kind changes
|
|
[OK] dot patching: only the given fields change
|
|
[OK] unknown ids are not-found, wrong kinds are their own outcome
|
|
[OK] the first wall of a fresh scene is id 1, not 0
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/w/w/tests/tworld'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] a wall is never open: the stored row normalizes it
|
|
|
|
w: exit=1 expected_failed=1 ok
|
|
## x: zero-length walls accepted
|
|
# diff server/world.nim -> mutated copy:
|
|
# 125c125
|
|
# < (rec.a.x != rec.b.x or rec.a.y != rec.b.y) and inBounds(sc, rec.a) and inBounds(sc, rec.b)
|
|
# ---
|
|
# > inBounds(sc, rec.a) and inBounds(sc, rec.b)
|
|
[OK] the migration seeds scene 1 with the v1 defaults, no walls, next_wall_id 1
|
|
[OK] an unknown scene id is not there (the wire answers not-found)
|
|
[OK] a point is exactly two finite numbers, ints included
|
|
[OK] kind, open and flags accept only their own shape
|
|
[OK] undefined and null are the same as an absent field
|
|
[OK] adds count from 1 and the counter advances
|
|
[OK] a removal never renumbers and the next add never reuses the id
|
|
[OK] the id counter survives a reload, even when the newest wall was removed
|
|
[OK] add, update, door set and remove round-trip through a reload
|
|
[OK] authoring runs with synchronous=FULL and leaves NORMAL behind (Q12)
|
|
[OK] a failing write leaves memory and the pragma alone
|
|
[OK] walls load in id order whatever the insertion order was
|
|
[FAILED] a zero-length wall is invalid and writes nothing
|
|
[OK] both endpoints must be inside [0,w] x [0,h]; the border itself is allowed
|
|
[OK] a wall is never open: the stored row normalizes it
|
|
[OK] update keeps the row's id and open flag unless the kind changes
|
|
[OK] dot patching: only the given fields change
|
|
[OK] unknown ids are not-found, wrong kinds are their own outcome
|
|
[OK] the first wall of a fresh scene is id 1, not 0
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/x/w/tests/tworld'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] a zero-length wall is invalid and writes nothing
|
|
|
|
x: exit=1 expected_failed=1 ok
|
|
## y: wall endpoints unchecked against the world bounds
|
|
# diff server/world.nim -> mutated copy:
|
|
# 120c120
|
|
# < p.x >= 0 and p.y >= 0 and p.x <= sc.w and p.y <= sc.h # written so NaN fails
|
|
# ---
|
|
# > p.x >= 0 and p.y >= 0 # written so NaN fails
|
|
[OK] the migration seeds scene 1 with the v1 defaults, no walls, next_wall_id 1
|
|
[OK] an unknown scene id is not there (the wire answers not-found)
|
|
[OK] a point is exactly two finite numbers, ints included
|
|
[OK] kind, open and flags accept only their own shape
|
|
[OK] undefined and null are the same as an absent field
|
|
[OK] adds count from 1 and the counter advances
|
|
[OK] a removal never renumbers and the next add never reuses the id
|
|
[OK] the id counter survives a reload, even when the newest wall was removed
|
|
[OK] add, update, door set and remove round-trip through a reload
|
|
[OK] authoring runs with synchronous=FULL and leaves NORMAL behind (Q12)
|
|
[OK] a failing write leaves memory and the pragma alone
|
|
[OK] walls load in id order whatever the insertion order was
|
|
[OK] a zero-length wall is invalid and writes nothing
|
|
[FAILED] both endpoints must be inside [0,w] x [0,h]; the border itself is allowed
|
|
[OK] a wall is never open: the stored row normalizes it
|
|
[OK] update keeps the row's id and open flag unless the kind changes
|
|
[OK] dot patching: only the given fields change
|
|
[OK] unknown ids are not-found, wrong kinds are their own outcome
|
|
[OK] the first wall of a fresh scene is id 1, not 0
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/y/w/tests/tworld'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] both endpoints must be inside [0,w] x [0,h]; the border itself is allowed
|
|
|
|
y: exit=1 expected_failed=1 ok
|
|
## z: door.set accepted on a plain wall
|
|
# diff server/world.nim -> mutated copy:
|
|
# 224d223
|
|
# < if sc.walls[idx.get].kind != wkDoor: return waNotDoor
|
|
[OK] the migration seeds scene 1 with the v1 defaults, no walls, next_wall_id 1
|
|
[OK] an unknown scene id is not there (the wire answers not-found)
|
|
[OK] a point is exactly two finite numbers, ints included
|
|
[OK] kind, open and flags accept only their own shape
|
|
[OK] undefined and null are the same as an absent field
|
|
[OK] adds count from 1 and the counter advances
|
|
[OK] a removal never renumbers and the next add never reuses the id
|
|
[OK] the id counter survives a reload, even when the newest wall was removed
|
|
[OK] add, update, door set and remove round-trip through a reload
|
|
[OK] authoring runs with synchronous=FULL and leaves NORMAL behind (Q12)
|
|
[OK] a failing write leaves memory and the pragma alone
|
|
[OK] walls load in id order whatever the insertion order was
|
|
[OK] a zero-length wall is invalid and writes nothing
|
|
[OK] both endpoints must be inside [0,w] x [0,h]; the border itself is allowed
|
|
[OK] a wall is never open: the stored row normalizes it
|
|
[OK] update keeps the row's id and open flag unless the kind changes
|
|
[OK] dot patching: only the given fields change
|
|
[FAILED] unknown ids are not-found, wrong kinds are their own outcome
|
|
[OK] the first wall of a fresh scene is id 1, not 0
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/z/w/tests/tworld'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] unknown ids are not-found, wrong kinds are their own outcome
|
|
|
|
z: exit=1 expected_failed=1 ok
|
|
## z2: persisted open state loaded inverted
|
|
# diff server/world.nim -> mutated copy:
|
|
# 247c247
|
|
# < open: row[6] == "1",
|
|
# ---
|
|
# > open: row[6] == "0",
|
|
[OK] the migration seeds scene 1 with the v1 defaults, no walls, next_wall_id 1
|
|
[OK] an unknown scene id is not there (the wire answers not-found)
|
|
[OK] a point is exactly two finite numbers, ints included
|
|
[OK] kind, open and flags accept only their own shape
|
|
[OK] undefined and null are the same as an absent field
|
|
[OK] adds count from 1 and the counter advances
|
|
[OK] a removal never renumbers and the next add never reuses the id
|
|
[OK] the id counter survives a reload, even when the newest wall was removed
|
|
[FAILED] add, update, door set and remove round-trip through a reload
|
|
[OK] authoring runs with synchronous=FULL and leaves NORMAL behind (Q12)
|
|
[OK] a failing write leaves memory and the pragma alone
|
|
[OK] walls load in id order whatever the insertion order was
|
|
[OK] a zero-length wall is invalid and writes nothing
|
|
[OK] both endpoints must be inside [0,w] x [0,h]; the border itself is allowed
|
|
[FAILED] a wall is never open: the stored row normalizes it
|
|
[FAILED] update keeps the row's id and open flag unless the kind changes
|
|
[OK] dot patching: only the given fields change
|
|
[OK] unknown ids are not-found, wrong kinds are their own outcome
|
|
[OK] the first wall of a fresh scene is id 1, not 0
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/z2/w/tests/tworld'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] add, update, door set and remove round-trip through a reload
|
|
|
|
z2: exit=1 expected_failed=1 ok
|
|
## aa: the egress ignores LOS, gm_only and ownership
|
|
# diff server/views.nim -> mutated copy:
|
|
# 119c119
|
|
# < if not pv.visibleTo(t, playerId): continue
|
|
# ---
|
|
# > if false: continue
|
|
[OK] every token, in token order, with controller and both names
|
|
[OK] a GM-controlled token shows controller null
|
|
[OK] the GM never gets vision polygons or explored cells
|
|
[FAILED] the set of tokens follows the visibility rule
|
|
[OK] a player frame carries no GM-only field and no wall-like key
|
|
[OK] the controller gets `mine`, the owner bucket and its vision_radius
|
|
[OK] a scan of every player frame finds no wall-ish or GM-only key
|
|
[OK] the first pass sends the resync order, then nothing changes and nothing is sent
|
|
[OK] a token that moved sends one `token` frame with the new position
|
|
[FAILED] leaving view sends `token_gone` once, and never for a token that was never sent
|
|
[FAILED] a token becoming gm_only is taken away from a player who could see it (6.1)
|
|
[OK] vision is re-sent only when the polygons change
|
|
[OK] a changed wall is enough to re-send vision
|
|
[OK] explored full is RLE rows of contiguous columns
|
|
[OK] explored fresh is a list of [cx, cy]
|
|
[OK] the vision payload uses integer pixels (6.4, Q16 FIXED)
|
|
[OK] the hello scene block carries the 6.1 fields and no counts
|
|
[OK] the GM frame carries all three buckets and the source of every status
|
|
[OK] a player who sees the token gets the public bucket only
|
|
[OK] the controller gets public + owner, never the gm bucket
|
|
[OK] the controller is not told what caused a status either (5.5, 6.1 note 6)
|
|
[OK] a prop change and a status change each reach a viewer as one `token` frame
|
|
[OK] a radius change reaches every viewer as the effective radius
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/aa/w/tests/tviews'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] the set of tokens follows the visibility rule
|
|
|
|
aa: exit=1 expected_failed=1 ok
|
|
## ab: gm_only ignored by the view rule
|
|
# diff server/vision.nim -> mutated copy:
|
|
# 100d99
|
|
# < if t.gmOnly: return false
|
|
[OK] only the player's own vision tokens produce one, in token order
|
|
[OK] a player with no vision token has no polygons at all
|
|
[OK] the polygon is bounded by the token's range, and a closer wall cuts it
|
|
[OK] the token's own vision_radius overrides the scene default
|
|
[OK] an open door does not block; closing it does (5.1, 5.5)
|
|
[OK] the cells under the polygon are explored, and `fresh` reports them once
|
|
[OK] moving adds cells and never forgets the old ones
|
|
[OK] a closed door hides the cells behind it; opening it adds them
|
|
[OK] each player has their own set; nobody shares explored cells (Q9 FIXED)
|
|
[OK] the full payload is sorted by row and never contains a cell twice
|
|
[OK] ver moves with the polygons and stands still without a change
|
|
[OK] a controlled token is always visible, gm_only included
|
|
[OK] another token needs to be inside the polygon
|
|
[FAILED] a gm_only token inside the LOS is not visible to anyone else
|
|
[OK] a player with no vision token sees only what they control
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/ab/w/tests/tvision'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] a gm_only token inside the LOS is not visible to anyone else
|
|
|
|
ab: exit=1 expected_failed=1 ok
|
|
## ac: a controlled token is not always visible
|
|
# diff server/vision.nim -> mutated copy:
|
|
# 99d98
|
|
# < if t.owner == playerId: return true
|
|
[OK] only the player's own vision tokens produce one, in token order
|
|
[OK] a player with no vision token has no polygons at all
|
|
[OK] the polygon is bounded by the token's range, and a closer wall cuts it
|
|
[OK] the token's own vision_radius overrides the scene default
|
|
[OK] an open door does not block; closing it does (5.1, 5.5)
|
|
[OK] the cells under the polygon are explored, and `fresh` reports them once
|
|
[OK] moving adds cells and never forgets the old ones
|
|
[OK] a closed door hides the cells behind it; opening it adds them
|
|
[OK] each player has their own set; nobody shares explored cells (Q9 FIXED)
|
|
[OK] the full payload is sorted by row and never contains a cell twice
|
|
[OK] ver moves with the polygons and stands still without a change
|
|
[FAILED] a controlled token is always visible, gm_only included
|
|
[OK] another token needs to be inside the polygon
|
|
[OK] a gm_only token inside the LOS is not visible to anyone else
|
|
[FAILED] a player with no vision token sees only what they control
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/ac/w/tests/tvision'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] a controlled token is always visible, gm_only included
|
|
|
|
ac: exit=1 expected_failed=1 ok
|
|
## ad: no token_gone when a token leaves the view
|
|
# diff server/views.nim -> mutated copy:
|
|
# 353c353
|
|
# < result.add tokenGoneFrame(id)
|
|
# ---
|
|
# > discard
|
|
[OK] every token, in token order, with controller and both names
|
|
[OK] a GM-controlled token shows controller null
|
|
[OK] the GM never gets vision polygons or explored cells
|
|
[OK] the set of tokens follows the visibility rule
|
|
[OK] a player frame carries no GM-only field and no wall-like key
|
|
[OK] the controller gets `mine`, the owner bucket and its vision_radius
|
|
[OK] a scan of every player frame finds no wall-ish or GM-only key
|
|
[OK] the first pass sends the resync order, then nothing changes and nothing is sent
|
|
[OK] a token that moved sends one `token` frame with the new position
|
|
[FAILED] leaving view sends `token_gone` once, and never for a token that was never sent
|
|
[FAILED] a token becoming gm_only is taken away from a player who could see it (6.1)
|
|
[OK] vision is re-sent only when the polygons change
|
|
[OK] a changed wall is enough to re-send vision
|
|
[OK] explored full is RLE rows of contiguous columns
|
|
[OK] explored fresh is a list of [cx, cy]
|
|
[OK] the vision payload uses integer pixels (6.4, Q16 FIXED)
|
|
[OK] the hello scene block carries the 6.1 fields and no counts
|
|
[OK] the GM frame carries all three buckets and the source of every status
|
|
[OK] a player who sees the token gets the public bucket only
|
|
[OK] the controller gets public + owner, never the gm bucket
|
|
[OK] the controller is not told what caused a status either (5.5, 6.1 note 6)
|
|
[OK] a prop change and a status change each reach a viewer as one `token` frame
|
|
[OK] a radius change reaches every viewer as the effective radius
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/ad/w/tests/tviews'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] leaving view sends `token_gone` once, and never for a token that was never sent
|
|
|
|
ad: exit=1 expected_failed=1 ok
|
|
## ae: a player token frame carries the GM-only kind
|
|
# diff server/views.nim -> mutated copy:
|
|
# 224c224
|
|
# < "statuses": statusKindsJson(v.statuses), "props": buckets
|
|
# ---
|
|
# > "statuses": statusKindsJson(v.statuses), "props": buckets, "kind": "npc"
|
|
[OK] every token, in token order, with controller and both names
|
|
[OK] a GM-controlled token shows controller null
|
|
[OK] the GM never gets vision polygons or explored cells
|
|
[OK] the set of tokens follows the visibility rule
|
|
[FAILED] a player frame carries no GM-only field and no wall-like key
|
|
[OK] the controller gets `mine`, the owner bucket and its vision_radius
|
|
[FAILED] a scan of every player frame finds no wall-ish or GM-only key
|
|
[OK] the first pass sends the resync order, then nothing changes and nothing is sent
|
|
[OK] a token that moved sends one `token` frame with the new position
|
|
[OK] leaving view sends `token_gone` once, and never for a token that was never sent
|
|
[OK] a token becoming gm_only is taken away from a player who could see it (6.1)
|
|
[OK] vision is re-sent only when the polygons change
|
|
[OK] a changed wall is enough to re-send vision
|
|
[OK] explored full is RLE rows of contiguous columns
|
|
[OK] explored fresh is a list of [cx, cy]
|
|
[OK] the vision payload uses integer pixels (6.4, Q16 FIXED)
|
|
[OK] the hello scene block carries the 6.1 fields and no counts
|
|
[OK] the GM frame carries all three buckets and the source of every status
|
|
[OK] a player who sees the token gets the public bucket only
|
|
[OK] the controller gets public + owner, never the gm bucket
|
|
[OK] the controller is not told what caused a status either (5.5, 6.1 note 6)
|
|
[OK] a prop change and a status change each reach a viewer as one `token` frame
|
|
[OK] a radius change reaches every viewer as the effective radius
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/ae/w/tests/tviews'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] a player frame carries no GM-only field and no wall-like key
|
|
|
|
ae: exit=1 expected_failed=1 ok
|
|
## af: explored forgets cells outside the current polygon
|
|
# diff server/vision.nim -> mutated copy:
|
|
# 73c73
|
|
# < for idx in added: pv.explored.incl idx
|
|
# ---
|
|
# > pv.explored = added
|
|
[OK] only the player's own vision tokens produce one, in token order
|
|
[OK] a player with no vision token has no polygons at all
|
|
[OK] the polygon is bounded by the token's range, and a closer wall cuts it
|
|
[OK] the token's own vision_radius overrides the scene default
|
|
[OK] an open door does not block; closing it does (5.1, 5.5)
|
|
[FAILED] the cells under the polygon are explored, and `fresh` reports them once
|
|
[FAILED] moving adds cells and never forgets the old ones
|
|
[OK] a closed door hides the cells behind it; opening it adds them
|
|
[OK] each player has their own set; nobody shares explored cells (Q9 FIXED)
|
|
[OK] the full payload is sorted by row and never contains a cell twice
|
|
[OK] ver moves with the polygons and stands still without a change
|
|
[OK] a controlled token is always visible, gm_only included
|
|
[OK] another token needs to be inside the polygon
|
|
[OK] a gm_only token inside the LOS is not visible to anyone else
|
|
[OK] a player with no vision token sees only what they control
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/af/w/tests/tvision'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] moving adds cells and never forgets the old ones
|
|
|
|
af: exit=1 expected_failed=1 ok
|
|
## ag: the chunk row stride is dropped
|
|
# diff server/explored.nim -> mutated copy:
|
|
# 56c56
|
|
# < ((cy mod ChunkCells) * ChunkCells) + (cx mod ChunkCells)
|
|
# ---
|
|
# > (cy mod ChunkCells) + (cx mod ChunkCells)
|
|
[FAILED] the chunk bitmap layout is pinned
|
|
[OK] one chunk covers 64x64 cells
|
|
[FAILED] a dirty chunk carries the whole chunk, not just the new cells
|
|
[OK] a chunk of a map edge keeps out-of-scene cells at zero
|
|
[FAILED] two chunks in one chunk row are both written
|
|
[FAILED] a second write to the same chunk replaces the bitmap
|
|
[OK] a chunk row of the wrong size is refused by the schema
|
|
[FAILED] restore: the stored cells come back exactly
|
|
[OK] restore: two players' explored never mix
|
|
[OK] restore: an empty store restores nothing and a removed player takes its chunks
|
|
[OK] a mutation-scale chunk write stays inside the 4.3 commit budget
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/ag/w/tests/texplored'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] the chunk bitmap layout is pinned
|
|
|
|
ag: exit=1 expected_failed=1 ok
|
|
## ah: a cell coordinate is used as a chunk coordinate
|
|
# diff server/explored.nim -> mutated copy:
|
|
# 46c46
|
|
# < cell div ChunkCells
|
|
# ---
|
|
# > cell
|
|
[OK] the chunk bitmap layout is pinned
|
|
[FAILED] one chunk covers 64x64 cells
|
|
[FAILED] a dirty chunk carries the whole chunk, not just the new cells
|
|
[OK] a chunk of a map edge keeps out-of-scene cells at zero
|
|
[FAILED] two chunks in one chunk row are both written
|
|
[FAILED] a second write to the same chunk replaces the bitmap
|
|
[OK] a chunk row of the wrong size is refused by the schema
|
|
[FAILED] restore: the stored cells come back exactly
|
|
/nix/store/274jzpwhdklcga24bd9cxywba9apvpic-nim-unwrapped-2.2.12/nim/lib/pure/collections/tables.nim(232) raiseKeyError
|
|
Unhandled exception: key not found: 3 [KeyError]
|
|
[FAILED] restore: two players' explored never mix
|
|
[OK] restore: an empty store restores nothing and a removed player takes its chunks
|
|
[OK] a mutation-scale chunk write stays inside the 4.3 commit budget
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/ah/w/tests/texplored'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] one chunk covers 64x64 cells
|
|
|
|
ah: exit=1 expected_failed=1 ok
|
|
## ai: restore forgets the decoded cells
|
|
# diff server/explored.nim -> mutated copy:
|
|
# 146c146
|
|
# < result.mgetOrPut(pid, PlayerVision()).explored.incl idx
|
|
# ---
|
|
# > discard
|
|
[OK] the chunk bitmap layout is pinned
|
|
[OK] one chunk covers 64x64 cells
|
|
[OK] a dirty chunk carries the whole chunk, not just the new cells
|
|
[OK] a chunk of a map edge keeps out-of-scene cells at zero
|
|
/nix/store/274jzpwhdklcga24bd9cxywba9apvpic-nim-unwrapped-2.2.12/nim/lib/pure/collections/tables.nim(232) raiseKeyError
|
|
Unhandled exception: key not found: 2 [KeyError]
|
|
[FAILED] two chunks in one chunk row are both written
|
|
/nix/store/274jzpwhdklcga24bd9cxywba9apvpic-nim-unwrapped-2.2.12/nim/lib/pure/collections/tables.nim(232) raiseKeyError
|
|
Unhandled exception: key not found: 2 [KeyError]
|
|
[FAILED] a second write to the same chunk replaces the bitmap
|
|
[OK] a chunk row of the wrong size is refused by the schema
|
|
/nix/store/274jzpwhdklcga24bd9cxywba9apvpic-nim-unwrapped-2.2.12/nim/lib/pure/collections/tables.nim(232) raiseKeyError
|
|
Unhandled exception: key not found: 2 [KeyError]
|
|
[FAILED] restore: the stored cells come back exactly
|
|
/nix/store/274jzpwhdklcga24bd9cxywba9apvpic-nim-unwrapped-2.2.12/nim/lib/pure/collections/tables.nim(232) raiseKeyError
|
|
Unhandled exception: key not found: 2 [KeyError]
|
|
[FAILED] restore: two players' explored never mix
|
|
[OK] restore: an empty store restores nothing and a removed player takes its chunks
|
|
[OK] a mutation-scale chunk write stays inside the 4.3 commit budget
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/ai/w/tests/texplored'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] restore: the stored cells come back exactly
|
|
|
|
ai: exit=1 expected_failed=1 ok
|
|
## aj: explored chunks keyed by scene, not player
|
|
# diff server/explored.nim -> mutated copy:
|
|
# 127c127
|
|
# < db.exec(ps, c.playerId, sceneId, c.cx, c.cy, c.bits)
|
|
# ---
|
|
# > db.exec(ps, sceneId, sceneId, c.cx, c.cy, c.bits)
|
|
[OK] the chunk bitmap layout is pinned
|
|
[OK] one chunk covers 64x64 cells
|
|
[OK] a dirty chunk carries the whole chunk, not just the new cells
|
|
[OK] a chunk of a map edge keeps out-of-scene cells at zero
|
|
/nix/store/274jzpwhdklcga24bd9cxywba9apvpic-nim-unwrapped-2.2.12/nim/lib/pure/collections/tables.nim(232) raiseKeyError
|
|
Unhandled exception: key not found: 2 [KeyError]
|
|
[FAILED] two chunks in one chunk row are both written
|
|
/nix/store/274jzpwhdklcga24bd9cxywba9apvpic-nim-unwrapped-2.2.12/nim/lib/pure/collections/tables.nim(232) raiseKeyError
|
|
Unhandled exception: key not found: 2 [KeyError]
|
|
[FAILED] a second write to the same chunk replaces the bitmap
|
|
[OK] a chunk row of the wrong size is refused by the schema
|
|
/nix/store/274jzpwhdklcga24bd9cxywba9apvpic-nim-unwrapped-2.2.12/nim/lib/pure/collections/tables.nim(232) raiseKeyError
|
|
Unhandled exception: key not found: 2 [KeyError]
|
|
[FAILED] restore: the stored cells come back exactly
|
|
/nix/store/274jzpwhdklcga24bd9cxywba9apvpic-nim-unwrapped-2.2.12/nim/lib/pure/collections/tables.nim(232) raiseKeyError
|
|
Unhandled exception: key not found: 2 [KeyError]
|
|
[FAILED] restore: two players' explored never mix
|
|
[FAILED] restore: an empty store restores nothing and a removed player takes its chunks
|
|
[OK] a mutation-scale chunk write stays inside the 4.3 commit budget
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/aj/w/tests/texplored'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] restore: two players' explored never mix
|
|
|
|
aj: exit=1 expected_failed=1 ok
|
|
## ak: a chunk rewrite is ignored
|
|
# diff server/explored.nim -> mutated copy:
|
|
# 116c116
|
|
# < ON CONFLICT(player_id, scene_id, cx, cy) DO UPDATE SET bits = excluded.bits"""
|
|
# ---
|
|
# > ON CONFLICT(player_id, scene_id, cx, cy) DO NOTHING"""
|
|
[OK] the chunk bitmap layout is pinned
|
|
[OK] one chunk covers 64x64 cells
|
|
[OK] a dirty chunk carries the whole chunk, not just the new cells
|
|
[OK] a chunk of a map edge keeps out-of-scene cells at zero
|
|
[OK] two chunks in one chunk row are both written
|
|
[FAILED] a second write to the same chunk replaces the bitmap
|
|
[OK] a chunk row of the wrong size is refused by the schema
|
|
[OK] restore: the stored cells come back exactly
|
|
[OK] restore: two players' explored never mix
|
|
[OK] restore: an empty store restores nothing and a removed player takes its chunks
|
|
[OK] a mutation-scale chunk write stays inside the 4.3 commit budget
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/ak/w/tests/texplored'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] a second write to the same chunk replaces the bitmap
|
|
|
|
ak: exit=1 expected_failed=1 ok
|
|
## al: dirty chunks keyed by row only
|
|
# diff server/explored.nim -> mutated copy:
|
|
# 105c105
|
|
# < let key = ccy * sc.chunkCols + ccx
|
|
# ---
|
|
# > let key = ccy
|
|
[OK] the chunk bitmap layout is pinned
|
|
[OK] one chunk covers 64x64 cells
|
|
[OK] a dirty chunk carries the whole chunk, not just the new cells
|
|
[OK] a chunk of a map edge keeps out-of-scene cells at zero
|
|
[FAILED] two chunks in one chunk row are both written
|
|
[OK] a second write to the same chunk replaces the bitmap
|
|
[OK] a chunk row of the wrong size is refused by the schema
|
|
[FAILED] restore: the stored cells come back exactly
|
|
[OK] restore: two players' explored never mix
|
|
[OK] restore: an empty store restores nothing and a removed player takes its chunks
|
|
[OK] a mutation-scale chunk write stays inside the 4.3 commit budget
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/al/w/tests/texplored'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] two chunks in one chunk row are both written
|
|
|
|
al: exit=1 expected_failed=1 ok
|
|
## am: the owner bucket reaches a non-controller
|
|
# diff server/views.nim -> mutated copy:
|
|
# 129c129
|
|
# < propsOwner: (if mine: objectOf(t.props[pbOwner]) else: nil))
|
|
# ---
|
|
# > propsOwner: t.props[pbOwner])
|
|
[OK] every token, in token order, with controller and both names
|
|
[OK] a GM-controlled token shows controller null
|
|
[OK] the GM never gets vision polygons or explored cells
|
|
[OK] the set of tokens follows the visibility rule
|
|
[OK] a player frame carries no GM-only field and no wall-like key
|
|
[FAILED] the controller gets `mine`, the owner bucket and its vision_radius
|
|
[OK] a scan of every player frame finds no wall-ish or GM-only key
|
|
[OK] the first pass sends the resync order, then nothing changes and nothing is sent
|
|
[OK] a token that moved sends one `token` frame with the new position
|
|
[OK] leaving view sends `token_gone` once, and never for a token that was never sent
|
|
[OK] a token becoming gm_only is taken away from a player who could see it (6.1)
|
|
[OK] vision is re-sent only when the polygons change
|
|
[OK] a changed wall is enough to re-send vision
|
|
[OK] explored full is RLE rows of contiguous columns
|
|
[OK] explored fresh is a list of [cx, cy]
|
|
[OK] the vision payload uses integer pixels (6.4, Q16 FIXED)
|
|
[OK] the hello scene block carries the 6.1 fields and no counts
|
|
[OK] the GM frame carries all three buckets and the source of every status
|
|
[FAILED] a player who sees the token gets the public bucket only
|
|
[OK] the controller gets public + owner, never the gm bucket
|
|
[OK] the controller is not told what caused a status either (5.5, 6.1 note 6)
|
|
[OK] a prop change and a status change each reach a viewer as one `token` frame
|
|
[OK] a radius change reaches every viewer as the effective radius
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/am/w/tests/tviews'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] a player who sees the token gets the public bucket only
|
|
|
|
am: exit=1 expected_failed=1 ok
|
|
## an: a new wall does not stick a token
|
|
# diff server/moverules.nim -> mutated copy:
|
|
# 183c183
|
|
# < if overlaps(sc, sc.tokens[i], w): sc.tokens[i].stuckWalls = true
|
|
# ---
|
|
# > if overlaps(sc, sc.tokens[i], w): discard
|
|
[OK] crossing blocked, parallel ok
|
|
[OK] grazing an endpoint is blocked
|
|
[OK] no leak through shared vertex
|
|
[OK] diagonal squeeze through corner vertex of L
|
|
[OK] moving along a collinear wall is blocked
|
|
[OK] doors
|
|
[OK] zero-length move
|
|
[OK] near pillar: circle overlapping blocked, clear ok (ported)
|
|
[OK] closed door blocks near, open door passes (ported)
|
|
[OK] 64px corridor and doorway passable on the centreline (ported)
|
|
[OK] corner clipping: path passes the wall end closer than r though both ends are clear
|
|
[OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear)
|
|
[OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked
|
|
[OK] leg of the path inside r of a non-start wall blocks even if start and end are clear
|
|
[OK] exactly on a wall: can step off perpendicular, either side, to a clear spot
|
|
[OK] exactly on a wall: still refused when it would stay overlapped or run along/through
|
|
[OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype
|
|
[OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
|
|
[OK] escaping one wall does not excuse another
|
|
[OK] escape from a closed door; an open door never needed an escape
|
|
[OK] overlapping at a wall end: leave past the end without crossing
|
|
[OK] owner check: not yours is mkError, no position
|
|
[OK] GM-controlled token (no owner): players get mkError
|
|
[OK] step cap = scene default without vision, token vision radius with it
|
|
[OK] over-cap, wall, lock-flag and out-of-bounds nacks are identical
|
|
[OK] an accepted move applies and echoes the destination
|
|
[OK] player move honours walls (capsule) via moveToken
|
|
[OK] GM: ignores walls, step cap and the lock; bounds still apply
|
|
[FAILED] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
[FAILED] GM-controlled tokens get the flag too; wall bbox does not matter, distance does
|
|
[OK] open door added or opened never sets; closing a door on a token pushes it, never sets
|
|
[FAILED] a stuck token: player moves refused, GM move allowed
|
|
[FAILED] cleared by removing the wall; unrelated removals keep it
|
|
[FAILED] cleared by opening the door; a second open is a no-op
|
|
[OK] cleared by the GM; not re-set by itself
|
|
[FAILED] wall update = remove then add
|
|
[OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear
|
|
[OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
[OK] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
[OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door
|
|
[OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side
|
|
[OK] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
[FAILED] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody
|
|
[OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged
|
|
[FAILED] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
|
|
[FAILED] KEEP: wall update away from one of two overlapping walls keeps blocked
|
|
[OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
|
|
[OK] GM drops a token inside a wall -> blocked; a door counts only while closed
|
|
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
|
|
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
|
|
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
|
|
[OK] the overlap test, the escape and the push use the token's own radius
|
|
[OK] a big token is refused where a small one passes, on the same geometry
|
|
[OK] the door push clears the token's own radius
|
|
[OK] a grow that already fits does not move the token
|
|
[OK] grow inside r of a wall pushes it out by the minimal perpendicular distance
|
|
[OK] grow with no room on either side squeezes the token and leaves it in place
|
|
[OK] a squeeze from a failed grow clears when a later shrink ends the overlap
|
|
[OK] a shrink that still overlaps keeps the stuck entry
|
|
[OK] a grow out of a corner relaxes off both walls
|
|
[OK] a grow that would have to cross a wall squeezes instead of jumping through it
|
|
[OK] a grow that would leave the world squeezes instead of teleporting the token
|
|
[OK] resize ignores an out-of-range token index
|
|
[OK] a GM-sourced lock refuses player moves without touching the walls entries
|
|
[FAILED] a wall added over a GM-locked token only adds the walls entry
|
|
[OK] the GM clear of the walls entries leaves a GM-sourced entry alone (no rule runs)
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/an/w/tests/tmoverules'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
|
|
an: exit=1 expected_failed=1 ok
|
|
## ao: a shrink never clears the walls entries
|
|
# diff server/moverules.nim -> mutated copy:
|
|
# 371c371
|
|
# < sc.tokens[ti].clearWalls()
|
|
# ---
|
|
# > discard
|
|
[OK] crossing blocked, parallel ok
|
|
[OK] grazing an endpoint is blocked
|
|
[OK] no leak through shared vertex
|
|
[OK] diagonal squeeze through corner vertex of L
|
|
[OK] moving along a collinear wall is blocked
|
|
[OK] doors
|
|
[OK] zero-length move
|
|
[OK] near pillar: circle overlapping blocked, clear ok (ported)
|
|
[OK] closed door blocks near, open door passes (ported)
|
|
[OK] 64px corridor and doorway passable on the centreline (ported)
|
|
[OK] corner clipping: path passes the wall end closer than r though both ends are clear
|
|
[OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear)
|
|
[OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked
|
|
[OK] leg of the path inside r of a non-start wall blocks even if start and end are clear
|
|
[OK] exactly on a wall: can step off perpendicular, either side, to a clear spot
|
|
[OK] exactly on a wall: still refused when it would stay overlapped or run along/through
|
|
[OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype
|
|
[OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
|
|
[OK] escaping one wall does not excuse another
|
|
[OK] escape from a closed door; an open door never needed an escape
|
|
[OK] overlapping at a wall end: leave past the end without crossing
|
|
[OK] owner check: not yours is mkError, no position
|
|
[OK] GM-controlled token (no owner): players get mkError
|
|
[OK] step cap = scene default without vision, token vision radius with it
|
|
[OK] over-cap, wall, lock-flag and out-of-bounds nacks are identical
|
|
[OK] an accepted move applies and echoes the destination
|
|
[OK] player move honours walls (capsule) via moveToken
|
|
[OK] GM: ignores walls, step cap and the lock; bounds still apply
|
|
[OK] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
[OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does
|
|
[OK] open door added or opened never sets; closing a door on a token pushes it, never sets
|
|
[OK] a stuck token: player moves refused, GM move allowed
|
|
[OK] cleared by removing the wall; unrelated removals keep it
|
|
[OK] cleared by opening the door; a second open is a no-op
|
|
[OK] cleared by the GM; not re-set by itself
|
|
[OK] wall update = remove then add
|
|
[OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear
|
|
[OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
[OK] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
[OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door
|
|
[OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side
|
|
[OK] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
[OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody
|
|
[OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged
|
|
[OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
|
|
[OK] KEEP: wall update away from one of two overlapping walls keeps blocked
|
|
[OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
|
|
[OK] GM drops a token inside a wall -> blocked; a door counts only while closed
|
|
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
|
|
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
|
|
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
|
|
[OK] the overlap test, the escape and the push use the token's own radius
|
|
[OK] a big token is refused where a small one passes, on the same geometry
|
|
[OK] the door push clears the token's own radius
|
|
[OK] a grow that already fits does not move the token
|
|
[OK] grow inside r of a wall pushes it out by the minimal perpendicular distance
|
|
[OK] grow with no room on either side squeezes the token and leaves it in place
|
|
[FAILED] a squeeze from a failed grow clears when a later shrink ends the overlap
|
|
[FAILED] a shrink that still overlaps keeps the stuck entry
|
|
[OK] a grow out of a corner relaxes off both walls
|
|
[OK] a grow that would have to cross a wall squeezes instead of jumping through it
|
|
[OK] a grow that would leave the world squeezes instead of teleporting the token
|
|
[OK] resize ignores an out-of-range token index
|
|
[OK] a GM-sourced lock refuses player moves without touching the walls entries
|
|
[OK] a wall added over a GM-locked token only adds the walls entry
|
|
[OK] the GM clear of the walls entries leaves a GM-sourced entry alone (no rule runs)
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/ao/w/tests/tmoverules'
|
|
# test exit=1; expected tests failed: 2
|
|
[FAILED] a squeeze from a failed grow clears when a later shrink ends the overlap
|
|
[FAILED] a shrink that still overlaps keeps the stuck entry
|
|
|
|
ao: exit=1 expected_failed=2 ok
|
|
## ap: the property cap is not enforced
|
|
# diff server/props.nim -> mutated copy:
|
|
# 105d104
|
|
# < if not p[bucket].hasKey(key) and p[bucket].len >= MaxPropKeys: return false
|
|
[FAILED] 64 keys per bucket, the 65th is refused and nothing changes
|
|
[OK] an existing key can still be overwritten at the cap
|
|
[OK] a key is 1..64 code points, trimmed, with no control characters
|
|
[OK] a value is at most 8 KB of serialized JSON
|
|
[OK] absent and null mean three empty buckets
|
|
[OK] the three bucket names are the only ones accepted
|
|
[FAILED] the caps are enforced while parsing
|
|
[OK] with no entries every key is accepted in every bucket
|
|
[OK] a registered key is enforced: kind and bucket
|
|
[OK] a schema with no bucket accepts the key anywhere
|
|
[OK] unsetting an absent key is allowed and reports it did nothing
|
|
[OK] buckets are independent: the same key may live in all three
|
|
[OK] propsJson carries all three buckets, always as objects
|
|
[OK] clone gives fresh buckets: editing the copy cannot reach the original
|
|
[OK] normalize repairs nil buckets
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/ap/w/tests/tprops'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] 64 keys per bucket, the 65th is refused and nothing changes
|
|
|
|
ap: exit=1 expected_failed=1 ok
|
|
## aq: the grow push is skipped
|
|
# diff server/moverules.nim -> mutated copy:
|
|
# 373c373
|
|
# < if not grew:
|
|
# ---
|
|
# > if true:
|
|
[OK] crossing blocked, parallel ok
|
|
[OK] grazing an endpoint is blocked
|
|
[OK] no leak through shared vertex
|
|
[OK] diagonal squeeze through corner vertex of L
|
|
[OK] moving along a collinear wall is blocked
|
|
[OK] doors
|
|
[OK] zero-length move
|
|
[OK] near pillar: circle overlapping blocked, clear ok (ported)
|
|
[OK] closed door blocks near, open door passes (ported)
|
|
[OK] 64px corridor and doorway passable on the centreline (ported)
|
|
[OK] corner clipping: path passes the wall end closer than r though both ends are clear
|
|
[OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear)
|
|
[OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked
|
|
[OK] leg of the path inside r of a non-start wall blocks even if start and end are clear
|
|
[OK] exactly on a wall: can step off perpendicular, either side, to a clear spot
|
|
[OK] exactly on a wall: still refused when it would stay overlapped or run along/through
|
|
[OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype
|
|
[OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
|
|
[OK] escaping one wall does not excuse another
|
|
[OK] escape from a closed door; an open door never needed an escape
|
|
[OK] overlapping at a wall end: leave past the end without crossing
|
|
[OK] owner check: not yours is mkError, no position
|
|
[OK] GM-controlled token (no owner): players get mkError
|
|
[OK] step cap = scene default without vision, token vision radius with it
|
|
[OK] over-cap, wall, lock-flag and out-of-bounds nacks are identical
|
|
[OK] an accepted move applies and echoes the destination
|
|
[OK] player move honours walls (capsule) via moveToken
|
|
[OK] GM: ignores walls, step cap and the lock; bounds still apply
|
|
[OK] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
[OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does
|
|
[OK] open door added or opened never sets; closing a door on a token pushes it, never sets
|
|
[OK] a stuck token: player moves refused, GM move allowed
|
|
[OK] cleared by removing the wall; unrelated removals keep it
|
|
[OK] cleared by opening the door; a second open is a no-op
|
|
[OK] cleared by the GM; not re-set by itself
|
|
[OK] wall update = remove then add
|
|
[OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear
|
|
[OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
[OK] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
[OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door
|
|
[OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side
|
|
[OK] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
[OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody
|
|
[OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged
|
|
[OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
|
|
[OK] KEEP: wall update away from one of two overlapping walls keeps blocked
|
|
[OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
|
|
[OK] GM drops a token inside a wall -> blocked; a door counts only while closed
|
|
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
|
|
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
|
|
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
|
|
[OK] the overlap test, the escape and the push use the token's own radius
|
|
[OK] a big token is refused where a small one passes, on the same geometry
|
|
[OK] the door push clears the token's own radius
|
|
[OK] a grow that already fits does not move the token
|
|
[FAILED] grow inside r of a wall pushes it out by the minimal perpendicular distance
|
|
[FAILED] grow with no room on either side squeezes the token and leaves it in place
|
|
[FAILED] a squeeze from a failed grow clears when a later shrink ends the overlap
|
|
[OK] a shrink that still overlaps keeps the stuck entry
|
|
[FAILED] a grow out of a corner relaxes off both walls
|
|
[FAILED] a grow that would have to cross a wall squeezes instead of jumping through it
|
|
[FAILED] a grow that would leave the world squeezes instead of teleporting the token
|
|
[OK] resize ignores an out-of-range token index
|
|
[OK] a GM-sourced lock refuses player moves without touching the walls entries
|
|
[OK] a wall added over a GM-locked token only adds the walls entry
|
|
[OK] the GM clear of the walls entries leaves a GM-sourced entry alone (no rule runs)
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/aq/w/tests/tmoverules'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] grow inside r of a wall pushes it out by the minimal perpendicular distance
|
|
|
|
aq: exit=1 expected_failed=1 ok
|
|
## ar: a failed grow is not flagged squeezed
|
|
# diff server/moverules.nim -> mutated copy:
|
|
# 384d383
|
|
# < sc.tokens[ti].squeezedWalls = true
|
|
[OK] crossing blocked, parallel ok
|
|
[OK] grazing an endpoint is blocked
|
|
[OK] no leak through shared vertex
|
|
[OK] diagonal squeeze through corner vertex of L
|
|
[OK] moving along a collinear wall is blocked
|
|
[OK] doors
|
|
[OK] zero-length move
|
|
[OK] near pillar: circle overlapping blocked, clear ok (ported)
|
|
[OK] closed door blocks near, open door passes (ported)
|
|
[OK] 64px corridor and doorway passable on the centreline (ported)
|
|
[OK] corner clipping: path passes the wall end closer than r though both ends are clear
|
|
[OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear)
|
|
[OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked
|
|
[OK] leg of the path inside r of a non-start wall blocks even if start and end are clear
|
|
[OK] exactly on a wall: can step off perpendicular, either side, to a clear spot
|
|
[OK] exactly on a wall: still refused when it would stay overlapped or run along/through
|
|
[OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype
|
|
[OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
|
|
[OK] escaping one wall does not excuse another
|
|
[OK] escape from a closed door; an open door never needed an escape
|
|
[OK] overlapping at a wall end: leave past the end without crossing
|
|
[OK] owner check: not yours is mkError, no position
|
|
[OK] GM-controlled token (no owner): players get mkError
|
|
[OK] step cap = scene default without vision, token vision radius with it
|
|
[OK] over-cap, wall, lock-flag and out-of-bounds nacks are identical
|
|
[OK] an accepted move applies and echoes the destination
|
|
[OK] player move honours walls (capsule) via moveToken
|
|
[OK] GM: ignores walls, step cap and the lock; bounds still apply
|
|
[OK] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
[OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does
|
|
[OK] open door added or opened never sets; closing a door on a token pushes it, never sets
|
|
[OK] a stuck token: player moves refused, GM move allowed
|
|
[OK] cleared by removing the wall; unrelated removals keep it
|
|
[OK] cleared by opening the door; a second open is a no-op
|
|
[OK] cleared by the GM; not re-set by itself
|
|
[OK] wall update = remove then add
|
|
[OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear
|
|
[OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
[OK] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
[OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door
|
|
[OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side
|
|
[OK] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
[OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody
|
|
[OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged
|
|
[OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
|
|
[OK] KEEP: wall update away from one of two overlapping walls keeps blocked
|
|
[OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
|
|
[OK] GM drops a token inside a wall -> blocked; a door counts only while closed
|
|
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
|
|
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
|
|
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
|
|
[OK] the overlap test, the escape and the push use the token's own radius
|
|
[OK] a big token is refused where a small one passes, on the same geometry
|
|
[OK] the door push clears the token's own radius
|
|
[OK] a grow that already fits does not move the token
|
|
[OK] grow inside r of a wall pushes it out by the minimal perpendicular distance
|
|
[FAILED] grow with no room on either side squeezes the token and leaves it in place
|
|
[OK] a squeeze from a failed grow clears when a later shrink ends the overlap
|
|
[OK] a shrink that still overlaps keeps the stuck entry
|
|
[OK] a grow out of a corner relaxes off both walls
|
|
[FAILED] a grow that would have to cross a wall squeezes instead of jumping through it
|
|
[FAILED] a grow that would leave the world squeezes instead of teleporting the token
|
|
[OK] resize ignores an out-of-range token index
|
|
[OK] a GM-sourced lock refuses player moves without touching the walls entries
|
|
[OK] a wall added over a GM-locked token only adds the walls entry
|
|
[OK] the GM clear of the walls entries leaves a GM-sourced entry alone (no rule runs)
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/ar/w/tests/tmoverules'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] grow with no room on either side squeezes the token and leaves it in place
|
|
|
|
ar: exit=1 expected_failed=1 ok
|
|
## as: a failed door push sticks instead of squeezing
|
|
# diff server/moverules.nim -> mutated copy:
|
|
# 291c291
|
|
# < sc.tokens[i].squeezedWalls = true
|
|
# ---
|
|
# > sc.tokens[i].stuckWalls = true
|
|
[OK] crossing blocked, parallel ok
|
|
[OK] grazing an endpoint is blocked
|
|
[OK] no leak through shared vertex
|
|
[OK] diagonal squeeze through corner vertex of L
|
|
[OK] moving along a collinear wall is blocked
|
|
[OK] doors
|
|
[OK] zero-length move
|
|
[OK] near pillar: circle overlapping blocked, clear ok (ported)
|
|
[OK] closed door blocks near, open door passes (ported)
|
|
[OK] 64px corridor and doorway passable on the centreline (ported)
|
|
[OK] corner clipping: path passes the wall end closer than r though both ends are clear
|
|
[OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear)
|
|
[OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked
|
|
[OK] leg of the path inside r of a non-start wall blocks even if start and end are clear
|
|
[OK] exactly on a wall: can step off perpendicular, either side, to a clear spot
|
|
[OK] exactly on a wall: still refused when it would stay overlapped or run along/through
|
|
[OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype
|
|
[OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
|
|
[OK] escaping one wall does not excuse another
|
|
[OK] escape from a closed door; an open door never needed an escape
|
|
[OK] overlapping at a wall end: leave past the end without crossing
|
|
[OK] owner check: not yours is mkError, no position
|
|
[OK] GM-controlled token (no owner): players get mkError
|
|
[OK] step cap = scene default without vision, token vision radius with it
|
|
[OK] over-cap, wall, lock-flag and out-of-bounds nacks are identical
|
|
[OK] an accepted move applies and echoes the destination
|
|
[OK] player move honours walls (capsule) via moveToken
|
|
[OK] GM: ignores walls, step cap and the lock; bounds still apply
|
|
[OK] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
[OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does
|
|
[OK] open door added or opened never sets; closing a door on a token pushes it, never sets
|
|
[OK] a stuck token: player moves refused, GM move allowed
|
|
[OK] cleared by removing the wall; unrelated removals keep it
|
|
[OK] cleared by opening the door; a second open is a no-op
|
|
[OK] cleared by the GM; not re-set by itself
|
|
[OK] wall update = remove then add
|
|
[OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear
|
|
[OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
[OK] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
[OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door
|
|
[OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side
|
|
[FAILED] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
[OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody
|
|
[OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged
|
|
[OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
|
|
[OK] KEEP: wall update away from one of two overlapping walls keeps blocked
|
|
[OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
|
|
[OK] GM drops a token inside a wall -> blocked; a door counts only while closed
|
|
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
|
|
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
|
|
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
|
|
[OK] the overlap test, the escape and the push use the token's own radius
|
|
[OK] a big token is refused where a small one passes, on the same geometry
|
|
[OK] the door push clears the token's own radius
|
|
[OK] a grow that already fits does not move the token
|
|
[OK] grow inside r of a wall pushes it out by the minimal perpendicular distance
|
|
[OK] grow with no room on either side squeezes the token and leaves it in place
|
|
[OK] a squeeze from a failed grow clears when a later shrink ends the overlap
|
|
[OK] a shrink that still overlaps keeps the stuck entry
|
|
[OK] a grow out of a corner relaxes off both walls
|
|
[OK] a grow that would have to cross a wall squeezes instead of jumping through it
|
|
[OK] a grow that would leave the world squeezes instead of teleporting the token
|
|
[OK] resize ignores an out-of-range token index
|
|
[OK] a GM-sourced lock refuses player moves without touching the walls entries
|
|
[OK] a wall added over a GM-locked token only adds the walls entry
|
|
[OK] the GM clear of the walls entries leaves a GM-sourced entry alone (no rule runs)
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/as/w/tests/tmoverules'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
|
|
as: exit=1 expected_failed=1 ok
|
|
## at: one bucket budget shared by all buckets
|
|
# diff server/props.nim -> mutated copy:
|
|
# 105c105
|
|
# < if not p[bucket].hasKey(key) and p[bucket].len >= MaxPropKeys: return false
|
|
# ---
|
|
# > if not p[bucket].hasKey(key) and p[pbPublic].len >= MaxPropKeys: return false
|
|
[FAILED] 64 keys per bucket, the 65th is refused and nothing changes
|
|
[OK] an existing key can still be overwritten at the cap
|
|
[OK] a key is 1..64 code points, trimmed, with no control characters
|
|
[OK] a value is at most 8 KB of serialized JSON
|
|
[OK] absent and null mean three empty buckets
|
|
[OK] the three bucket names are the only ones accepted
|
|
[OK] the caps are enforced while parsing
|
|
[OK] with no entries every key is accepted in every bucket
|
|
[OK] a registered key is enforced: kind and bucket
|
|
[OK] a schema with no bucket accepts the key anywhere
|
|
[OK] unsetting an absent key is allowed and reports it did nothing
|
|
[OK] buckets are independent: the same key may live in all three
|
|
[OK] propsJson carries all three buckets, always as objects
|
|
[OK] clone gives fresh buckets: editing the copy cannot reach the original
|
|
[OK] normalize repairs nil buckets
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/at/w/tests/tprops'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] 64 keys per bucket, the 65th is refused and nothing changes
|
|
|
|
at: exit=1 expected_failed=1 ok
|
|
## au: a grow that already fits still pushes
|
|
# diff server/moverules.nim -> mutated copy:
|
|
# 370c370
|
|
# < if not overlapsAny(sc, sc.tokens[ti]):
|
|
# ---
|
|
# > if false:
|
|
[OK] crossing blocked, parallel ok
|
|
[OK] grazing an endpoint is blocked
|
|
[OK] no leak through shared vertex
|
|
[OK] diagonal squeeze through corner vertex of L
|
|
[OK] moving along a collinear wall is blocked
|
|
[OK] doors
|
|
[OK] zero-length move
|
|
[OK] near pillar: circle overlapping blocked, clear ok (ported)
|
|
[OK] closed door blocks near, open door passes (ported)
|
|
[OK] 64px corridor and doorway passable on the centreline (ported)
|
|
[OK] corner clipping: path passes the wall end closer than r though both ends are clear
|
|
[OK] parallel pass: r clear, just under r blocked (touching at exactly r is clear)
|
|
[OK] diagonal squeeze past an L corner with a gap narrower than 2r is blocked
|
|
[OK] leg of the path inside r of a non-start wall blocks even if start and end are clear
|
|
[OK] exactly on a wall: can step off perpendicular, either side, to a clear spot
|
|
[OK] exactly on a wall: still refused when it would stay overlapped or run along/through
|
|
[OK] r = 0: standing on a wall is not an escape case (touch blocks), as the prototype
|
|
[OK] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
|
|
[OK] escaping one wall does not excuse another
|
|
[OK] escape from a closed door; an open door never needed an escape
|
|
[OK] overlapping at a wall end: leave past the end without crossing
|
|
[OK] owner check: not yours is mkError, no position
|
|
[OK] GM-controlled token (no owner): players get mkError
|
|
[OK] step cap = scene default without vision, token vision radius with it
|
|
[OK] over-cap, wall, lock-flag and out-of-bounds nacks are identical
|
|
[OK] an accepted move applies and echoes the destination
|
|
[OK] player move honours walls (capsule) via moveToken
|
|
[OK] GM: ignores walls, step cap and the lock; bounds still apply
|
|
[OK] wall added within r of the circle (centre not on it) sets stuck; exactly r does not
|
|
[OK] GM-controlled tokens get the flag too; wall bbox does not matter, distance does
|
|
[OK] open door added or opened never sets; closing a door on a token pushes it, never sets
|
|
[OK] a stuck token: player moves refused, GM move allowed
|
|
[OK] cleared by removing the wall; unrelated removals keep it
|
|
[OK] cleared by opening the door; a second open is a no-op
|
|
[OK] cleared by the GM; not re-set by itself
|
|
[OK] wall update = remove then add
|
|
[OK] GM placement and GM move onto a wall: blocked; player escape works only after a GM clear
|
|
[OK] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
|
|
[OK] push: centre on the door line -> side of the previous position; no history -> left of a->b
|
|
[OK] push: past the end of the door the offset shrinks (minimal), still >= r from the door
|
|
[OK] push: one side blocked by another wall -> the other side; out of bounds -> the other side
|
|
[OK] push: both sides invalid -> squeezed in place; door open -> still squeezed (KEEP); GM can move it
|
|
[OK] push: wall added on a token still sticks it (regression); closing on nobody pushes nobody
|
|
[OK] doorway: token in an open doorway, door closes -> pushed clear, free; door reopens/closes again -> unchanged
|
|
[OK] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
|
|
[OK] KEEP: wall update away from one of two overlapping walls keeps blocked
|
|
[OK] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
|
|
[OK] GM drops a token inside a wall -> blocked; a door counts only while closed
|
|
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
|
|
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
|
|
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
|
|
[OK] the overlap test, the escape and the push use the token's own radius
|
|
[OK] a big token is refused where a small one passes, on the same geometry
|
|
[OK] the door push clears the token's own radius
|
|
[FAILED] a grow that already fits does not move the token
|
|
[OK] grow inside r of a wall pushes it out by the minimal perpendicular distance
|
|
[OK] grow with no room on either side squeezes the token and leaves it in place
|
|
[FAILED] a squeeze from a failed grow clears when a later shrink ends the overlap
|
|
[FAILED] a shrink that still overlaps keeps the stuck entry
|
|
[OK] a grow out of a corner relaxes off both walls
|
|
[OK] a grow that would have to cross a wall squeezes instead of jumping through it
|
|
[OK] a grow that would leave the world squeezes instead of teleporting the token
|
|
[OK] resize ignores an out-of-range token index
|
|
[OK] a GM-sourced lock refuses player moves without touching the walls entries
|
|
[OK] a wall added over a GM-locked token only adds the walls entry
|
|
[OK] the GM clear of the walls entries leaves a GM-sourced entry alone (no rule runs)
|
|
Error: execution of an external program failed: '/tmp/fffmut.FwYLf4/au/w/tests/tmoverules'
|
|
# test exit=1; expected tests failed: 1
|
|
[FAILED] a grow that already fits does not move the token
|
|
|
|
au: exit=1 expected_failed=1 ok
|
|
exit=0
|