-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove say command one message limit (#2316)
* remove the `say` command limitation that only keeps one last said message in hearing robot logs * add test case from #1593 * add correct behavior check to scenario objective and integration test * closes #1592 * closes #1593 * see the original merge request #565 for context Co-authored-by: Karl Ostmo <[email protected]> Co-authored-by: Brent Yorgey <[email protected]>
- Loading branch information
1 parent
29e9105
commit c7fda03
Showing
5 changed files
with
80 additions
and
29 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
61 changes: 61 additions & 0 deletions
61
data/scenarios/Testing/1592-shared-template-robot-say-logs.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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
version: 1 | ||
name: Logs from same-template robots | ||
creative: false | ||
description: | | ||
Logs from different robots generated from the same template. | ||
The objective checks that base hears one message each tick, | ||
afterwards the integration test checks that all messages | ||
are present in the base log. | ||
objectives: | ||
- goal: | ||
- Please `grab` the `token`{=entity} if you hear what you expected. | ||
condition: | | ||
as base { has "token" } | ||
solution: | | ||
s <- listen; | ||
if (s == "Hello from (2, -2)!") { | ||
s <- listen; | ||
if (s == "Hello from (3, -2)!") { | ||
s <- listen; | ||
if (s == "Hello from (4, -2)!") { | ||
grab; say "OK!" | ||
} {say $ "3: Not what I expected: " ++ s} | ||
} {say $ "2: Not what I expected: " ++ s} | ||
} {say $ "1: Not what I expected: " ++ s} | ||
robots: | ||
- name: base | ||
devices: | ||
- logger | ||
- hearing aid | ||
- comparator | ||
- branch predictor | ||
- string | ||
- grabber | ||
- name: saybot | ||
system: true | ||
display: | ||
invisible: false | ||
attr: blue | ||
program: | | ||
loc <- whereami; | ||
wait $ fst loc; | ||
say ("Hello from " ++ format loc ++ "!"); | ||
entities: | ||
- name: token | ||
display: | ||
char: 'W' | ||
properties: | ||
- known | ||
- pickable | ||
description: | ||
- Signals a success. | ||
world: | ||
palette: | ||
'.': [grass] | ||
'B': [grass, token, base] | ||
's': [grass, null, saybot] | ||
map: | | ||
B...s | ||
...ss | ||
..sss |
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