parent
f208ca946e
commit
4b34de2109
@ -0,0 +1,21 @@ |
|||||||
|
#include <catch2/catch_test_macros.hpp> |
||||||
|
#include <fmt/core.h> |
||||||
|
#include <string> |
||||||
|
#include "components.hpp" |
||||||
|
#include "dinkyecs.hpp" |
||||||
|
|
||||||
|
using namespace fmt; |
||||||
|
using namespace components; |
||||||
|
|
||||||
|
TEST_CASE("test the loot ui", "[loot]") { |
||||||
|
Config items("assets/items.json"); |
||||||
|
DinkyECS::World world; |
||||||
|
auto torch = world.entity(); |
||||||
|
auto& data = items["TORCH_BAD"]; |
||||||
|
|
||||||
|
components::init(); |
||||||
|
components::configure_entity(world, torch, data["components"]); |
||||||
|
|
||||||
|
auto& torch_sprite = world.get<Sprite>(torch); |
||||||
|
REQUIRE(torch_sprite.name == "torch_horizontal_floor"); |
||||||
|
} |
Loading…
Reference in new issue