-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update default interpretation of string/objects
YAML strings and objects are now interpreted as literal YAML values by default. We introduce `!expression` and `!oracle` to "cast" strings and objects to expressions and oracles respectively. The list of arguments in an oracle uses the same logic: YAML types by default, expressions when tagged as such. Using the same logic for arguments is not that obvious: we could also force the use of the expression syntax, as we do with actual expressions and statements. However, it felt more natural to be consistent with the return value (which is in the same YAML object) than with the expressions and statements. This is basically a reversal of the previous behaviour, where strings and objects needed a `!v` tag. This tag has now been removed.
- Loading branch information
1 parent
1f7da5b
commit ba0ee3c
Showing
11 changed files
with
69 additions
and
66 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
2 changes: 1 addition & 1 deletion
2
tests/exercises/echo-function/evaluation/expected_return_and_got_some.yaml
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,4 +1,4 @@ | ||
- tab: "My tab" | ||
testcases: | ||
- expression: 'echo("input")' | ||
return: !v "input" | ||
return: "input" |
2 changes: 1 addition & 1 deletion
2
tests/exercises/echo-function/evaluation/expected_return_but_got_none.yaml
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,4 +1,4 @@ | ||
- tab: "My tab" | ||
testcases: | ||
- expression: 'no_echo("input")' | ||
return: !v "input" | ||
return: "input" |
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,4 +1,4 @@ | ||
- tab: "My tab" | ||
testcases: | ||
- expression: 'echo(echo("input"))' | ||
return: !v "input" | ||
return: "input" |
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,7 +1,7 @@ | ||
- tab: "Global variable" | ||
testcases: | ||
- expression: "GLOBAL_VAR" | ||
return: !v "GLOBAL" | ||
return: "GLOBAL" | ||
description: | ||
description: "Hallo" | ||
format: "code" |
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,4 +1,4 @@ | ||
- tab: "Feedback" | ||
testcases: | ||
- expression: '{{"a"}: [int32(1)], {"b"}: "a.txt"}' | ||
return: '{{"a"}: [int32(1)], {"b"}: "a.txt"}' | ||
return: !expression '{{"a"}: [int32(1)], {"b"}: "a.txt"}' |
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