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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id C62207FC6B for ; Thu, 8 Oct 2015 10:34:24 +0200 (CEST) IronPort-PHdr: 9a23:CI60Gh0Rj+lS90KosmDT+DRfVm0co7zxezQtwd8ZsegVKfad9pjvdHbS+e9qxAeQG96Lt7Qb1qL/iOPJZy8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL2PbrnD61zMOABK3bVMzfbSpXNGPx+2MlMmMuLTrKz1SgzS8Zb4gZD6Xli728vcsvI15N6wqwQHIqHYbM85fxGdvOE7B102kvpT4r9Zf9HFbsvclsspBSrnSfqIiTLUeAi51HXoy4ZjLuB/PVwqMrlEbVWBexhpFBQTf7RLSQpDptSq8ru16wW+ROsigHuN8Yiir86o+EEygsywALTNsqGw= Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=hendrik@topoi.pooq.com; spf=None smtp.mailfrom=hendrik@topoi.pooq.com; spf=None smtp.helo=postmaster@april.topoi.pooq.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of hendrik@topoi.pooq.com) identity=pra; client-ip=69.165.131.134; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="hendrik@topoi.pooq.com"; x-sender="hendrik@topoi.pooq.com"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of hendrik@topoi.pooq.com) identity=mailfrom; client-ip=69.165.131.134; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="hendrik@topoi.pooq.com"; x-sender="hendrik@topoi.pooq.com"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@april.topoi.pooq.com) identity=helo; client-ip=69.165.131.134; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="hendrik@topoi.pooq.com"; x-sender="postmaster@april.topoi.pooq.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BQBwDeKRZW/4aDpUVehEQBv1GDE4IKfwKBfhABAQEBAQEBAYEJgh+CCAEBAwE6RAsLIRQRDwUYiGoIwloBAQgCIItxhCRwF4MDgRQFlgiNDwhZfpYyg284K4QeIogfAQEB X-IPAS-Result: A0BQBwDeKRZW/4aDpUVehEQBv1GDE4IKfwKBfhABAQEBAQEBAYEJgh+CCAEBAwE6RAsLIRQRDwUYiGoIwloBAQgCIItxhCRwF4MDgRQFlgiNDwhZfpYyg284K4QeIogfAQEB X-IronPort-AV: E=Sophos;i="5.17,654,1437429600"; d="scan'208";a="181700207" Received: from topoi.pooq.com (HELO april.topoi.pooq.com) ([69.165.131.134]) by mail2-smtp-roc.national.inria.fr with ESMTP; 08 Oct 2015 10:34:23 +0200 Received: by april.topoi.pooq.com (Postfix, from userid 1001) id 6B2FB1A0452; Thu, 8 Oct 2015 04:34:21 -0400 (EDT) Date: Thu, 8 Oct 2015 04:34:21 -0400 From: Hendrik Boom To: caml-list@inria.fr Message-ID: <20151008083421.GD13710@topoi.pooq.com> References: <20151008074315.GA1466@pl-59055.rocqadm.inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [Caml-list] OCaml projects with tests On Thu, Oct 08, 2015 at 10:21:47AM +0200, Gabriel Scherer wrote: > qtest/iTeML is currently using the external model. On paper the internal > one is more powerful, as it allows you to test internal functions not > exported through the interface (external tests have to respect the > abstraction boundary), and facilitates testing functors -- I would assume > that some of the other extraction tools use the internal model. We have > discussed moving iTeML to the internal model in the past, but nobody has > committed to doing the work for now, and I think the benefits for Batteries > specifically wouldn't actually be that big -- but it may be specific to the > fact that the project is *a* library, and thus has much more exposed than > private functions. > (The internal model also raises the not-quite-trivial issues of either > interleaving test-registration side-effects throughout your (otherwise > pure, right?) code, urgh, or trying to have a value-driven approach which > implies non-trivial data-passing plumbing.) You need both internal and external testing -- internal testing cannot test whether you have exported the right names. Both need to be interleaved with the code for maintainability, prefereably using the same code extraction tool. Ideally the test notations should be part of the programming language. The test driver should interface with the test code in a well-defined way, because different projects will require different test tracking and reporting. -- hendrik k