madlib
madlib copied to clipboard
Test runner - wrong type for test
Symptoms:
-
What did you expect to happen? When running tests and the top level test is not of the right type and/or calling
test(..)
, the compiler should report an error. -
What actually happened? It tried to compile but then monomorphization got wasn't processing that and some dependencies were not resolved. Example:
pipe(
Ap.liftA2(
(input, output) => List.zip(cleanLines(input), cleanLines(output)),
read("./corpus-output.txt"),
),
map(
map(where { #[input, output] => test(`stemmer: ${input}`, () => assertEquals(output, input)) }),
),
Wish.fulfill(traceDrop("Something broke"), traceDrop("tests generated!")),
)(read("./corpus-input.txt"))
from here: https://github.com/brekk/mad-english/blob/8926883a3150bd64609b8a0d06c9dec427f81bf8/src/Integration.spec.mad#L26
Reproduction instructions
-
madlib test