dryunit
Author | Gerson Moraes | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Homepage | https://github.com/gersonmoraes/dryunit | |||||||||||||||||
Issue Tracker | https://github.com/gersonmoraes/dryunit | |||||||||||||||||
Maintainer | gerson.xp@gmail.com | |||||||||||||||||
Dependencies |
| |||||||||||||||||
Available | ocaml-version >= "4.02.3" | |||||||||||||||||
Published | Oct 21, 2017 | |||||||||||||||||
Source [http] | https://github.com/gersonmoraes/dryunit/archive/0.4.1.tar.gz 307fbc627e3fb70092ae547934b3521e | |||||||||||||||||
Statistics | Not installed in the last month. | |||||||||||||||||
Edit | https://github.com/ocaml/opam-repository/tree/master/packages/dryunit/dryunit.0.4.1/opam |
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
orsomething_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
No package is dependent |