test(selection-test): cheap-fill M3 gap + Coverage Statements (Test-Cov Phase 2.5)

3 mutations tested. 2 caught, 1 uncaught (M3: add unregistered-handle guard absent).
Cheap-fill: added pcall assertions for add(unregistered) and toggle(unregistered).
This commit is contained in:
Axel Meyer
2026-05-16 02:38:21 +02:00
parent e955905b1b
commit 80688aa832
2 changed files with 53 additions and 1 deletions

View File

@@ -64,9 +64,13 @@ function M.run_tests(ctx)
T.assert(hc[1]==50 and hc[2]==60 and hc[3]==70 and hc[4]==80,
"set_highlight_color writes correctly")
-- Error-Handling (1)
-- Error-Handling (3)
local ok = pcall(function() selection.set_drag_threshold(-1) end)
T.assert(not ok, "set_drag_threshold(-1) errors")
local ok2 = pcall(function() selection.add(99999) end)
T.assert(not ok2, "add(unregistered) errors")
local ok3 = pcall(function() selection.toggle(99999) end)
T.assert(not ok3, "toggle(unregistered) errors")
end
return M