Module

poke/regression

src/poke/regression.pooka

A 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

src/poke/regression.pooka:12
class Case(name: String, input: a, expected: b)
field

name

src/poke/regression.pooka:12
name: String
INFERREDString
field

input

src/poke/regression.pooka:12
input: a
INFERREDa
field

expected

src/poke/regression.pooka:12
expected: b
INFERREDb
constructor

new

src/poke/regression.pooka:12
INFERREDfn(String, a, b) -> poke/regression.Case(a, b)
function

check

src/poke/regression.pooka:19
check(cases: List(Case(a, b)), run: fn(a) -> b) -> Nil
INFERREDfn(List(poke/regression.Case(a, b)), fn(a) -> b) -> Nil

Run named examples through one function. Each input is evaluated once.

Pooka
regression.check([regression.Case("issue-12", 2, 4)], fn(n) { n * 2 })