Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
kostmo committed Sep 18, 2023
1 parent e5c5443 commit 7d64e16
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions data/scenarios/Testing/00-ORDER.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ Achievements
1379-single-world-portal-reorientation.yaml
1399-backup-command.yaml
1430-built-robot-ownership.yaml
1536-custom-unwalkable-entities.yaml
50 changes: 50 additions & 0 deletions data/scenarios/Testing/1536-custom-unwalkable-entities.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
version: 1
name: Custom unwalkability
description: The base robot cannot walk through trees.
The scenario shall be failed if the robot
manages to walk through the tree by moving
three cells to the east.
objectives:
- goal:
- Get the flower
condition: |
as base {has "flower"};
prerequisite:
not: has_bitcoin
- id: has_bitcoin
optional: true
goal:
- Do not get the bitcoin
condition: |
as base {has "bitcoin"};
solution: |
def tryMove = try {move} {}; end;
tryMove;
tryMove;
tryMove;
grab;
robots:
- name: base
dir: [1, 0]
display:
attr: robot
devices:
- logger
- grabber
- treads
- dictionary
- net
unwalkable:
- tree
known: [tree, flower, bitcoin]
world:
palette:
'B': [grass, null, base]
'.': [grass]
'T': [grass, tree]
'b': [grass, bitcoin]
'f': [grass, flower]
upperleft: [0, 0]
map: |
BfTb
1 change: 1 addition & 0 deletions test/integration/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ testScenarioSolutions rs ui =
, testSolution Default "Testing/1355-combustion"
, testSolution Default "Testing/1379-single-world-portal-reorientation"
, testSolution Default "Testing/1399-backup-command"
, testSolution Default "Testing/1536-custom-unwalkable-entities"
, testGroup
-- Note that the description of the classic world in
-- data/worlds/classic.yaml (automatically tested to some
Expand Down

0 comments on commit 7d64e16

Please sign in to comment.