First round of cleanup. dnd_loot.
This commit is contained in:
parent
689bb150c6
commit
f668ff6b7a
9 changed files with 169 additions and 38 deletions
|
@ -24,6 +24,8 @@ TEST_CASE("confirm component loading works", "[components]") {
|
|||
fmt::println("TEST COMPONENT: {} from file {}", key, test_data);
|
||||
auto ent = world.entity();
|
||||
components::configure_entity(world, ent, components);
|
||||
auto tile = components::get<Tile>(components[0]);
|
||||
REQUIRE(tile.display != L' ');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include <iostream>
|
||||
|
||||
TEST_CASE("confirm basic config loader ops", "[config]") {
|
||||
Config::set_base_dir("./");
|
||||
Config config("assets/devices.json");
|
||||
auto data_list = config.json();
|
||||
auto the_keys = config.keys();
|
||||
|
@ -17,4 +18,11 @@ TEST_CASE("confirm basic config loader ops", "[config]") {
|
|||
REQUIRE(comp_data.contains("_type"));
|
||||
}
|
||||
}
|
||||
|
||||
Config indexed("tests/config_test.json");
|
||||
auto& test_0 = indexed[0];
|
||||
REQUIRE(test_0["test"] == 0);
|
||||
|
||||
auto& test_1 = indexed[1];
|
||||
REQUIRE(test_1["test"] == 1);
|
||||
}
|
||||
|
|
4
tests/config_test.json
Normal file
4
tests/config_test.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
[
|
||||
{"test": 0},
|
||||
{"test": 1}
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue