#include #include "doorkeeper/components/tileiterator.hpp" #include "doorkeeper/components/pixelconv.hpp" #include #include #include TEST(tileiterator, increment) { typedef dk::TileIterator tileit7; typedef dk::Vector<7> coords7; using boost::counting_iterator; std::vector data(counting_iterator(0), counting_iterator(100000)); dk::PixelConvSquare<7> pixconv(coords7(16)); { const coords7 max_coords(99, 999, 2, 2, 2, 2, 2); tileit7 it(&data, pixconv, max_coords); for (std::size_t z = 0; z < data.size() - 1; ++z) { EXPECT_EQ(data[z], it->data()); ++it; } EXPECT_EQ(data[data.size() - 1], it->data()); EXPECT_EQ(coords7(99, 999, 0, 0, 0, 0, 0), it->block_position()); } }