ounit
ounit copied to clipboard
Assert failure backtrace refers to internal library
This is the same issue as #17, however I'm using v2.2.4 which appears to include #19.
I'm using OCaml 4.12.1 and OUnit2 2.2.4:
$ opam list
...
ounit2 2.2.4 OUnit testing framework
ocaml-base-compiler 4.12.1 Official release 4.12.1
...
If I run a test using Lwt, I get the following error:
Raised at OUnitAssert.assert_failure in file "src/lib/ounit2/advanced/oUnitAssert.ml", line 45, characters 2-27
Called from OUnitTest.section_ctxt in file "src/lib/ounit2/advanced/oUnitTest.ml", line 130, characters 16-22
Re-raised at OUnitTest.section_ctxt in file "src/lib/ounit2/advanced/oUnitTest.ml", line 135, characters 6-13
Called from OUnitTest.non_fatal in file "src/lib/ounit2/advanced/oUnitTest.ml", line 267, characters 4-23
This makes it a lot harder to determine where the assertion failure occurs.
Do you have a minimal examples to reproduce the problem?
I am not using lwt, so I don't know how to test for this.
Also, it is probably unrelated but you should use https://opam.ocaml.org/packages/ounit2-lwt/. Lwt and OUnit don't work well together (because of some specific override that lwt has implemented when forking processes AFAIR).