madlib icon indicating copy to clipboard operation
madlib copied to clipboard

Test runner - wrong type for test

Open aboeglin opened this issue 1 year ago • 0 comments

Symptoms:

  1. 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.

  2. 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

  1. madlib test

aboeglin avatar Aug 13 '23 20:08 aboeglin