mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-11 05:28:34 -05:00
test: update test harness
This commit is contained in:
parent
dd4719b1a4
commit
fb52e79287
3 changed files with 23 additions and 7 deletions
|
|
@ -1,10 +1,13 @@
|
||||||
(executable
|
(executable
|
||||||
(name run_tests)
|
(name run_tests)
|
||||||
(libraries containers sidekick-arith.lra zarith iter qcheck)
|
(libraries containers sidekick-arith.lra zarith iter alcotest qcheck)
|
||||||
(flags :standard -warn-error -a+8 -color always))
|
(flags :standard -warn-error -a+8 -color always))
|
||||||
|
|
||||||
(alias
|
(alias
|
||||||
(name runtest)
|
(name runtest)
|
||||||
(deps run_tests.exe)
|
(locks /test)
|
||||||
|
(package sidekick-arith)
|
||||||
(action
|
(action
|
||||||
(run %{deps} --verbose)))
|
(progn
|
||||||
|
(run ./run_tests.exe alcotest) ; run regressions first
|
||||||
|
(run ./run_tests.exe qcheck --verbose))))
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,22 @@
|
||||||
|
|
||||||
|
let tests : unit Alcotest.test list = [
|
||||||
|
Test_simplex2.tests;
|
||||||
|
]
|
||||||
|
|
||||||
let props =
|
let props =
|
||||||
List.flatten
|
List.flatten
|
||||||
[ Test_simplex.props;
|
[ Test_simplex2.props;
|
||||||
|
Test_simplex.props;
|
||||||
]
|
]
|
||||||
|
|
||||||
let () =
|
let () =
|
||||||
CCFormat.set_color_default true;
|
match Array.to_list Sys.argv with
|
||||||
QCheck_runner.run_tests_main props
|
| a0::"alcotest"::tl ->
|
||||||
|
Sidekick_util.Log.set_debug 50;
|
||||||
|
let argv= Array.of_list (a0::tl) in
|
||||||
|
Alcotest.run ~argv ~and_exit:true "arith tests" tests;
|
||||||
|
| a0::"qcheck"::tl ->
|
||||||
|
let argv= Array.of_list (a0::tl) in
|
||||||
|
CCFormat.set_color_default true;
|
||||||
|
QCheck_runner.run_tests_main ~argv props
|
||||||
|
| _ -> failwith "expected (qcheck|alcotest) as first arg"
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,5 @@
|
||||||
(names tests)
|
(names tests)
|
||||||
(libraries sidekick.mini-cc sidekick-arith.base-term alcotest)
|
(libraries sidekick.mini-cc sidekick-arith.base-term alcotest)
|
||||||
(package sidekick-arith)
|
(package sidekick-arith)
|
||||||
|
(locks /test)
|
||||||
(modes native))
|
(modes native))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue