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
550 B
22 lines
550 B
3 months ago
|
#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");
|
||
|
}
|