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 UAA12280; Tue, 8 Jan 2002 20:30:56 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA12825 for ; Tue, 8 Jan 2002 20:30:55 +0100 (MET) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g08JUsr25190 for ; Tue, 8 Jan 2002 20:30:54 +0100 (MET) Received: from localhost (patrick@localhost) by fledge.watson.org (8.11.6/8.11.5) with ESMTP id g08JUlL27273; Tue, 8 Jan 2002 14:30:48 -0500 (EST) (envelope-from patrick@watson.org) Date: Tue, 8 Jan 2002 14:30:47 -0500 (EST) From: Patrick M Doane To: Jeremy Fincher cc: caml-list@inria.fr Subject: Re: [Caml-list] Fort? In-Reply-To: <20020108135231.B68882@functor.resnet.ohio-state.edu> Message-ID: <20020108142154.V24080-100000@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, 8 Jan 2002, Jeremy Fincher wrote: > First, I *need* to link against certain C libraries, like Unix and > Pcre. What do I need to do to make a fort executable that allows me > to test modules linked with these libraries? With OCaml 3.04, this is really easy. fort unix.cma a.cmo a-test.ml would be a typical invocation to test a module A that depends on the unix library. For older versions of OCaml, you must build a custom toplevel. If you need help with that, let me know. > Also, are there any good examples of already-existing testing > frameworks that I can base mine on? The documentation I've found > isn't the most extensive, and a good example would go far to help me > use it. I plan on doing some work for the documentation the next time I need to make a release, but things seem to have been fairly stable for awhile so this has been a low priority. Usually, I structure a test script to contain a number of test cases like this: Fort.expect_pass "name of test" (fun () -> expect_equal (3+4) 7; expect_equal_app failwith "hd" List.hd []; ... ); The individual calls to expect_* usually include additional parameters to define the various printers to help with failrues. If a test case is expected to fail, and won't be fixed in the near future than expect_pass should be replaced with expect_fail. If anyone would like to volunteer some documentation beyond what is provided in the .mli files, I'd gladly include it in the release. > If I can get these issues solved, I'd be able to use Fort quite > extensively for testing my software, and I'd really like to do that :) Sounds great, testing is always a good thing! Let me know if you have any other questions. Patrick ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr