caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Hendrik Boom <hendrik@topoi.pooq.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] OCaml projects with tests
Date: Thu, 8 Oct 2015 04:34:21 -0400	[thread overview]
Message-ID: <20151008083421.GD13710@topoi.pooq.com> (raw)
In-Reply-To: <CAPFanBGThN4FrEm3s4AvV7L-i5d9df7zHJ1zTgWzgh7S9Hf8Fw@mail.gmail.com>

On Thu, Oct 08, 2015 at 10:21:47AM +0200, Gabriel Scherer wrote:

> qtest/iTeML is currently using the external model. On paper the internal
> one is more powerful, as it allows you to test internal functions not
> exported through the interface (external tests have to respect the
> abstraction boundary), and facilitates testing functors -- I would assume
> that some of the other extraction tools use the internal model. We have
> discussed moving iTeML to the internal model in the past, but nobody has
> committed to doing the work for now, and I think the benefits for Batteries
> specifically wouldn't actually be that big -- but it may be specific to the
> fact that the project is *a* library, and thus has much more exposed than
> private functions.
> (The internal model also raises the not-quite-trivial issues of either
> interleaving test-registration side-effects throughout your (otherwise
> pure, right?) code, urgh, or trying to have a value-driven approach which
> implies non-trivial data-passing plumbing.)

You need both internal and external testing -- internal testing cannot 
test whether you have exported the right names.  Both need to be 
interleaved with the code for maintainability, prefereably using the 
same code extraction tool.

Ideally the test notations should be part of the programming language.  
The test driver should interface with the test code in a well-defined 
way, because different projects will require different test tracking and 
reporting.

-- hendrik
k

  reply	other threads:[~2015-10-08  8:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-08  7:43 Sébastien Hinderer
2015-10-08  8:10 ` Francois Berenger
2015-10-08  8:21 ` Gabriel Scherer
2015-10-08  8:34   ` Hendrik Boom [this message]
2015-10-08  9:18   ` Jeremie Dimino
2015-10-08  8:26 ` Hendrik Boom
2015-10-08 15:04 ` Leonid Rozenberg
2015-10-08 15:56   ` Thomas Gazagnaire
2015-10-09 12:29 ` Richard W.M. Jones
2015-10-09 12:37   ` Richard W.M. Jones

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=20151008083421.GD13710@topoi.pooq.com \
    --to=hendrik@topoi.pooq.com \
    --cc=caml-list@inria.fr \
    /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).