Module
poke/regression
src/poke/regression.pookaA bug already met should not need a second introduction.
Keep small, named input/output examples beside the issue they protect. The first failed case raises a structured comparison in the ordinary test runner.
API reference
class Case(name: String, input: a, expected: b)
name: String
INFERRED
Stringinput: a
INFERRED
aexpected: b
INFERRED
b
INFERRED
fn(String, a, b) -> poke/regression.Case(a, b)check(cases: List(Case(a, b)), run: fn(a) -> b) -> Nil
INFERRED
fn(List(poke/regression.Case(a, b)), fn(a) -> b) -> NilRun named examples through one function. Each input is evaluated once.
regression.check([regression.Case("issue-12", 2, 4)], fn(n) { n * 2 })