Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Jeremie Dimino <jdimino@janestreet.com>
To: ygrek <ygrek@autistici.org>
Cc: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] testing private functions with oUnit
Date: Mon, 29 Sep 2014 09:50:28 +0100	[thread overview]
Message-ID: <CANhEzE7pGwTTOfqDPg-=_UdO21mX+6O9TW+0t8o_Nn81jwLovA@mail.gmail.com> (raw)
In-Reply-To: <20140929162808.0cce96aa@kiwi.local.tld>

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

On Mon, Sep 29, 2014 at 9:28 AM, ygrek <ygrek@autistici.org> wrote:

> One can also reverse that - write the tests in the .ml file and register
> in the global mutable list of tests, then iterate over that list during
> test run.
> One downside is that it relies on all modules being linked in.
>

That's what pa_ounit [1] is doing. It allows you to write this in the
source code:

TEST name? = <boolean expr> (* true means ok, false or exn means broken *)
TEST_UNIT name? = <unit expr> (* () means ok, exn means broken *)
TEST_MODULE name? = <module expr> (* to group TESTs (to share some setup
for instance) *)

And have the tests run if you pass specific command line arugments.

  [1] https://github.com/janestreet/pa_ounit

-- 
Jeremie

[-- Attachment #2: Type: text/html, Size: 1304 bytes --]

  reply	other threads:[~2014-09-29  8:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-28 23:06 Eric Cooper
2014-09-28 23:12 ` Eric Cooper
2014-09-28 23:19   ` Ivan Gotovchits
2014-09-29  7:08 ` Malcolm Matalka
2014-09-29  8:03   ` Francois Berenger
2014-09-29 13:23   ` Eric Cooper
2014-09-29  8:28 ` ygrek
2014-09-29  8:50   ` Jeremie Dimino [this message]
2014-09-29 10:48 ` Gerd Stolpmann
2014-09-29 10:57   ` Gerd Stolpmann
2014-09-29 10:58   ` Maxence Guesdon
2014-09-29 12:00   ` Malcolm Matalka

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='CANhEzE7pGwTTOfqDPg-=_UdO21mX+6O9TW+0t8o_Nn81jwLovA@mail.gmail.com' \
    --to=jdimino@janestreet.com \
    --cc=caml-list@inria.fr \
    --cc=ygrek@autistici.org \
    /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