Skip to content

Commit

Permalink
Add regression test for issue28
Browse files Browse the repository at this point in the history
  • Loading branch information
whoenig committed Oct 11, 2021
1 parent d64c138 commit edcef64
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/issue28.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
map:
dimensions: [4, 4]
obstacles:
- [0, 2]
- [0, 3]
- [1, 3]
- [3, 3]
agents:
- name: agent0
start: [1, 2]
goal: [3, 0]
- name: agent1
start: [3, 2]
goal: [2, 2]
- name: agent2
start: [2, 1]
goal: [0, 0]
4 changes: 4 additions & 0 deletions test/test_cbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,9 @@ def test_someAtGoal_disappearingAgents(self):
r = self.runCBS("../test/mapf_someAtGoal.yaml", additionalArgs=["--disappear-at-goal"])
self.assertTrue(r["statistics"]["cost"] == 1)

def test_issue28_disappearingAgents(self):
r = self.runCBS("../test/issue28.yaml", additionalArgs=["--disappear-at-goal"])
self.assertTrue(r["statistics"]["cost"] == 8)

if __name__ == '__main__':
unittest.main()
4 changes: 4 additions & 0 deletions test/test_ecbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,9 @@ def test_someAtGoal_disappearingAgents(self):
r = self.runECBS("../test/mapf_someAtGoal.yaml", 1.0, additionalArgs=["--disappear-at-goal"])
self.assertTrue(r["statistics"]["cost"] == 1)

def test_issue28_disappearingAgents(self):
r = self.runECBS("../test/issue28.yaml", 1.0, additionalArgs=["--disappear-at-goal"])
self.assertTrue(r["statistics"]["cost"] == 8)

if __name__ == '__main__':
unittest.main()

0 comments on commit edcef64

Please sign in to comment.