21 lines
589 B
C++
21 lines
589 B
C++
#include <catch2/catch_test_macros.hpp>
|
|
#include <fmt/core.h>
|
|
#include <string>
|
|
#include "game/components.hpp"
|
|
#include "algos/dinkyecs.hpp"
|
|
|
|
using namespace fmt;
|
|
using namespace components;
|
|
|
|
TEST_CASE("test the loot ui", "[loot]") {
|
|
auto items = settings::get("assets/items.json");
|
|
DinkyECS::World world;
|
|
auto repair_kit = world.entity();
|
|
auto& data = items["REPAIR_KIT"];
|
|
|
|
components::init();
|
|
components::configure_entity(world, repair_kit, data["components"]);
|
|
|
|
auto& repair_kit_sprite = world.get<Sprite>(repair_kit);
|
|
REQUIRE(repair_kit_sprite.name == "repair_kit");
|
|
}
|