caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
To: John Christopher McAlpine <jmcalpin@nmt.edu>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Use of unit testing frameworks in OCaml
Date: Thu, 10 Sep 2015 00:32:46 +0100	[thread overview]
Message-ID: <279F86C517F5492E94C9880187EA0333@erratique.ch> (raw)
In-Reply-To: <55F0B2CA.40707@nmt.edu>

Le mercredi, 9 septembre 2015 à 23:29, John Christopher McAlpine a écrit :
> Here you go: https://github.com/michipili/broken

Looking at the examples it really seems to be.

Names are already hard to come by, why bother me with having to invent one for *each* assertion ? What you want is to subvert the backtrace mechanism so that failing tests just output a location your IDE can jump to and highlight.  

Also for tests that are more complex than simple assertions I'd like to have a print out of the function arguments that lead to the assertion failure. See for example [1] for a toy testing framework that does that and that I c&p around because I don't have the time to spend a month to give the problem a good solution. This simple thing is already, from a programmer perspective, much better than anything you mentioned — but it's missing the quickcheck and random value generation bits that any self-respecting solution should bring to the table.  

The problem (beyond Gabriel's more sensitive answer) with these all these testing framework is that they seem to be too busy to uncreatively copy the useless crap oo testing framework and terminology rather than provide actual useful tools for programmers.

Best,

Daniel

[1]
https://github.com/dbuenzli/astring/blob/master/test/testing.mli
https://github.com/dbuenzli/astring/blob/master/test/testing.ml



  reply	other threads:[~2015-09-09 23:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-09 20:35 John Christopher McAlpine
2015-09-09 20:55 ` Sébastien Hinderer
2015-09-09 22:29   ` John Christopher McAlpine
2015-09-09 23:32     ` Daniel Bünzli [this message]
2015-09-09 23:36       ` Raoul Duke
2015-09-09 23:53   ` Hendrik Boom
2015-09-09 21:29 ` Gabriel Scherer
2015-09-10  9:22   ` Alan Schmitt
2015-09-09 23:18 ` Gerd Stolpmann
2015-09-10 10:09 ` Fabrice Le Fessant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=279F86C517F5492E94C9880187EA0333@erratique.ch \
    --to=daniel.buenzli@erratique.ch \
    --cc=caml-list@inria.fr \
    --cc=jmcalpin@nmt.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).