[PPL-devel] [GIT] ppl/ppl(master): In the Ocaml tests, timeouts are now reset unconditionally.
Enea Zaffanella
zaffanella at cs.unipr.it
Mon Jul 13 17:42:54 CEST 2009
Module: ppl/ppl
Branch: master
Commit: e5ea4dfdfcca314e4d9e1855868c560ac75ab6db
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=e5ea4dfdfcca314e4d9e1855868c560ac75ab6db
Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date: Mon Jul 13 17:39:45 2009 +0200
In the Ocaml tests, timeouts are now reset unconditionally.
---
interfaces/OCaml/tests/test1.ml | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/interfaces/OCaml/tests/test1.ml b/interfaces/OCaml/tests/test1.ml
index 6acb1a0..5553cf1 100644
--- a/interfaces/OCaml/tests/test1.ml
+++ b/interfaces/OCaml/tests/test1.ml
@@ -419,6 +419,8 @@ and compute_timeout_hypercube dim_in dim_out =
)
in (
begin
+ (* FIXME: in the following try/with, the timeouts should be reset
+ unconditionally. Is there a way to implement try/finally? *)
try
print_string_if_noisy "\nStarting ppl_reset_timeout test:\n";
ppl_set_timeout 100;
@@ -427,9 +429,11 @@ in (
print_string_if_noisy "ppl_reset_timeout test succeeded.\n"
with
| PPL_timeout_exception ->
+ ppl_reset_timeout ();
print_string_if_noisy "ppl_reset_timeout test seems to be failed:\n";
print_string_if_noisy "Unexpected PPL timeout exception caught.\n"
| _ ->
+ ppl_reset_timeout ();
print_string_if_noisy "ppl_reset_timeout test seems to be failed.";
(* FIXME: print the contents of the exception. *)
print_string_if_noisy "\n"
@@ -443,9 +447,11 @@ in (
print_string_if_noisy "ppl_set_timeout test seems to be failed!\n"
with
| PPL_timeout_exception ->
+ ppl_reset_timeout ();
print_string_if_noisy "ppl_set_timeout test succeded\n";
print_string_if_noisy "Expected PPL timeout exception caught.\n"
| _ ->
+ ppl_reset_timeout ();
print_string_if_noisy "ppl_set_timeout test failed:\n";
print_string_if_noisy "generic exception caught.\n"
end;
@@ -458,9 +464,11 @@ in (
print_string_if_noisy "ppl_reset_deterministic_timeout test succeeded.\n"
with
| PPL_timeout_exception ->
+ ppl_reset_deterministic_timeout ();
print_string_if_noisy "ppl_reset_deterministic_timeout test seems to be failed:\n";
print_string_if_noisy "Unexpected PPL timeout exception caught.\n"
| _ ->
+ ppl_reset_deterministic_timeout ();
print_string_if_noisy "ppl_reset_deterministic_timeout test seems to be failed.";
(* FIXME: print the contents of the exception. *)
print_string_if_noisy "\n"
@@ -474,9 +482,11 @@ in (
print_string_if_noisy "ppl_set_deterministic_timeout test seems to be failed!\n"
with
| PPL_timeout_exception ->
+ ppl_reset_deterministic_timeout ();
print_string_if_noisy "ppl_set_deterministic_timeout test succeded\n";
print_string_if_noisy "Expected PPL timeout exception caught.\n"
| _ ->
+ ppl_reset_deterministic_timeout ();
print_string_if_noisy "ppl_set_deterministic_timeout test failed:\n";
print_string_if_noisy "generic exception caught.\n"
end
More information about the PPL-devel
mailing list