()
| 106 | |
| 107 | #[test] |
| 108 | fn test_index_to_point2d() { |
| 109 | struct TestMap {} |
| 110 | impl BaseMap for TestMap {} |
| 111 | impl Algorithm2D for TestMap { |
| 112 | fn dimensions(&self) -> Point { |
| 113 | Point::new(10, 10) |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | let map = TestMap {}; |
| 118 | let mut x = 0; |
| 119 | let mut y = 0; |
| 120 | for i in 0..100 { |
| 121 | assert!(map.index_to_point2d(i) == Point::new(x, y)); |
| 122 | |
| 123 | x += 1; |
| 124 | if x > 9 { |
| 125 | x = 0; |
| 126 | y += 1; |
| 127 | } |
| 128 | } |
| 129 | } |
| 130 | } |
nothing calls this directly
no outgoing calls
no test coverage detected