this isn't good

This commit is contained in:
Simon Gardling
2021-03-31 20:01:30 -04:00
parent 99960c9523
commit e163387755
2 changed files with 5 additions and 5 deletions

View File

@@ -206,13 +206,13 @@ mod tests {
#[should_panic]
fn test_grid_new_panics() {
let mut rng = rand::thread_rng();
let _ = Grid::new(5, 5, &mut rng);
let _ = Grid::new(5, 5, &mut rng, vec![]);
}
#[test]
fn test_grid_new() {
let mut rng = rand::thread_rng();
let grid = Grid::new(8, 8, &mut rng);
let grid = Grid::new(8, 8, &mut rng, vec![]);
assert_eq!(grid.index(0.5, 0.6), 0);
assert_eq!(grid.index(1.5, 0.6), 1);
assert_eq!(grid.index(0.5, 1.6), 8);