19 #include <boost/test/unit_test.hpp>
23 namespace architecture {
25 BOOST_AUTO_TEST_SUITE(architecture)
35 TileInfo tileInfo1; tileInfo1.
set(TileTypeIndex(1), TileRow( 0), TileCol( 0),
"tile1");
36 TileInfo tileInfo2; tileInfo2.
set(TileTypeIndex(2), TileRow(10), TileCol(10),
"tile2");
37 TileInfo tileInfo3; tileInfo3.
set(TileTypeIndex(3), TileRow(30), TileCol( 0),
"tile3");
38 BOOST_CHECK_EQUAL(manhattanDistance(tileInfo1, tileInfo2), uint32_t(20));
39 BOOST_CHECK_EQUAL(manhattanDistance(tileInfo1, tileInfo2),
40 manhattanDistance(tileInfo2, tileInfo1));
41 BOOST_CHECK_EQUAL(manhattanDistance(tileInfo1, tileInfo3), uint32_t(30));
42 BOOST_CHECK_EQUAL(manhattanDistance(tileInfo1, tileInfo3),
43 manhattanDistance(tileInfo3, tileInfo1));
44 BOOST_CHECK_EQUAL(manhattanDistance(tileInfo2, tileInfo3), uint32_t(30));
45 BOOST_CHECK_EQUAL(manhattanDistance(tileInfo2, tileInfo3),
46 manhattanDistance(tileInfo3, tileInfo2));
49 BOOST_AUTO_TEST_SUITE_END()
51 BOOST_AUTO_TEST_SUITE(regression)
52 BOOST_AUTO_TEST_SUITE(architecture)
62 BOOST_AUTO_TEST_SUITE_END()
63 BOOST_AUTO_TEST_SUITE_END()
Encapsulation of a tile row in an unsigned 16-bit integer.
Encapsulation of a tile column in an unsigned 16-bit integer.
BOOST_AUTO_TEST_CASE(ArcUnitTest)
Unit test for the Arc class.
Encapsulation of a tile within a device tile map.
void set(const TileTypeIndex &inTypeIndex, const TileRow &inRow, const TileCol &inCol, const char *inName)
Protected initializer intended for use by the Tiles class.
Encapsulation of a tile type index in an unsigned 16-bit integer.
Header for the TileInfo class.