mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-10 05:03:59 -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
|
||||
(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))
|
||||
|
||||
(alias
|
||||
(name runtest)
|
||||
(deps run_tests.exe)
|
||||
(locks /test)
|
||||
(package sidekick-arith)
|
||||
(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 =
|
||||
List.flatten
|
||||
[ Test_simplex.props;
|
||||
[ Test_simplex2.props;
|
||||
Test_simplex.props;
|
||||
]
|
||||
|
||||
let () =
|
||||
CCFormat.set_color_default true;
|
||||
QCheck_runner.run_tests_main props
|
||||
|
||||
match Array.to_list Sys.argv with
|
||||
| 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)
|
||||
(libraries sidekick.mini-cc sidekick-arith.base-term alcotest)
|
||||
(package sidekick-arith)
|
||||
(locks /test)
|
||||
(modes native))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue