vincent-hugot / qtest

Inline (Unit) Tests for OCaml
GNU General Public License v3.0
67 stars 8 forks source link

qcheck: add OUnit2 test converter #33

Closed edwintorok closed 8 years ago

edwintorok commented 8 years ago

To take advantage of OUnit2 features (parallel execution, html logging, etc.) tests need to be of type OUnit2.test.

to_ounit2_test:

This is more complicated due to seed handling: OUnit2 only prints the exception / failure message by default (the other messages are logged), using an auto-generated random seed would be inconvenient:

c-cube commented 8 years ago

That looks pretty nice! I don't use OUnit2, but I understand the point. Could you please add a test file for this new function (e.g. copy and adapt tests/Runner_ounit_test.ml)?

edwintorok commented 8 years ago

Pushed the example, also added a convenience function for converting a list of tests to ounit2

c-cube commented 8 years ago

Thanks!