results: slice 4 test and mutation logs (#19)
This commit is contained in:
+304
-28
@@ -59,6 +59,7 @@
|
||||
[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 to slice 3: the scene is seeded, players and keys survive
|
||||
[OK] open space is a circle
|
||||
[OK] wall blocks
|
||||
[OK] shared endpoint: no leak at the vertex
|
||||
@@ -168,7 +169,7 @@
|
||||
[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 this slice's intents answer with a real handler
|
||||
[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
|
||||
@@ -183,9 +184,31 @@
|
||||
[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] 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
|
||||
@@ -227,7 +250,7 @@ control: exit=0 expected_failed=0 ok
|
||||
[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.Fly4Fe/a/w/tests/tgeometry'
|
||||
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/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
|
||||
|
||||
@@ -271,7 +294,7 @@ a: exit=1 expected_failed=1 ok
|
||||
[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.Fly4Fe/b/w/tests/tgeometry'
|
||||
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/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)
|
||||
@@ -316,7 +339,7 @@ b: exit=1 expected_failed=2 ok
|
||||
[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.Fly4Fe/c/w/tests/tgeometry'
|
||||
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/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)
|
||||
@@ -361,7 +384,7 @@ c: exit=1 expected_failed=2 ok
|
||||
[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.Fly4Fe/d1/w/tests/tgeometry'
|
||||
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/d1/w/tests/tgeometry'
|
||||
# test exit=1; expected tests failed: 1
|
||||
[FAILED] shared vertex: both arms required (mutation d1/d2)
|
||||
|
||||
@@ -405,7 +428,7 @@ d1: exit=1 expected_failed=1 ok
|
||||
[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.Fly4Fe/d2/w/tests/tgeometry'
|
||||
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/d2/w/tests/tgeometry'
|
||||
# test exit=1; expected tests failed: 1
|
||||
[FAILED] shared vertex: both arms required (mutation d1/d2)
|
||||
|
||||
@@ -447,7 +470,7 @@ d2: exit=1 expected_failed=1 ok
|
||||
[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.Fly4Fe/e/w/tests/tgeometry'
|
||||
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/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
|
||||
@@ -512,7 +535,7 @@ e: exit=1 expected_failed=4 ok
|
||||
[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
|
||||
Error: execution of an external program failed: '/tmp/fffmut.Fly4Fe/f/w/tests/tmoverules'
|
||||
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/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
|
||||
|
||||
@@ -574,7 +597,7 @@ f: exit=1 expected_failed=1 ok
|
||||
[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
|
||||
Error: execution of an external program failed: '/tmp/fffmut.Fly4Fe/g/w/tests/tmoverules'
|
||||
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/g/w/tests/tmoverules'
|
||||
# test exit=1; expected tests failed: 1
|
||||
[FAILED] GM: ignores walls, step cap and blocked; bounds still apply
|
||||
|
||||
@@ -636,7 +659,7 @@ g: exit=1 expected_failed=1 ok
|
||||
[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
|
||||
Error: execution of an external program failed: '/tmp/fffmut.Fly4Fe/h/w/tests/tmoverules'
|
||||
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/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
|
||||
@@ -697,13 +720,13 @@ h: exit=1 expected_failed=2 ok
|
||||
[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
|
||||
Error: execution of an external program failed: '/tmp/fffmut.Fly4Fe/i/w/tests/tmoverules'
|
||||
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/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 unflag or move a blocked token
|
||||
[OK] doors beyond the bound: opening or closing them changes no reply
|
||||
Error: execution of an external program failed: '/tmp/fffmut.Fly4Fe/i/w/tests/tprobing'
|
||||
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/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
|
||||
@@ -766,7 +789,7 @@ i: exit=1 expected_failed=2 ok
|
||||
[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
|
||||
Error: execution of an external program failed: '/tmp/fffmut.Fly4Fe/j/w/tests/tmoverules'
|
||||
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/j/w/tests/tmoverules'
|
||||
# test exit=1; expected tests failed: 2
|
||||
[FAILED] wall added within r of the circle (centre not on it) sets blocked; 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
|
||||
@@ -829,7 +852,7 @@ j: exit=1 expected_failed=2 ok
|
||||
[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
|
||||
Error: execution of an external program failed: '/tmp/fffmut.Fly4Fe/k/w/tests/tmoverules'
|
||||
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/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
|
||||
@@ -890,7 +913,7 @@ k: exit=1 expected_failed=2 ok
|
||||
[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
|
||||
Error: execution of an external program failed: '/tmp/fffmut.Fly4Fe/l/w/tests/tmoverules'
|
||||
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/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
|
||||
@@ -954,7 +977,7 @@ l: exit=1 expected_failed=3 ok
|
||||
[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
|
||||
Error: execution of an external program failed: '/tmp/fffmut.Fly4Fe/m/w/tests/tmoverules'
|
||||
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/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
|
||||
@@ -1018,7 +1041,7 @@ m: exit=1 expected_failed=3 ok
|
||||
[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
|
||||
Error: execution of an external program failed: '/tmp/fffmut.Fly4Fe/n/w/tests/tmoverules'
|
||||
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/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 -> blocked in place; door open -> free; GM can still move it
|
||||
@@ -1081,14 +1104,14 @@ n: exit=1 expected_failed=2 ok
|
||||
[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
|
||||
Error: execution of an external program failed: '/tmp/fffmut.Fly4Fe/o/w/tests/tmoverules'
|
||||
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/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:
|
||||
# 195d194
|
||||
# 218d217
|
||||
# < 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
|
||||
@@ -1096,7 +1119,7 @@ o: exit=1 expected_failed=1 ok
|
||||
[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 this slice's intents answer with a real handler
|
||||
[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
|
||||
@@ -1111,14 +1134,17 @@ o: exit=1 expected_failed=1 ok
|
||||
[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
|
||||
Error: execution of an external program failed: '/tmp/fffmut.Fly4Fe/p/w/tests/tprotocol'
|
||||
[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.qQ0jtz/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:
|
||||
# 129c129
|
||||
# 131c131
|
||||
# < if reqId < 0 or reqId > MaxReqId: return
|
||||
# ---
|
||||
# > if reqId < 0: return
|
||||
@@ -1128,7 +1154,7 @@ p: exit=1 expected_failed=1 ok
|
||||
[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 this slice's intents answer with a real handler
|
||||
[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
|
||||
@@ -1143,14 +1169,17 @@ p: exit=1 expected_failed=1 ok
|
||||
[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
|
||||
Error: execution of an external program failed: '/tmp/fffmut.Fly4Fe/q/w/tests/tprotocol'
|
||||
[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.qQ0jtz/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:
|
||||
# 216c216
|
||||
# 239c239
|
||||
# < result = f.count >= MalformedFloodLimit and (nowMs - oldest) <= MalformedFloodWindowMs
|
||||
# ---
|
||||
# > result = f.count > MalformedFloodLimit and (nowMs - oldest) <= MalformedFloodWindowMs
|
||||
@@ -1160,7 +1189,7 @@ q: exit=1 expected_failed=1 ok
|
||||
[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 this slice's intents answer with a real handler
|
||||
[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
|
||||
@@ -1175,7 +1204,10 @@ q: exit=1 expected_failed=1 ok
|
||||
[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
|
||||
Error: execution of an external program failed: '/tmp/fffmut.Fly4Fe/r/w/tests/tprotocol'
|
||||
[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.qQ0jtz/r/w/tests/tprotocol'
|
||||
# test exit=1; expected tests failed: 1
|
||||
[FAILED] nine malformed frames are tolerated, the tenth closes
|
||||
|
||||
@@ -1201,9 +1233,253 @@ r: exit=1 expected_failed=1 ok
|
||||
[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.Fly4Fe/s/w/tests/tconns'
|
||||
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/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.qQ0jtz/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.qQ0jtz/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.qQ0jtz/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.qQ0jtz/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.qQ0jtz/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.qQ0jtz/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.qQ0jtz/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.qQ0jtz/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
|
||||
exit=0
|
||||
|
||||
+33
-1
@@ -86,6 +86,7 @@
|
||||
... [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 to slice 3: the scene is seeded, players and keys survive
|
||||
Success: Execution finished
|
||||
Compiling /home/davide/Projects/GDR/FFF_vtt/tests/testutil (from package fff_vtt) using c backend
|
||||
Success: Execution finished
|
||||
@@ -227,7 +228,7 @@
|
||||
... [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 this slice's intents answer with a real handler
|
||||
... [OK] only the built slices' intents answer with a real handler
|
||||
... [Suite] intent rate limit (6.4: 30/s, burst 100)
|
||||
... [OK] a fresh bucket allows exactly the burst, then refuses
|
||||
... [OK] refill is continuous at 30/s, capped at the burst
|
||||
@@ -245,6 +246,10 @@
|
||||
... [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
|
||||
... [Suite] wall frames (6.1 `walls`, `wall`, `wall_gone`; GM only)
|
||||
... [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
|
||||
Success: Execution finished
|
||||
Compiling /home/davide/Projects/GDR/FFF_vtt/tests/tscenegen (from package fff_vtt) using c backend
|
||||
Nim Output [Suite] scenegen (bench scenes)
|
||||
@@ -252,4 +257,31 @@
|
||||
... [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
|
||||
Success: Execution finished
|
||||
Compiling /home/davide/Projects/GDR/FFF_vtt/tests/tworld (from package fff_vtt) using c backend
|
||||
Nim Output [Suite] scene (migration step 3, Q3: exactly one scene)
|
||||
... [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)
|
||||
... [Suite] field parsing (6.1 field notes)
|
||||
... [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
|
||||
... [Suite] wall ids (FIXED #3: per scene, monotonic, never reused)
|
||||
... [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
|
||||
... [Suite] persistence (write-through, restart-identical)
|
||||
... [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
|
||||
... [Suite] validation (DESIGN 6.1 `wall.*`)
|
||||
... [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
|
||||
... [Suite] lookup outcomes (main.nim's 6.5 mapping)
|
||||
... [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
|
||||
Success: Execution finished
|
||||
Success: All tests passed
|
||||
|
||||
Reference in New Issue
Block a user