From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 99AE27FACD for ; Mon, 29 Sep 2014 10:50:33 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jdimino@janestreet.com) identity=pra; client-ip=38.105.200.229; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="jdimino@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of jdimino@janestreet.com designates 38.105.200.229 as permitted sender) identity=mailfrom; client-ip=38.105.200.229; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="jdimino@janestreet.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mxout3.mail.janestreet.com) identity=helo; client-ip=38.105.200.229; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="postmaster@mxout3.mail.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At0BAMccKVQmacjlnGdsb2JhbABgg2Fbgn3HEYdSAoECCBYBEQEBAQEBBhYJQIQEAQEDARIRHQEBNwEECwsEAQY3AgIiEgEFARwGEyKIFAgDCp1dboo4eIUCAQWQOQERAgQKkBAEB4J4gVOWJIcJh1KMGRgphRVrgkoBAQE X-IPAS-Result: At0BAMccKVQmacjlnGdsb2JhbABgg2Fbgn3HEYdSAoECCBYBEQEBAQEBBhYJQIQEAQEDARIRHQEBNwEECwsEAQY3AgIiEgEFARwGEyKIFAgDCp1dboo4eIUCAQWQOQERAgQKkBAEB4J4gVOWJIcJh1KMGRgphRVrgkoBAQE X-IronPort-AV: E=Sophos;i="5.04,619,1406584800"; d="scan'208";a="81237534" Received: from mxout3.mail.janestreet.com ([38.105.200.229]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Sep 2014 10:50:32 +0200 Received: from tot-oib-smtp1 ([172.27.22.15] helo=tot-smtp) by mxout3.mail.janestreet.com with esmtps (UNKNOWN:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1XYWf7-0003C7-L2 for caml-list@inria.fr; Mon, 29 Sep 2014 04:50:29 -0400 Received: from [172.27.229.230] (helo=mxgoog1.mail.janestreet.com) by tot-smtp with esmtps (UNKNOWN:AES256-GCM-SHA384:256) (Exim 4.72) (envelope-from ) id 1XYWf7-0008VI-Ib for caml-list@inria.fr; Mon, 29 Sep 2014 04:50:29 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]) by mxgoog1.mail.janestreet.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.72) (envelope-from ) id 1XYWf7-0004zi-E5 for caml-list@inria.fr; Mon, 29 Sep 2014 04:50:29 -0400 Received: by mail-wg0-f42.google.com with SMTP id z12so2244307wgg.25 for ; Mon, 29 Sep 2014 01:50:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=BPvrWj4F9H6YetiM1pOCVnSzc7XvZjMz2nEX6lpKAZU=; b=CIqx3jWHUt7OzL1H41pf19N+1XpkCgSq9koedbhI6f9I3HpWynoYHgUlvTXPso+0ed mKR2BrFI9aGvGUjk81OXAGzNb+7i7as081FX4KcFO7JrmoxyMsiJ/Kg32BX/Ngnh3Wow 4q/JdT0eFQnqAFzHloRN2HKpntGn2yDtZx2UE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=BPvrWj4F9H6YetiM1pOCVnSzc7XvZjMz2nEX6lpKAZU=; b=XsEXY7gT5oKTfDbWAH021Iho+CUOnTV9+qY8tXQHl495C1SCEpzQ4tBcHJcP3B0IZQ rM6P0ddlaIoN+lQsSy+hmZsu9GpVJO9lrROtxcoPsNoxPdCkUJpw4FekCDPFzwnSrkmW D0Sf36a53rEWwrv+JB/4OHPJ3lWXA9OlkU9jnbuwobnG12MZp6T5DzzogUyNx9SogQpZ AdI2gz5ecuNDFOWKBXfqlg5HPKAb23rOesfrhOL3Zzh4BHC6Sgk5q02xItgUTa3a/zQx /SX4nnyKhtgYNBbUxS228bFrpYZMmURL1JV5wkpuSaV4AyKhG3Z/VBPAldl1usfXpVgg gYcg== X-Gm-Message-State: ALoCoQkQxgSga2s2o/cjJjOYrAv4DHtk0xdQ2jfNvVGK2WaJwVqaOCvfseeFHo/MdT+QoymwrvQ166Ta5dlLjN4GaDL3GA4qpBh/oFfNhq7TkojzYwV+tSyTQfbPSjnxtlevP3f/Zw7V X-Received: by 10.180.90.71 with SMTP id bu7mr4120380wib.33.1411980628633; Mon, 29 Sep 2014 01:50:28 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.180.90.71 with SMTP id bu7mr4120373wib.33.1411980628542; Mon, 29 Sep 2014 01:50:28 -0700 (PDT) Received: by 10.27.53.2 with HTTP; Mon, 29 Sep 2014 01:50:28 -0700 (PDT) In-Reply-To: <20140929162808.0cce96aa@kiwi.local.tld> References: <20140928230638.GT2829@cooper-siegel.org> <20140929162808.0cce96aa@kiwi.local.tld> Date: Mon, 29 Sep 2014 09:50:28 +0100 Message-ID: From: Jeremie Dimino To: ygrek Cc: "caml-list@inria.fr" Content-Type: multipart/alternative; boundary=f46d043be0f4cb81c30504305be9 Subject: Re: [Caml-list] testing private functions with oUnit --f46d043be0f4cb81c30504305be9 Content-Type: text/plain; charset=UTF-8 On Mon, Sep 29, 2014 at 9:28 AM, ygrek 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? = (* true means ok, false or exn means broken *) TEST_UNIT name? = (* () means ok, exn means broken *) TEST_MODULE name? = (* 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 --f46d043be0f4cb81c30504305be9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On M= on, Sep 29, 2014 at 9:28 AM, ygrek <ygrek@autistici.org> w= rote:
One can also reverse that - write the tests in th= e .ml file and register
in the global mutable list of tests, then iterate over that list during tes= t run.
One downside is that it relies on all modules being linked in.

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

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

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

<= /div>

--
Jer= emie
--f46d043be0f4cb81c30504305be9--