Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Why does this have return code 0 when executed?
default:
ocamlfind ocamlc -o test_test -package oUnit -linkpkg -g test.ml
clean:
rm *.cmi *.cmo *.cmx test_test
open OUnit
let test1 () = assert_failure "Test failure"
let suite = "suite" >::: ["test1" >:: test1]
let _ =
run_test_tt_main suite
@simonjbeaumont

This comment has been minimized.

Copy link
Owner Author

simonjbeaumont commented May 13, 2014

For me, running the executable from the above ./test_test states there was a failure but the executable returns 0. Contrary to the following docs for OUnit:

When using OUnit.run_test_tt_main, a non zero exit code signals that the test suite was not successful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.