package CamelCase
A simple OCaml test framework
Install
Dune Dependency
Authors
Maintainers
Sources
v0.2.0.tar.gz
md5=334df29b3b3753c6493469ed2dada61f
sha512=7f49890441cf0b2f937984cffe4f3686c80966bd15a8e775e4dbbc5ae0a3ec893aecf8f05a8ea1641606c88161042c0c52ebd405b08b1bc160c3dd6b94a77269
Description
A simple OCaml test framework
README
CamelCase
A simple OCaml test framework
Install
(package
(name my_package)
(depends CamelCase))
; The package is not available on OPAM yet:
(pin (package (name CamelCase)) (url "git+https://github.com/atomicptr/CamelCase"))
Usage
open CamelCase
let safeDiv a = function
| 0 -> None
| b -> Some a / b
let () = run [
test "test if 2 + 2 = 4" (fun () -> IntValue.expect_equals 4 (2 + 2));
test "test safeDiv: 2 / 0 = None" (fun () -> expect_none (safeDiv 2 0);
test "test safeDiv: several cases" (fun () ->
expect_some (safeDiv 10 2) >>
IntValue.expect_equals 5 (10 / 2) >>
expect_some (safeDiv 5 1) >>
IntValue.expect_equals 1 (5 / 1));
]
License
MIT
Dependencies (3)
- ocamlformat
-
dune
>= "3.17"
-
ocaml
>= "4.08"
Dev Dependencies (1)
-
odoc
with-doc
Used by
None
Conflicts
None
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page