test(command-test): cheap-fill M3 gap + Coverage Statements (Test-Cov Phase 2.6)
3 mutations tested. 2 caught, 1 uncaught (M3: cancel_all with 2+ simultaneous commands). Cheap-fill: added 2-unit simultaneous cancel_all scenario with both-nil assertions.
This commit is contained in:
6
init.lua
6
init.lua
@@ -56,7 +56,7 @@ function M.run_tests(ctx)
|
||||
T.equals(s2.x, 5, "arrival snap to target.x")
|
||||
T.assert(command.current(h2) == nil, "arrival clears active command")
|
||||
|
||||
-- Cancel + cancel_all (3)
|
||||
-- Cancel + cancel_all (5)
|
||||
s2.x, s2.y = 0, 0
|
||||
command.move_to({h2, h3}, 1000, 0)
|
||||
command.cancel(h2)
|
||||
@@ -64,6 +64,10 @@ function M.run_tests(ctx)
|
||||
T.assert(command.current(h3) ~= nil, "cancel doesn't affect h3")
|
||||
command.cancel_all()
|
||||
T.assert(command.current(h3) == nil, "cancel_all clears remaining")
|
||||
command.move_to({h2, h3}, 500, 0)
|
||||
command.cancel_all()
|
||||
T.assert(command.current(h2) == nil, "cancel_all clears h2 of 2-unit batch")
|
||||
T.assert(command.current(h3) == nil, "cancel_all clears h3 of 2-unit batch")
|
||||
|
||||
-- Speed-Setter (2)
|
||||
T.equals(command.speed(h2), 100, "speed from register")
|
||||
|
||||
Reference in New Issue
Block a user