ocaml-gospel / ortac

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

Add an optional argument for protecting the run of the tests #205

Open n-osborne opened 5 months ago

n-osborne commented 5 months ago

This PR propose to add a -p optional argument to the Ortac/QCheck-STM command-line.

The new optional argument takes a string which should be the name of the function to call. The function should be implemented in the module passed to the -i option. The funciton has type (unit -> unit) -> unit, which means that running the tests is suspended so the basic usage is:

let run_tests tests = (* do something *) (tests ())
n-osborne commented 5 months ago

Note to myself: I need to add the equivalent optional argument to Ortac/Dune plugin.

n-osborne commented 2 months ago

Converting to draft as it is not up to date with the module-based configuration from #214