semgrep / testo

Test framework for OCaml
ISC License
16 stars 1 forks source link

Create a third library for the modules that can be shared between Testo and Testo_lwt #68

Closed mjambon closed 4 months ago

mjambon commented 4 months ago

This allows sharing tags because they now have the same type. All the modules that don't depend on the Monad.t type moved to this new library.

test plan: Check that the Tag module is shared as follows:

$ dune utop
...
utop # Testo.Tag.declare "a";;
- : Testo.Tag.t = "a"

utop # Testo_lwt.Tag.declare "a";;
Exception:
Internal error in the Testo library at File "util/Tag.ml", line 44, characters 23-30: Invalid argument: Testo.declare_tag: tag "a" was declared multiple times.
Each tag must be declared exactly once to avoid accidental conflicts.

PR checklist:

Check out CONTRIBUTING.md for more details.