ocaml-gospel / ortac

Runtime assertion checking based on Gospel specifications
https://ocaml-gospel.github.io/ortac/
MIT License
37 stars 10 forks source link

Add tests for generated code behaviour #252

Open n-osborne opened 1 week ago

n-osborne commented 1 week ago

Most of our tests are expect tests regarding the generated code. The github workflow includes the dune build @launchtests call that actually run the generated code. This expects the test to be successful.

There is nothing checking the behaviour of the generated code that report an error in the tested module.

248 was indeed spotted relatively late after the introduction of the concerned feature (and the bug) due to the lack of such tests.

We want to test:

We should have some expect tests in which generated code for some buggy modules (examples of different failures) is run.

/!\ in order to have a reproducible output, we should run the generated code with a given seed.