-
Notifications
You must be signed in to change notification settings - Fork 481
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Test] [Builtins] Add golden tests with unlifting errors (#6189)
This refactors a file with tests so that unit tests that are supposed to result in evaluation failure also become golden tests with the error message printed to a golden file. Need it to demonstrate that #6181 does indeed allow us to preserve operational unlifting errors.
- Loading branch information
1 parent
840ecce
commit c6bd1c2
Showing
7 changed files
with
235 additions
and
166 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
382 changes: 218 additions & 164 deletions
382
plutus-core/untyped-plutus-core/test/Evaluation/Builtins/Definition.hs
Large diffs are not rendered by default.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
...s-core/untyped-plutus-core/test/Evaluation/Builtins/Golden/List/headList-empty.err.golden
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,3 @@ | ||
An error has occurred: | ||
The machine terminated because of an error, either from a built-in function or from an explicit use of 'error'. | ||
Caused by: (force headList []) |
3 changes: 3 additions & 0 deletions
3
...s-core/untyped-plutus-core/test/Evaluation/Builtins/Golden/List/tailList-empty.err.golden
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,3 @@ | ||
An error has occurred: | ||
The machine terminated because of an error, either from a built-in function or from an explicit use of 'error'. | ||
Caused by: (force tailList []) |
3 changes: 3 additions & 0 deletions
3
...plutus-core/test/Evaluation/Builtins/Golden/String/consByteString-out-of-range.err.golden
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,3 @@ | ||
An error has occurred: | ||
The machine terminated because of an error, either from a built-in function or from an explicit use of 'error'. | ||
Caused by: (consByteString 256 #68656c6c6f20776f726c64) |
3 changes: 3 additions & 0 deletions
3
...ore/test/Evaluation/Builtins/Golden/String/indexByteString-out-of-bounds-empty.err.golden
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,3 @@ | ||
An error has occurred: | ||
The machine terminated because of an error, either from a built-in function or from an explicit use of 'error'. | ||
Caused by: (indexByteString # 0) |
3 changes: 3 additions & 0 deletions
3
...test/Evaluation/Builtins/Golden/String/indexByteString-out-of-bounds-non-empty.err.golden
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,3 @@ | ||
An error has occurred: | ||
The machine terminated because of an error, either from a built-in function or from an explicit use of 'error'. | ||
Caused by: (indexByteString #68656c6c6f20776f726c64 12) |