31 lines
720 B
C++
31 lines
720 B
C++
#include <fuc2/testing.hpp>
|
|
#include <fmt/core.h>
|
|
#include <string>
|
|
#include "game/components.hpp"
|
|
#include "algos/dinkyecs.hpp"
|
|
|
|
using namespace fmt;
|
|
using namespace components;
|
|
using namespace fuc2;
|
|
|
|
namespace loot_tests {
|
|
void test_test_the_loot_ui() {
|
|
auto items = settings::get("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);
|
|
CHECK(torch_sprite.name == "torch_horizontal_floor");
|
|
}
|
|
|
|
fuc2::Set TESTS{
|
|
.name="loot",
|
|
.tests={
|
|
TEST(test_test_the_loot_ui),
|
|
}
|
|
};
|
|
}
|