dryunitversion

A detection tool for traditional unit testing in OCaml

Dryunit is a generates bootstrap code for test frameworks. As a result, you get to use plain old OCaml. For more information, checkout the repository.

Installation

opam install dryunit

Conventions

  • Test files should either be called tests.ml or something_tests.ml
  • Test functions should called test_something
  • By default, test executables are named main

Usage

If you use jbuilder, you can get started using this:

mkdir tests
dryunit init > tests/jbuild

You can also define the framework explicitly using dryunit init alcotest. Adding a sample test:

echo "let test_error () = raise Not_found" > tests/something_tests.ml
jbuilder build tests/main.exe && _build/default/tests/main.exe
AuthorGerson Moraes
Published
Homepagehttps://github.com/gersonmoraes/dryunit
Issue Trackerhttps://github.com/gersonmoraes/dryunit
Maintainergerson.xp@gmail.com
Dependencies
Source [http] https://github.com/gersonmoraes/dryunit/archive/0.4.0.tar.gz
sha256=1134433d6fe4697171a2b62f762df7ea294329729ffc6a41f974c9042295f0af
md5=14f1029a3c628eeaef50c025b454215e
Edithttps://github.com/ocaml/opam-repository/tree/master/packages/dryunit/dryunit.0.4.0/opam
No package is dependent