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 233C07FACE for ; Mon, 29 Sep 2014 09:08:23 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of mmatalka@gmail.com) identity=pra; client-ip=74.125.82.175; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of mmatalka@gmail.com designates 74.125.82.175 as permitted sender) identity=mailfrom; client-ip=74.125.82.175; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-we0-f175.google.com) identity=helo; client-ip=74.125.82.175; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="postmaster@mail-we0-f175.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtsBAGsEKVRKfVKvm2dsb2JhbABggmvUAAKBCBYBEQEBAQEBBgsLCRQshAQBAQMBEi4BGx4DAQsGBQsWJQ8BBA8RAQUBNR4EiAcBAwkIAQSdWW6NIoMQiEAKGScNZ4Y5EgEFDpAXFoQ1BZ0ok2tBhRRsgkoBAQE X-IPAS-Result: AtsBAGsEKVRKfVKvm2dsb2JhbABggmvUAAKBCBYBEQEBAQEBBgsLCRQshAQBAQMBEi4BGx4DAQsGBQsWJQ8BBA8RAQUBNR4EiAcBAwkIAQSdWW6NIoMQiEAKGScNZ4Y5EgEFDpAXFoQ1BZ0ok2tBhRRsgkoBAQE X-IronPort-AV: E=Sophos;i="5.04,618,1406584800"; d="scan'208";a="98345796" Received: from mail-we0-f175.google.com ([74.125.82.175]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 29 Sep 2014 09:08:22 +0200 Received: by mail-we0-f175.google.com with SMTP id q59so1220408wes.20 for ; Mon, 29 Sep 2014 00:08:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=te6cbdtamoeY8PHTwpe/HzZHKx1yK9zfC8UYF0d3PpA=; b=0ZAk8P+1+8nXjeBZwQ/WlY5Gz27jAOXVu2ETKE0xiCH7HtrC0Z1SoXIqWvrbJag5l4 5gNpcXTNJ7dEDhQB7vMv13njYksbiPACgIXZSbsLR7xhvO5GtDS3XpHaZUD/xHsfg4sR Ud7rvXieUHwMLfMsPktklzugN/TC3Lkc0OCl08dbgA9I8XS2YaQ5QMM3qcjt/COmd3rE NH1DgfwLj5YVxsj8d2huBjQu2YZmbcu/8rlBcDevSsVswK3WJXIz+tJoUgU4zlimB7A1 zQeEZwTrLoABn5mRbeLeQeU9pfdxNgMH0vVDXIPEndhukqxpGhgsse3Ldz9IH+XV8+F0 N3fQ== X-Received: by 10.180.102.68 with SMTP id fm4mr44234324wib.27.1411974502311; Mon, 29 Sep 2014 00:08:22 -0700 (PDT) Received: from localhost ([2a01:7e00::f03c:91ff:fe70:2696]) by mx.google.com with ESMTPSA id bg10sm14658915wjc.47.2014.09.29.00.08.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Sep 2014 00:08:21 -0700 (PDT) From: Malcolm Matalka To: caml-list@inria.fr References: <20140928230638.GT2829@cooper-siegel.org> Date: Mon, 29 Sep 2014 07:08:21 +0000 In-Reply-To: <20140928230638.GT2829@cooper-siegel.org> (Eric Cooper's message of "Sun, 28 Sep 2014 19:06:38 -0400") Message-ID: <87zjdioqe2.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Caml-list] testing private functions with oUnit Out of curiosity: why? Any private function should be exercised through an API function somehow. IME, testing private functions often makes refactoring more painful without a clear win in code being better tested. If your API is pure, btw, you should checkout QCheck for testing it instead of unit tests. My 2 cents, /M Eric Cooper writes: > 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? > > -- > Eric Cooper e c c @ c m u . e d u