aboutsummaryrefslogtreecommitdiff
path: root/test-suite/unit-tests/src
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2018-07-24 11:03:52 +0200
committerEmilio Jesus Gallego Arias2018-07-24 11:03:52 +0200
commit4ab54f3cca76632cb6e258c84abc259e15e9e9f8 (patch)
treec4374a0986acd6d4f6cac1a03e6bfa5ba7c972c9 /test-suite/unit-tests/src
parent580a026070ab74d05f38e1177632be83a8756566 (diff)
parent97069f69ab3a58cc4ccbaa1a835912c6c31dde4d (diff)
Merge PR #6801: Highlight differences between successive proof steps (color, underline, etc.)
Diffstat (limited to 'test-suite/unit-tests/src')
-rw-r--r--test-suite/unit-tests/src/utest.ml8
-rw-r--r--test-suite/unit-tests/src/utest.mli8
2 files changed, 12 insertions, 4 deletions
diff --git a/test-suite/unit-tests/src/utest.ml b/test-suite/unit-tests/src/utest.ml
index 069e6a4bf3..0cb1780ec9 100644
--- a/test-suite/unit-tests/src/utest.ml
+++ b/test-suite/unit-tests/src/utest.ml
@@ -42,10 +42,12 @@ let run_one logit test =
let results = perform_test (fun _ -> ()) test in
process_results results
-(* run list of OUnit test cases, log results *)
-let run_tests ml_fn tests =
+let open_log_out_ch ml_fn =
let log_fn = ml_fn ^ ".log" in
- let out_ch = open_out log_fn in
+ open_out log_fn
+
+(* run list of OUnit test cases, log results *)
+let run_tests ml_fn out_ch tests =
let cprintf s = cfprintf out_ch s in
let ceprintf s = cfprintf stderr s in
let logit = logger out_ch in
diff --git a/test-suite/unit-tests/src/utest.mli b/test-suite/unit-tests/src/utest.mli
index 70928228bf..2e0f26e96b 100644
--- a/test-suite/unit-tests/src/utest.mli
+++ b/test-suite/unit-tests/src/utest.mli
@@ -9,4 +9,10 @@ val mk_bool_test : string -> string -> bool -> OUnit.test
(* the string argument should be the name of the .ml file
containing the tests; use __FILE__ for that purpose.
*)
-val run_tests : string -> OUnit.test list -> unit
+val run_tests : string -> out_channel -> OUnit.test list -> unit
+
+(** open output channel for the test log file *)
+(* the string argument should be the name of the .ml file
+ containing the tests; use __FILE__ for that purpose.
+ *)
+val open_log_out_ch : string -> out_channel