Skip to content

Commit

Permalink
fix: add test names
Browse files Browse the repository at this point in the history
  • Loading branch information
Docker committed Oct 19, 2023
1 parent 91f2c40 commit 28f3b45
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
1 change: 0 additions & 1 deletion dev/compile.ml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ let rec compile_expr (e : tag eexpr) (env : env) : instruction list =

let prelude = "
;redcode-94b
"

let epilogue = [INSTR (IDAT, RN, RNone, RNone)]
Expand Down
13 changes: 8 additions & 5 deletions execs/run_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,19 @@ let () =
Compiler (fun s o -> fprintf o "%s" (compile_prog (parse_exp (sexp_from_string s))) ) in

let bbc_tests =
let name : string = "compare" in
let oracle : oracle = Expected in
let runtime : runtime = Runtime compileout in
let action : action = Compare in
tests_from_dir ~compiler ~oracle ~runtime ~ action "bbctests" in
tests_from_dir ~name ~compiler ~oracle ~runtime ~ action "bbctests" in

let verify_tests =
let command =
unixcommand (fun s -> CCUnix.call "rt/pmars-0.9.4/pmars -A -@ rt/pmars-0.9.4/config/94b.opt %s" s) in
let name : string = "execute" in
let oracle : oracle = Expected in
let runtime : runtime =
Runtime (unixcommand (fun s -> CCUnix.call "rt/pmars -A -@ rt/94b.opt %s" s)) in
let runtime : runtime = Runtime command in
let action : action = Execute in
tests_from_dir ~compiler ~oracle ~runtime ~action "bbctests" in
tests_from_dir ~name ~compiler ~oracle ~runtime ~action "bbctests" in

run "Tests corewars-compiler" (ocaml_tests @ verify_tests)
run "Tests corewars-compiler" (ocaml_tests @ bbc_tests @ verify_tests)
8 changes: 0 additions & 8 deletions rt/94b.opt

This file was deleted.

File renamed without changes.

0 comments on commit 28f3b45

Please sign in to comment.