From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id A3DD07FACD for ; Mon, 29 Sep 2014 10:28:17 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of ygrek@autistici.org) identity=pra; client-ip=178.255.144.35; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="ygrek@autistici.org"; x-sender="ygrek@autistici.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of ygrek@autistici.org designates 178.255.144.35 as permitted sender) identity=mailfrom; client-ip=178.255.144.35; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="ygrek@autistici.org"; x-sender="ygrek@autistici.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of postmaster@contumacia.investici.org designates 178.255.144.35 as permitted sender) identity=helo; client-ip=178.255.144.35; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="ygrek@autistici.org"; x-sender="postmaster@contumacia.investici.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtoBAGcXKVSy/5AjnGdsb2JhbABg1hkCCoEAFgERAQEBAQEICwkJFCyEBAEBAwE6RAsLCRglD0gZiDYMv1SQJRYYhB0Fi02HHIo+AYdSkXtfgkoBAQE X-IPAS-Result: AtoBAGcXKVSy/5AjnGdsb2JhbABg1hkCCoEAFgERAQEBAQEICwkJFCyEBAEBAwE6RAsLCRglD0gZiDYMv1SQJRYYhB0Fi02HHIo+AYdSkXtfgkoBAQE X-IronPort-AV: E=Sophos;i="5.04,618,1406584800"; d="scan'208";a="98364070" Received: from contumacia.investici.org ([178.255.144.35]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Sep 2014 10:28:17 +0200 Received: from [178.255.144.35] (contumacia [178.255.144.35]) (Authenticated sender: ygrek@autistici.org) by localhost (Postfix) with ESMTPSA id A162EE8542 for ; Mon, 29 Sep 2014 08:28:14 +0000 (UTC) Date: Mon, 29 Sep 2014 16:28:08 +0800 From: ygrek To: caml-list@inria.fr Message-ID: <20140929162808.0cce96aa@kiwi.local.tld> In-Reply-To: <20140928230638.GT2829@cooper-siegel.org> References: <20140928230638.GT2829@cooper-siegel.org> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] testing private functions with oUnit On Sun, 28 Sep 2014 19:06:38 -0400 Eric Cooper wrote: > I'd like to write unit tests for functions not exported in a .mli > file. The only way I can see is to remove the .mli file while > building the test, so the whole .ml file is visible. Is there a better > way, preferably integrated with ocamlmake + findlib? 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. --