dune icon indicating copy to clipboard operation
dune copied to clipboard

documentation issue: the "writing and running tests" How-to does not document how to write executable tests

Open gasche opened this issue 1 year ago • 0 comments

I want to add a test to a Dune project that can only be exercised by calling my library in a certain way. A natural idea is to write a small executable containing this repro case. Unfortunatley, the Writing and Running Tests How-To does not document how to do this -- what blurb to write in your dune file. It does mention that "Custom tests" to do this are possible, but it does not give a single example of such a custom test, only of inline tests and cram tests.

On the other hand, Quickstart : Definining tests does give a minimal example of this. (The idea is to replace executable by test as the stanza.) On the other hand, it does not link to the more complete How-To (if readers are interested in other kind of tests).

Recommendations:

  • make sure that the howto has a representative example of Dune file for a custom test
  • link to the How-to from the Quickstart

gasche avatar Feb 15 '24 15:02 gasche