From: Patrick M Doane <patrick@watson.org>
To: Jeremy Fincher <fincher.8@osu.edu>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Fort?
Date: Tue, 8 Jan 2002 14:30:47 -0500 (EST) [thread overview]
Message-ID: <20020108142154.V24080-100000@fledge.watson.org> (raw)
In-Reply-To: <20020108135231.B68882@functor.resnet.ohio-state.edu>
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
prev parent reply other threads:[~2002-01-08 19:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-08 18:52 Jeremy Fincher
2002-01-08 19:30 ` Patrick M Doane [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020108142154.V24080-100000@fledge.watson.org \
--to=patrick@watson.org \
--cc=caml-list@inria.fr \
--cc=fincher.8@osu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox