Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 548202c6 authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Refactoring: distinguish [main_random_loop] and [main_random].

parent 82201f27
No related branches found
No related tags found
No related merge requests found
...@@ -1419,8 +1419,8 @@ let log scenario fuel = ...@@ -1419,8 +1419,8 @@ let log scenario fuel =
(* -------------------------------------------------------------------------- *) (* -------------------------------------------------------------------------- *)
(* [main_random source prologue fuel] performs an unbounded number of test (* [main_random_loop source prologue fuel] performs an unbounded number of
runs in random mode. *) test runs in random mode. *)
(* While the tests run, we print information roughly every second. We print (* While the tests run, we print information roughly every second. We print
how many tests have been performed so far, our overall average speed, and how many tests have been performed so far, our overall average speed, and
...@@ -1437,7 +1437,7 @@ let log scenario fuel = ...@@ -1437,7 +1437,7 @@ let log scenario fuel =
the parameter [source], is opened just once, as it would be pointless to the parameter [source], is opened just once, as it would be pointless to
close it and reopen it many times. *) close it and reopen it many times. *)
let rec main_random source prologue fuel = let rec main_random_loop source prologue fuel =
try try
assert (source = None); assert (source = None);
Gen.with_source source begin fun () -> Gen.with_source source begin fun () ->
...@@ -1457,7 +1457,13 @@ let rec main_random source prologue fuel = ...@@ -1457,7 +1457,13 @@ let rec main_random source prologue fuel =
fuel. Try again, with this amount. This restricts our search fuel. Try again, with this amount. This restricts our search
space, and (with luck) we might now be able to find an even space, and (with luck) we might now be able to find an even
shorter scenario. *) shorter scenario. *)
main_random source prologue fuel main_random_loop source prologue fuel
(* [main_random source prologue fuel] performs an unbounded number of test
runs in random mode. *)
let main_random source prologue fuel =
main_random_loop source prologue fuel
(* -------------------------------------------------------------------------- *) (* -------------------------------------------------------------------------- *)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment