forked from dfinity/motoko
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split stdout and stderr in viper/* tests
The `moc --viper` command outputs generated Viper code to stdout and diagnostic messages to stderr. * Prior to this change, test/run.sh used the `run` helper to produce .vpr files. The `run` helper always merges stdout and stderr, which results in ill-formed .vpr files if there are any diagnostic messages. * Now test/run.sh has an additional helper `run_stderr` that keeps stdout and stderr separate. By using it instead of `run` we ensure that .vpr files are not contaminated with diagnostics. Run `make -C test/viper` to confirm that this fixes broken Viper tests. Note that `run_stderr` is a copy of `run` with minor tweaks, so this solution introduces some technical debt. A more principled approach would be to separate stdout and stderr in all commands (i.e. wholly replace `run` with `run_stderr`), but I opted not to do that at this time to avoid a massive overhaul of the test suite.
- Loading branch information
Showing
5 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
private.mo:11.16-11.22: warning [M0194], unused identifier reward (delete or rename to wildcard `_` or `_reward`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
private.mo:11.16-11.22: warning [M0194], unused identifier reward (delete or rename to wildcard `_` or `_reward`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
unsupported.mo:5.7-5.8: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) |
1 change: 1 addition & 0 deletions
1
test/viper/ok/unsupported.vpr.ok → test/viper/ok/unsupported.vpr.stderr.ok
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
unsupported.mo:5.7-5.8: warning [M0194], unused identifier x (delete or rename to wildcard `_` or `_x`) | ||
unsupported.mo:5.3-5.13: viper error [0], translation to viper failed: | ||
(LetD (VarP x) (LitE (TextLit ))) | ||
|