| 6 | using namespace Star; |
| 7 | |
| 8 | void testLine(Vec2D a, Vec2D b, Vec2I offset, List<Vec2I> comp) { |
| 9 | List<Vec2I> res; |
| 10 | forBlocksAlongLine(a + Vec2D(offset), |
| 11 | b - a, |
| 12 | [&res](int x, int y) { |
| 13 | res.append({x, y}); |
| 14 | return true; |
| 15 | }); |
| 16 | for (auto& c : comp) |
| 17 | c += offset; |
| 18 | EXPECT_TRUE(comp == res); |
| 19 | } |
| 20 | |
| 21 | void testGroup(Vec2I offset) { |
| 22 | testLine(Vec2D(0.5, 0.5), Vec2D(0.5, 0.5), offset, {{0, 0}}); |
no test coverage detected