From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id FAA23319; Fri, 21 Feb 2003 05:00:23 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id FAA23285 for ; Fri, 21 Feb 2003 05:00:22 +0100 (MET) Received: from mail2.hypermall.com (mail.hypermall.net [216.241.37.118]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h1L40LH04635 for ; Fri, 21 Feb 2003 05:00:21 +0100 (MET) Received: from [216.241.35.41] (helo=swordfish) by mail2.hypermall.com with esmtp (Exim 3.36 #1) id 18m4MF-000524-00 for caml-list@pauillac.inria.fr; Thu, 20 Feb 2003 21:00:19 -0700 From: mgushee@havenrock.com To: caml-list@pauillac.inria.fr Date: Thu, 20 Feb 2003 21:00:21 -0700 MIME-Version: 1.0 Subject: [Caml-list] OUnit usage Message-ID: <3E5541E5.15804.8F7F3E@localhost> X-mailer: Pegasus Mail for Windows (v4.02) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, all-- This probably qualifies as a dumb question, but I hope you will indulge my curiosity. I would like to try OUnit. I haven't done much formal unit testing, and am also fairly new to OCaml, but since I want to develop a serious software package I guess it's time to get serious about testing. Anyway, I am having a little trouble understanding how to construct a test. The main point of confusion is the TestCase constructor. The OUnit docs say: type test = | TestCase of (unit -> unit) | TestList of test list | TestLabel of string * test I would like to know what sort of arguments to give TestCase. The examples provided don't mean much to me: TestCase (fun _ -> ()) This looks like syntactically correct but meaningless code, no? If I could see 1 or 2 simple but realistic examples, I think that would clear up the mystery. All suggestions appreciated. -- Matt Gushee Englewood, CO USA ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners