summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-11-22 16:34:49 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-11-22 16:34:49 +0100
commit9bde31b07ada8aa5a3a2d30ffa904c38c3c0e09a (patch)
tree54e4d13e4dec69cc48eec161279fb31354338b5f /test
parentcf5fb8c3076ac35e7be1b9e42fe919b106413a44 (diff)
a
Diffstat (limited to 'test')
-rw-r--r--test/wall-atlas.cpp32
1 files changed, 22 insertions, 10 deletions
diff --git a/test/wall-atlas.cpp b/test/wall-atlas.cpp
index d544ac2b..188eb760 100644
--- a/test/wall-atlas.cpp
+++ b/test/wall-atlas.cpp
@@ -104,6 +104,11 @@ void test_read_groups(StringView filename)
return atlas;
}
+void test_expected_size()
+{
+ fm_assert_equal(Vector2i{64, 192}, wall_atlas::expected_size(42, Tag::wall));
+}
+
} // namespace
} // namespace floormat::Wall::detail
@@ -111,18 +116,25 @@ void test_read_groups(StringView filename)
void floormat::test_app::test_wall_atlas()
{
using namespace floormat::Wall::detail;
- constexpr auto S_01_header_json = "wall-atlas-01_header.json"_s,
- S_02_groups_json = "wall-atlas-02_groups.json"_s;
-
- test_read_header(S_01_header_json);
- { test_read_header(S_02_groups_json);
- test_read_groups(S_02_groups_json);
+ {
+ test_expected_size();
}
- { auto a = read_and_check(Path::join(json_path(), S_02_groups_json));
- a.serialize(temp_filename());
- auto b = read_and_check(temp_filename());
- fm_assert(a == b);
+ {
+ constexpr auto S_01_header_json = "wall-atlas-01_header.json"_s,
+ S_02_groups_json = "wall-atlas-02_groups.json"_s;
+
+ test_read_header(S_01_header_json);
+
+ { test_read_header(S_02_groups_json);
+ test_read_groups(S_02_groups_json);
+ }
+
+ { auto a = read_and_check(Path::join(json_path(), S_02_groups_json));
+ a.serialize(temp_filename());
+ auto b = read_and_check(temp_filename());
+ fm_assert(a == b);
+ }
}
}