mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 23:44:38 +00:00
make the test actually check the coords
This commit is contained in:
parent
803816a4e5
commit
a0859eaa50
1 changed files with 13 additions and 4 deletions
|
@ -367,9 +367,18 @@ mod tests {
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut dstar = DStarLite::new((0, 0), (4, 4), heuristic, successors, predecessors);
|
let mut dstar = DStarLite::new((0, 0), (4, 4), heuristic, successors, predecessors);
|
||||||
while let Some(pos) = dstar.next().unwrap() {
|
assert!(dstar.next().unwrap() == Some(&(0, 1)));
|
||||||
println!("{:?}", pos);
|
assert!(dstar.next().unwrap() == Some(&(0, 2)));
|
||||||
}
|
assert!(dstar.next().unwrap() == Some(&(1, 2)));
|
||||||
panic!()
|
assert!(dstar.next().unwrap() == Some(&(2, 2)));
|
||||||
|
assert!(dstar.next().unwrap() == Some(&(2, 1)));
|
||||||
|
assert!(dstar.next().unwrap() == Some(&(2, 0)));
|
||||||
|
assert!(dstar.next().unwrap() == Some(&(3, 0)));
|
||||||
|
assert!(dstar.next().unwrap() == Some(&(4, 0)));
|
||||||
|
assert!(dstar.next().unwrap() == Some(&(4, 1)));
|
||||||
|
assert!(dstar.next().unwrap() == Some(&(4, 2)));
|
||||||
|
assert!(dstar.next().unwrap() == Some(&(4, 3)));
|
||||||
|
assert!(dstar.next().unwrap() == Some(&(4, 4)));
|
||||||
|
assert!(dstar.next().unwrap() == None);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue