Mercurial > malikania
diff tests/tools/tileset/main.cpp @ 181:fbfc2555bda5
Common: cleanup
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 12 Oct 2018 20:24:40 +0200 |
parents | a3af3b793da4 |
children | 3107ce017c3a |
line wrap: on
line diff
--- a/tests/tools/tileset/main.cpp Tue Aug 21 10:55:13 2018 +0200 +++ b/tests/tools/tileset/main.cpp Fri Oct 12 20:24:40 2018 +0200 @@ -28,35 +28,33 @@ class test_tileset { protected: - mlk::directory_locator locator_{CMAKE_CURRENT_BINARY_DIR}; - mlk::loader loader_{locator_}; + mlk::directory_locator locator_{CMAKE_CURRENT_BINARY_DIR}; + mlk::loader loader_{locator_}; }; BOOST_FIXTURE_TEST_SUITE(test_tileset_suite, test_tileset) BOOST_AUTO_TEST_CASE(tileset) { - const std::vector<std::string> list{ - "tileset.json", - "tileset_embedded.json", - "tileset_external.json" - }; + const std::vector<std::string> list{ + "tileset.json", + "tileset_embedded.json", + "tileset_external.json" + }; - for (const auto& t : list) { - auto tileset = loader_.load_tileset(t); + for (const auto& t : list) { + auto tileset = loader_.load_tileset(t); - BOOST_REQUIRE_EQUAL("worldmapchip5fo.png", tileset.get_image()); - BOOST_REQUIRE_EQUAL(32U, tileset.get_cell().width); - BOOST_REQUIRE_EQUAL(32U, tileset.get_cell().height); - BOOST_REQUIRE_EQUAL(3U, tileset.get_tile_properties().size()); + BOOST_REQUIRE_EQUAL("worldmapchip5fo.png", tileset.image); + BOOST_REQUIRE_EQUAL(32U, tileset.cell.width); + BOOST_REQUIRE_EQUAL(32U, tileset.cell.height); + BOOST_REQUIRE_EQUAL(3U, tileset.tile_properties.size()); - auto tp = tileset.get_tile_properties(); + // Index 8. + BOOST_REQUIRE_EQUAL("value", tileset.tile_properties[8]["test"]); - // Index 8. - BOOST_REQUIRE_EQUAL("value", tp[8]["test"]); - - // TODO: postpone collisions once made. - } + // TODO: postpone collisions once made. + } } BOOST_AUTO_TEST_SUITE_END()