Skip to content

Commit

Permalink
dev: table test
Browse files Browse the repository at this point in the history
  • Loading branch information
roboteng committed Jan 1, 2024
1 parent 5d9fbb9 commit 4dc1431
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,12 @@ mod test {

#[test]
fn step_from_far_away() {
let goal = 10.0 * Vec3::X;
let step = Vec3::X;
let actual = next_step(Vec3::ZERO, goal, step);
let cases = &[(Vec3::X * 10.0, Vec3::X, Step::Continue(Vec3::X))];
cases.iter().for_each(|(goal, step, expected)| {
let actual = next_step(Vec3::ZERO, *goal, *step);

let expected = Step::Continue(step);

assert_eq!(actual, expected);
assert_eq!(actual, *expected);
});
}
}

Expand Down

0 comments on commit 4dc1431

Please sign in to comment.