Skip to content

Commit

Permalink
Fix lodestone test (#806)
Browse files Browse the repository at this point in the history
Turns out the test was not actually blocked by #540, I just did not investigate it properly.
  • Loading branch information
xsebek authored Oct 31, 2022
1 parent 5f4205e commit 69d8fd4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
5 changes: 4 additions & 1 deletion data/scenarios/Testing/562-lodestone.sw
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ build {
log "Hi!";
require "branch predictor";
repeat (
turn east; m2; x <- until (ishere "bit (0)") {harvest}; turn back; m2; place x
log "I am going for a bit";
turn east; m2; x <- until (ishere "bit (0)") {harvest}; turn back; m2; place x;
log "I brought a bit";
)};
until (ishere "bit (0)") {grab};
until (ishere "bit (0)") {grab};

make "bit (1)";
make "drill bit"
15 changes: 8 additions & 7 deletions data/scenarios/Testing/562-lodestone.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
version: 1
name: Test lodestone
description: Pick or drill lodestone and use it to flip bits.
goal:
- To create a drill bit, you will need to flip the available bit.
win: |
try {
as base {has "drill bit"};
} { return false }
objectives:
- goal:
- To create a drill bit, you will need to flip the available bit.
condition: |
try {
as base {has "drill bit"};
} { return false }
solution: |
run "562-lodestone.sw"
run "scenarios/Testing/562-lodestone.sw"
robots:
- name: base
dir: [1,0]
Expand Down
3 changes: 1 addition & 2 deletions test/integration/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ testScenarioSolution _ci _em =
, testSolution Default "Testing/479-atomic-race"
, testSolution (Sec 5) "Testing/479-atomic"
, testSolution Default "Testing/555-teleport-location"
, expectFailBecause "Awaiting fix (#540)" $
testSolution (Sec 10) "Testing/562-lodestone"
, testSolution Default "Testing/562-lodestone"
, testSolution Default "Testing/378-objectives"
, testSolution Default "Testing/684-swap"
, testSolution Default "Testing/699-movement-fail/699-move-blocked"
Expand Down

0 comments on commit 69d8fd4

Please sign in to comment.