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 0CD6E7FACE for ; Mon, 29 Sep 2014 12:57:53 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=pra; client-ip=212.227.126.130; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=mailfrom; client-ip=212.227.126.130; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.kundenserver.de) identity=helo; client-ip=212.227.126.130; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="postmaster@mout.kundenserver.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuABAFA6KVTU436ClGdsb2JhbABgDoMVPspqh1ICgQsWAREBAQEBBwsLCRIuhAQBAQMBVSkLCw44VwYBEgmILQwJqhAhbw2UJAEXig6Fai2ESwWGKIt4klUFkS5CagGCSQEBAQ X-IPAS-Result: AuABAFA6KVTU436ClGdsb2JhbABgDoMVPspqh1ICgQsWAREBAQEBBwsLCRIuhAQBAQMBVSkLCw44VwYBEgmILQwJqhAhbw2UJAEXig6Fai2ESwWGKIt4klUFkS5CagGCSQEBAQ X-IronPort-AV: E=Sophos;i="5.04,619,1406584800"; d="asc'?scan'208";a="81255630" Received: from mout.kundenserver.de ([212.227.126.130]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Sep 2014 12:57:52 +0200 Received: from office1.lan.sumadev.de (dslb-178-004-068-137.178.004.pools.vodafone-ip.de [178.4.68.137]) by mrelayeu.kundenserver.de (node=mreue001) with ESMTP (Nemesis) id 0MdziP-1XtECR0OGT-00PhJr; Mon, 29 Sep 2014 12:57:50 +0200 Received: from [192.168.10.100] (unknown [5.146.48.81]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id EC45ADC270; Mon, 29 Sep 2014 12:57:48 +0200 (CEST) Message-ID: <1411988266.5797.130.camel@e130> From: Gerd Stolpmann To: Eric Cooper , caml-list@inria.fr Date: Mon, 29 Sep 2014 12:57:46 +0200 In-Reply-To: <1411987686.5797.128.camel@e130> References: <20140928230638.GT2829@cooper-siegel.org> <1411987686.5797.128.camel@e130> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-UFmRnaQNIkdY8+vKURTb" X-Mailer: Evolution 3.10.4-0ubuntu1 Mime-Version: 1.0 X-Provags-ID: V02:K0:iAhlePaL33TFsMmYVhqkCtERsAhaBDMYAAP5K9hxiTK CfMsoBuSAEiv0M/EbUXy3CIbPA9RHih9qqxyt6+3wzfdrckIf9 uzmJiVMgzOkZfjJlkcLuITfC/GEO3Un/ElTFl+oTfNKzTfLqvB 8PhQP4fZ+3vgQAdTq5NGTvCv6JCW4FeJkAnRn/ytFWDs4kUKFy faXFJSO4ZGEZQ+BgFeQgkbM9WyaBnCEwxtYc2m2I88uq7k06WA 4kVRpMSbxIdS71qjoDtaDwbz9mrMq1i34XZmWHIMGPmwEWzNpq nG1WYpJ3J8nmc6OhIgixIPaUQ931tXSi3lPNa/q984xwD/+erQ Banv+8vWwVr99OReiKslBpisSGCIbaYcHgN+ZIlvA X-UI-Out-Filterresults: notjunk:1; Subject: Re: [Caml-list] testing private functions with oUnit --=-UFmRnaQNIkdY8+vKURTb Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable > module Implementation { "debug" } =3D struct ... end >=20 > import Implementation I meant: include Implementation. Sorry for the noise. > (* or redefine definition by definition:=20 > let my_function =3D Implementation.my_function *) >=20 > And in the mli (which may now even be superfluous unless you want to > document the API): >=20 > val my_function : ... > module Implementation { "debug" } : sig ... end >=20 > If there was a special ANY module type that unifies with anything: >=20 > module Implementation { "debug" } : ANY >=20 > This would then simply export all definitions. >=20 > There could be additional utilities for stripping definitions with > access control tokens from the cmi files. The whole point is to grant > the developer of a certain library more rights than the user of a > library. >=20 > Gerd >=20 >=20 > Am Sonntag, den 28.09.2014, 19:06 -0400 schrieb Eric Cooper: > > 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? > >=20 > > --=20 > > Eric Cooper e c c @ c m u . e d u > >=20 >=20 --=20 ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------ --=-UFmRnaQNIkdY8+vKURTb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJUKTsrAAoJEAaM4b9ZLB5TMHIIAJiF8CkFhaXm/iz0zZjgWmwz qkjZPaxSxiasZTWQiz6oem5wIkEZdHlINHpeDn3PtFQkFwgZwFV4FhRvb2LJTCMm Wyc2cbuzId+l/TBUFcpFdE0gYDpb81wGv9FXxkM2foRJ23LxOHL73SJz2suV+RSZ zmCEzHyTrpryEEhyFNxPjeaa/mpO7Fl1DL71tvVeCScESaR1nkqCLNdinGVjiHJz wHCM7ZNCkJ6/RZgmhFL6Bg8i6SX65V75FvfmN5gPZ1xrbDZwwucVB5ouZWYrTrrQ fbFHGytqJz3xr0WaDoWTaCbPx3PvpEM1tBRYcsce0NQ2XEK5JWnMnzz0pV145i8= =hFW7 -----END PGP SIGNATURE----- --=-UFmRnaQNIkdY8+vKURTb--