]> matita.cs.unibo.it Git - fireball-separation.git/blobdiff - ocaml/simple_test.ml
All output to stdout (in place of stderr).
[fireball-separation.git] / ocaml / simple_test.ml
index d5cb66b6b8abc11173b9f4129a352cf6c1b68a4a..49ea28f78bc5a6d491768c975789b9892c9f2355 100644 (file)
@@ -30,7 +30,7 @@ let gen n vars =
 
 
 let rec repeat f n =
-  prerr_endline "\n########################### NEW TEST ###########################";
+  print_endline "\n########################### NEW TEST ###########################";
   f () ;
   if n > 0 then repeat f (n-1)
 ;;
@@ -38,15 +38,18 @@ let rec repeat f n =
 let main =
   Random.self_init ();
   let num = 100 in
-  let complex = 200 in
-  let no_bound_vars = 20 in
+  let complex = 100 in
+  let no_bound_vars = 10 in
   let vars = Array.to_list
    (Array.init no_bound_vars (fun x -> "x" ^ string_of_int x)) in
 
   repeat (fun _ ->
     let div, convs = gen complex vars in
-    Simple.run div convs
+    let str = "$ random simple test \nD " ^ div ^ String.concat "\nC " convs ^ "\n" in
+    print_endline str;
+    let open Simple in
+    (solve ++ problem_of ++ Parser.problem_of_string) str
   ) num ;
 
-  prerr_endline "\n---- ALL TESTS COMPLETED ----"
+  print_endline "\n---- ALL TESTS COMPLETED ----"
 ;;