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 A652E7FACE for ; Mon, 29 Sep 2014 15:23:34 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of ecc@cmu.edu) identity=pra; client-ip=209.85.213.202; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ericcooper@google.com"; x-sender="ecc@cmu.edu"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of ericcooper@google.com designates 209.85.213.202 as permitted sender) identity=mailfrom; client-ip=209.85.213.202; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ericcooper@google.com"; x-sender="ericcooper@google.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@mail-ig0-f202.google.com) identity=helo; client-ip=209.85.213.202; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ericcooper@google.com"; x-sender="postmaster@mail-ig0-f202.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhkEAIhcKVTRVdXKm2dsb2JhbABguk4GnFgWAREBAQEBAQgJCwkULIQDAQEBAwESKEQLCxgJJQ8FGAgBBQFXiBQInThumkSGYQqGCIopgxiBHQEEnScBk2tBhTCDGgEBAQ X-IPAS-Result: AhkEAIhcKVTRVdXKm2dsb2JhbABguk4GnFgWAREBAQEBAQgJCwkULIQDAQEBAwESKEQLCxgJJQ8FGAgBBQFXiBQInThumkSGYQqGCIopgxiBHQEEnScBk2tBhTCDGgEBAQ X-IronPort-AV: E=Sophos;i="5.04,620,1406584800"; d="scan'208";a="81273987" Received: from mail-ig0-f202.google.com ([209.85.213.202]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 29 Sep 2014 15:23:33 +0200 Received: by mail-ig0-f202.google.com with SMTP id hn15so127528igb.3 for ; Mon, 29 Sep 2014 06:23:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=OH3vM4xKqz25XfYmBFutKWyLTQgntQomumtPPTgntac=; b=Kg2PT/0SZCeRbNoepYPigCykhDS1KNagzOkj/n4+kp7IN1t2LIxrDbcDaGr24+LSgI 9HxeKraPH8SGjZraNiLaq6iHOqQJxLhIUmSCdVnZ/w0zT252/1mKev64seRT7ZvaEJ67 6dC2B3rjPWrSQ3uctj+z1/bK3cfRdruhDVMqwdQZkUGq6SHC6qE5N6LR8F4STP7ECFlr exSY17RSzs+Jvg71dtlBmNojRE4I58mn5nJkRlvlMCl4K9NWvySO5uNjXAaZBMJT7xkm PXfU8c41Jljc2Gg51OMZlgBoDSM8F15sgOabNYKk4XXRKn8MyB3ah0PvxKfkM/tdlVlN A4xw== X-Gm-Message-State: ALoCoQnz41zYPyA3qqn9F8ZxheRnZCSHpaSw4bNARXDi+DH9G4dla3MSbNwmfC0RyEF23wMVd7faF6PflBWJgCinajMlH73c71gGQ1Phvgy8sYpQybTYkpfOHt4aK/mEPRkZPM4Zo2S5xupaOi/A3HcsJ+mv5COMbHd25y9AplumW+fRJNssyp8= X-Received: by 10.182.52.193 with SMTP id v1mr15264020obo.28.1411997012003; Mon, 29 Sep 2014 06:23:32 -0700 (PDT) Received: from corpmail-nozzle1-2.hot.corp.google.com ([100.108.1.103]) by gmr-mx.google.com with ESMTPS id f102si720734yhp.7.2014.09.29.06.23.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Sep 2014 06:23:31 -0700 (PDT) Received: from ericcooper.pit.corp.google.com ([172.29.0.182]) by corpmail-nozzle1-2.hot.corp.google.com with ESMTP id NL6I4Cn4.1; Mon, 29 Sep 2014 06:23:31 -0700 Received: by ericcooper.pit.corp.google.com (Postfix, from userid 244939) id 86B5480D46; Mon, 29 Sep 2014 09:23:31 -0400 (EDT) Date: Mon, 29 Sep 2014 09:23:31 -0400 From: Eric Cooper To: caml-list@inria.fr Message-ID: <20140929132331.GC7490@google.com> Mail-Followup-To: caml-list@inria.fr References: <20140928230638.GT2829@cooper-siegel.org> <87zjdioqe2.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zjdioqe2.fsf@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [Caml-list] testing private functions with oUnit On Mon, Sep 29, 2014 at 07:08:21AM +0000, Malcolm Matalka wrote: > Out of curiosity: why? Any private function should be exercised through > an API function somehow. In this particular case, the private function produces a pair of values. The API provides a function to get the first element, but the second is used only internally to the module, in a code path that is quite complex to exercise. > If your API is pure, btw, you should checkout QCheck for testing it > instead of unit tests. Thanks, but it's extremely impure :-) Lots of manipulations of the file system, etc. -- Eric Cooper e c c @ c m u . e d u