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.1.tar.gz
sha256=565520bc97d257e6ffafbd0876c1f844b1c1fbfed9dd77958c5dfe1a80f679b0
md5=307fbc627e3fb70092ae547934b3521e
Edithttps://github.com/ocaml/opam-repository/tree/master/packages/dryunit/dryunit.0.4.1/opam
No package is dependent