Skip to content
New issue

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

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

Already on GitHub? # to your account

Recipe: OCaml test suite #378

Open
hobovsky opened this issue Feb 15, 2022 · 2 comments
Open

Recipe: OCaml test suite #378

hobovsky opened this issue Feb 15, 2022 · 2 comments

Comments

@hobovsky
Copy link
Contributor

hobovsky commented Feb 15, 2022

Use material collected when working on codewars/ocaml#1 and codewars/ocaml#2 and prepare a guide similar to other language specific authoring guides, like for example the one for Javascript.

Example kumite: https://www.codewars.com/kumite/620a7361d746e5000f36a021/

Features:

  • TestLists, with and without labels
  • TestCases, with and without labels
  • Nested tests
  • Nested labels
  • Custom assertion messages and printers
@Glinat
Copy link

Glinat commented Aug 21, 2022

Here is an example of a test suite using the optional pp_diff argument of assert_equal : https://www.codewars.com/kumite/62ff92cb211df8001c4b80c4

This argument is used to show the differences between the expected and actual answers in a custom way.

@Glinat
Copy link

Glinat commented Aug 21, 2022

When working with lists, ~pp_diff and ~printer can be automatically generated with the OUnitDiff module, as demonstrated in its documentation.

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

No branches or pull requests

2 participants