Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test coverage improvement #96

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cmd_opt.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ open Syntax

let optimize_file ~unsafe filename =
if not @@ Sys.file_exists filename then
error_s "file `%s` doesn't exist" filename
error_s "Error: file `%s` doesn't exist" filename
epatrizio marked this conversation as resolved.
Show resolved Hide resolved
else
let* modul = Parse.Module.from_file ~filename in
Compile.until_optimize ~unsafe ~optimize:true modul
Expand Down
1 change: 1 addition & 0 deletions test/optimize/dune
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
ibinop.wast
if.wast
local.wast
not_exists.wast
epatrizio marked this conversation as resolved.
Show resolved Hide resolved
ref_nop.wast
reinterpret.wast
relop_testop.wast
Expand Down
4 changes: 4 additions & 0 deletions test/optimize/not_exists.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
not exists file (exists_not.wast instead of not_exists.wast):
$ dune exec -- owi opt exists_not.wast --debug
Error: file `exists_not.wast` doesn't exist
[1]
4 changes: 4 additions & 0 deletions test/optimize/not_exists.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(module
(func $start)
(start $start)
)
epatrizio marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions test/sym/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
(deps
%{bin:owi}
mini_test.wast
not_exists.wast
epatrizio marked this conversation as resolved.
Show resolved Hide resolved
))
4 changes: 4 additions & 0 deletions test/sym/not_exists.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
not exists file (exists_not.wast instead of not_exists.wast):
$ dune exec owi -- sym exists_not.wast
Error: file `exists_not.wast` doesn't exist
[1]
4 changes: 4 additions & 0 deletions test/sym/not_exists.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(module
(func $start)
(start $start)
)
epatrizio marked this conversation as resolved.
Show resolved Hide resolved