-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust attribute handling for Sail unit tests
- Loading branch information
Showing
10 changed files
with
95 additions
and
53 deletions.
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
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
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 +1,5 @@ | ||
test_bad must have type unit -> unit | ||
[93mError[0m: | ||
[96mfail/test_not_unit_0.sail[0m:11.0-30: | ||
11[96m |[0mfunction test_bad() -> int = 5 | ||
[91m |[0m[91m^----------------------------^[0m | ||
[91m |[0m Functions with the $[test] attribute must have type 'unit -> unit' |
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,5 +1,7 @@ | ||
default Order dec | ||
|
||
$include <prelude.sail> | ||
|
||
$[test] | ||
function test_good() -> unit = { | ||
print_endline("test_good"); | ||
|
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 +1,5 @@ | ||
test_bad must have type unit -> unit | ||
[93mError[0m: | ||
[96mfail/test_not_unit_1.sail[0m:4.0-39: | ||
4[96m |[0mfunction test_bad(x : int) -> unit = () | ||
[91m |[0m[91m^-------------------------------------^[0m | ||
[91m |[0m Functions with the $[test] attribute must have type 'unit -> unit' |
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 +1,5 @@ | ||
test_bad must have type unit -> unit | ||
[93mError[0m: | ||
[96mfail/test_not_unit_2.sail[0m:4.0-50: | ||
4[96m |[0mfunction test_bad(x : unit, y : unit) -> unit = () | ||
[91m |[0m[91m^------------------------------------------------^[0m | ||
[91m |[0m Functions with the $[test] attribute must have type 'unit -> unit' |
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 +1,5 @@ | ||
test_bad must have type unit -> unit | ||
[93mError[0m: | ||
[96mfail/test_not_unit_3.sail[0m:4.0-26: | ||
4[96m |[0mval test_bad : unit -> int | ||
[91m |[0m[91m^------------------------^[0m | ||
[91m |[0m Functions with the $[test] attribute must have type 'unit -> unit' |
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 +1,8 @@ | ||
test attribute must be on function declaration | ||
[93mError[0m: | ||
[96mfail/test_not_unit_4.sail[0m:3.4-12: | ||
3[96m |[0mval test_bad : unit -> unit | ||
[92m |[0m [92m^------^[0m [92mval declaration here[0m | ||
[96mfail/test_not_unit_4.sail[0m:5.0-7: | ||
5[96m |[0m$[test] | ||
[91m |[0m[91m^-----^[0m | ||
[91m |[0m Function with separate val prototype has a $[test] attribute, it should be attached there instead. |