Skip to content

Commit

Permalink
add failing test case for #38
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrins committed Feb 24, 2015
1 parent 3f983dc commit 08cdfdc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ test( "Pathfinding", function() {
equal (result1.text, "(0,1)(1,1)(1,2)(2,2)(2,3)", "Result is expected");
});

test( "Pathfinding (Issue #38)", function() {
var result1 = runSearch([
[1,1,1,0,1,1,1,1],
[1,1,1,0,1,1,1,1],
[1,1,1,1,1,1,0,1],
[1,1,0,1,0,1,1,0],
[1,0,1,1,1,1,1,0],
], [3,5], [4,1]);

equal (result1.text, "NEEDS PATH", "Result is expected");
});

test( "Diagonal Pathfinding", function() {
var result1 = runSearch(new Graph([
[1,1,1,1],
Expand Down

0 comments on commit 08cdfdc

Please sign in to comment.