Skip to content

Commit

Permalink
Use non-located variants in the tests engine
Browse files Browse the repository at this point in the history
  • Loading branch information
Niols committed May 8, 2023
1 parent 4f366fc commit 5563cda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/run.ml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ let run_one_test ~test_number =

let fname = artifacts_file ~test_number "input.json" in
Log.debug (fun m -> m "Printing it to `%s`..." fname);
with_file fname (fun fmt -> Morsmall.pp_print_json fmt input);
with_file fname (fun fmt -> Morsmall.pp_print_json_noloc fmt input);

let fname = artifacts_file ~test_number "input.sh" in
Log.debug (fun m -> m "Printing it to `%s`..." fname);
Expand All @@ -114,9 +114,9 @@ let run_one_test ~test_number =

let fname = artifacts_file ~test_number "output.json" in
Log.debug (fun m -> m "Printing it to `%s`..." fname);
with_file fname (fun fmt -> Morsmall.pp_print_json fmt output);
with_file fname (fun fmt -> Morsmall.pp_print_json_noloc fmt output);

if not (Morsmall.equal_program input output) then
if not (Morsmall.equal_program_noloc input output) then
(
Log.debug (fun m -> m "AST do not match. Incoming error.");
raise (ASTsDontMatch (input, output))
Expand Down

0 comments on commit 5563cda

Please sign in to comment.