()
| 89 | |
| 90 | #[test] |
| 91 | fn test_point2d_to_index() { |
| 92 | struct TestMap {} |
| 93 | impl BaseMap for TestMap {} |
| 94 | impl Algorithm2D for TestMap { |
| 95 | fn dimensions(&self) -> Point { |
| 96 | Point::new(10, 10) |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | let map = TestMap {}; |
| 101 | assert!(map.point2d_to_index(Point::new(0, 0)) == 0); |
| 102 | assert!(map.point2d_to_index(Point::new(1, 0)) == 1); |
| 103 | assert!(map.point2d_to_index(Point::new(0, 1)) == 10); |
| 104 | assert!(map.point2d_to_index(Point::new(9, 9)) == 99); |
| 105 | } |
| 106 | |
| 107 | #[test] |
| 108 | fn test_index_to_point2d() { |
nothing calls this directly
no outgoing calls
no test coverage detected