()
| 73 | |
| 74 | #[test] |
| 75 | fn test_in_bounds() { |
| 76 | struct TestMap {} |
| 77 | impl BaseMap for TestMap {} |
| 78 | impl Algorithm2D for TestMap { |
| 79 | fn dimensions(&self) -> Point { |
| 80 | Point::new(2, 2) |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | let map = TestMap {}; |
| 85 | assert!(map.in_bounds(Point::new(0, 0))); |
| 86 | assert!(map.in_bounds(Point::new(1, 1))); |
| 87 | assert!(!map.in_bounds(Point::new(3, 3))); |
| 88 | } |
| 89 | |
| 90 | #[test] |
| 91 | fn test_point2d_to_index() { |
nothing calls this directly
no outgoing calls
no test coverage detected