summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-11-05 21:23:07 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-11-05 21:23:07 +0100
commit7f82a729ae5074beafb6b4fd50d2f025dd05dfbe (patch)
tree28f2d5b968d75ff9e6f4eb6f03174d46359a0dc0 /test
parent0c9e57bfdc2ac5bead6c5f4984d3ae26eaeb5769 (diff)
wip broken
Diffstat (limited to 'test')
-rw-r--r--test/wall-atlas.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/test/wall-atlas.cpp b/test/wall-atlas.cpp
index 720c118f..b9ba2aec 100644
--- a/test/wall-atlas.cpp
+++ b/test/wall-atlas.cpp
@@ -9,13 +9,11 @@
namespace floormat {
-namespace ranges = std::ranges;
-namespace test = floormat::Serialize::wall_test;
using nlohmann::json;
namespace {
-Pair<wall_atlas_def, json> test_atlas_header(StringView path, StringView filename)
+[[nodiscard]] Pair<wall_atlas_def, json> test_atlas_header(StringView path, StringView filename)
{
auto j = json_helper::from_json_(Path::join(path, filename));
wall_atlas_def def;
@@ -23,19 +21,19 @@ Pair<wall_atlas_def, json> test_atlas_header(StringView path, StringView filenam
fm_assert(def.info.name == "foo"_s);
fm_assert(def.info.depth == 42);
- fm_assert(def.frameset_count == 2);
+ fm_assert(def.dir_count == 2);
constexpr auto none = (uint8_t)-1;
enum : uint8_t { N, E, S, W, };
- fm_assert(def.frameset_indexes[N] == 0 || def.frameset_indexes[N] == 1);
- fm_assert(def.frameset_indexes[E] == none);
- fm_assert(def.frameset_indexes[S] == none);
+ fm_assert(def.dir_indexes[N] == 0 || def.dir_indexes[N] == 1);
+ fm_assert(def.dir_indexes[E] == none);
+ fm_assert(def.dir_indexes[S] == none);
- if (def.frameset_indexes[N] == 0)
- fm_assert(def.frameset_indexes[W] == 1);
- else if (def.frameset_indexes[N] == 1)
- fm_assert(def.frameset_indexes[W] == 0);
+ if (def.dir_indexes[N] == 0)
+ fm_assert(def.dir_indexes[W] == 1);
+ else if (def.dir_indexes[N] == 1)
+ fm_assert(def.dir_indexes[W] == 0);
else
fm_assert(false);
@@ -50,7 +48,7 @@ void test_app::test_wall_atlas()
const auto path = Path::join(loader.TEMP_PATH, "test/json"_s);
fm_assert(Path::isDirectory(path));
- test_atlas_header(path, "frameset-header.json"_s);
+ (void)test_atlas_header(path, "frame_direction-header.json"_s);
}