#include <gtest/gtest.h>
#include "doorkeeper/components/tilecoords.hpp"

TEST(increment, tilecoords) {
	typedef dk::TileCoords<2> tcoords2;
	typedef dk::TileCoords<2>::coords coords2;

	{
		const coords2 max_coords(150, 200);
		tcoords2 test(max_coords);
		EXPECT_EQ(tcoords2(coords2(0), max_coords), test);

		for (auto z = coords2(0).x(); z < max_coords.x(); ++z) {
			EXPECT_EQ(tcoords2(coords2(z, 0), max_coords), test);
			++test;
		}
		auto test_old = test++;
		EXPECT_EQ(tcoords2(coords2(1, 1), max_coords), test);
		EXPECT_EQ(tcoords2(coords2(0, 1), max_coords), test_old);
	}
}
