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: | -- (:) |
| From: | Damien Doligez <damien.doligez@i...> |
| Subject: | Re: [Caml-list] Exceptions Handling and Unit Testing. |
On Sep 20, 2004, at 22:21, chris.danx wrote:
> let some_construction_test some_op input exception error_msg =
> try
> let x = some_op input
> in
> OUnit.assert_failure error_msg
> with
> exception -> ()
Turn your pattern into a function:
let some_construction_test some_op input (check_exception: exn ->
unit) error_msg =
try
let x = some_op input
in
OUnit.assert_failure error_msg
with
e -> check_exception e
-- Damien
-------------------
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