summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/json/wall-atlas-02_groups.json12
-rw-r--r--test/main.cpp4
-rw-r--r--test/wall-atlas.cpp17
3 files changed, 14 insertions, 19 deletions
diff --git a/test/json/wall-atlas-02_groups.json b/test/json/wall-atlas-02_groups.json
index 738f9761..ae187167 100644
--- a/test/json/wall-atlas-02_groups.json
+++ b/test/json/wall-atlas-02_groups.json
@@ -27,7 +27,11 @@
"w": {
"wall": {
"offset": 0,
- "count": 1
+ "count": 1,
+ "pixel-size": "42 x 192",
+ "tint-mult": [ 0.125, 0.25, 0.5, 1 ],
+ "tint-add": [ 1, 2, 3 ],
+ "mirrored": true
},
"side": {
"pixel-size": "42 x 192"
@@ -37,12 +41,6 @@
"offset": 1,
"count": 2
},
- "overlay": {
- "pixel-size": "42 x 192",
- "tint-mult": [ 0.125, 0.25, 0.5, 1 ],
- "tint-add": [ 1, 2, 3 ],
- "mirrored": true
- },
"corner-L": { "from-rotation": "n" }
}
}
diff --git a/test/main.cpp b/test/main.cpp
index 973609f6..93652102 100644
--- a/test/main.cpp
+++ b/test/main.cpp
@@ -28,13 +28,13 @@ int test_app::exec()
test_entity();
test_loader();
test_bitmask();
+ test_wall_atlas();
+ test_wall_atlas2();
test_serializer_1();
test_serializer_2();
test_math();
test_hash();
- test_wall_atlas();
test_scenery();
- test_wall_atlas2();
test_path_search_node_pool();
test_path_search();
test_dijkstra();
diff --git a/test/wall-atlas.cpp b/test/wall-atlas.cpp
index 14196b8c..a1c12d96 100644
--- a/test/wall-atlas.cpp
+++ b/test/wall-atlas.cpp
@@ -40,7 +40,6 @@ void test_read_header(StringView filename)
void test_read_groups(StringView filename)
{
- constexpr Group group_defaults;
const auto path = Path::join(json_path(), filename);
const auto jroot = json_helper::from_json_(path);
@@ -58,15 +57,13 @@ void test_read_groups(StringView filename)
const auto dir = read_direction_metadata(jroot, Direction_::W);
fm_assert(is_direction_defined(dir));
- fm_assert(dir.wall.pixel_size == Vector2ui{} );
- fm_assert(dir.overlay.default_tint == false );
- fm_assert(dir.wall.mirrored == false );
- fm_assert(dir.side.pixel_size == Vector2ui{42, 192} );
- fm_assert(dir.side.default_tint == true );
- fm_assert(dir.top.default_tint == true );
- fm_assert(dir.overlay.tint_mult == Vector4{0.125f, 0.25f, 0.5f, 1.f } );
- fm_assert(dir.overlay.tint_add == Vector3{1, 2, 3} );
- fm_assert(dir.overlay.mirrored == true );
+ fm_assert(dir.wall.pixel_size == Vector2ui{42, 192} );
+ fm_assert(dir.wall.tint_mult == Vector4{0.125f, 0.25f, 0.5f, 1.f } );
+ fm_assert(dir.wall.tint_add == Vector3{1, 2, 3} );
+ fm_assert(dir.wall.mirrored == true );
+ fm_assert(dir.side.pixel_size == Vector2ui{42, 192} );
+ fm_assert(dir.side.default_tint == true );
+ fm_assert(dir.top.default_tint == true );
const auto atlas2 = wall_atlas_def::deserialize(path);
fm_assert(atlas2.header == info);