You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
512 B
22 lines
512 B
#include <catch2/catch_test_macros.hpp>
|
|
#include <fmt/core.h>
|
|
#include "map.hpp"
|
|
#include "levelmanager.hpp"
|
|
#include "tilemap.hpp"
|
|
#include "config.hpp"
|
|
#include "rand.hpp"
|
|
|
|
using namespace fmt;
|
|
using std::string;
|
|
|
|
TEST_CASE("tilemap can load tiles and make a map", "[tilemap]") {
|
|
LevelManager levels;
|
|
GameLevel level = levels.current();
|
|
auto &map = *level.map;
|
|
|
|
TileMap tiles(map.width(), map.height());
|
|
auto& walls = map.walls();
|
|
tiles.load(walls);
|
|
tiles.dump();
|
|
REQUIRE(tiles.INVARIANT());
|
|
}
|
|
|