Browse thread
[Caml-list] Exceptions Handling and Unit Testing.
-
chris.danx
- chris.danx
- art yerkes
- Damien Doligez
- chris.danx
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2004-09-21 (23:23) |
From: | chris.danx <chris.danx@n...> |
Subject: | Re: [Caml-list] Exceptions Handling and Unit Testing. |
Oops! I keep clicking reply instead of reply all! :( Thanks for all the suggestions. It looks like I was generalising the wrong thing (concentrating on handling the exception, rather than the identification of a test repeated for different inputs). Instead I created a function which does the test and catches a specific exception but with the test data supplied as parameters. This enables constructing tests as closures from sample cases (each case has a test name, sample data and a message should the test fail), with the extension to lists of sample cases being a trivial application of List.map. Cases are added by putting them in a list. Simple really. *slaps himself for being stupid* Chris ------------------- 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