Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert failure backtrace refers to internal library #90

Open
zbaylin opened this issue Nov 20, 2021 · 1 comment
Open

Assert failure backtrace refers to internal library #90

zbaylin opened this issue Nov 20, 2021 · 1 comment

Comments

@zbaylin
Copy link

zbaylin commented Nov 20, 2021

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.

@gildor478
Copy link
Owner

gildor478 commented Nov 20, 2021

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants