summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/json/wall-atlas-02_groups.json10
-rw-r--r--test/wall-atlas.cpp4
2 files changed, 9 insertions, 5 deletions
diff --git a/test/json/wall-atlas-02_groups.json b/test/json/wall-atlas-02_groups.json
index b2d44fc5..d3b25918 100644
--- a/test/json/wall-atlas-02_groups.json
+++ b/test/json/wall-atlas-02_groups.json
@@ -23,10 +23,6 @@
"offset": 0,
"count": 1
},
- "corner-L": {
- "offset": 0,
- "count": 11
- },
"top": {
"from-rotation": "w"
}
@@ -49,6 +45,10 @@
"offset": 1,
"count": 12
},
- "corner-L": { "from-rotation": "n" }
+ "corner": {
+ "pixel-size": "42 x 192",
+ "offset": 2,
+ "count": 1
+ }
}
}
diff --git a/test/wall-atlas.cpp b/test/wall-atlas.cpp
index 9258863c..eec4ecee 100644
--- a/test/wall-atlas.cpp
+++ b/test/wall-atlas.cpp
@@ -65,6 +65,8 @@ void test_read_groups(StringView filename)
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.corner.index == 2);
+ fm_assert(dir.corner.count == 1);
const auto atlas2 = wall_atlas_def::deserialize(path);
fm_assert(atlas2.header == info);
@@ -88,8 +90,10 @@ void test_from_rotation(StringView filename)
fm_assert(D_n.top.is_defined);
fm_assert(D_n.top.from_rotation != null);
fm_assert(D_n.top.from_rotation != null);
+ fm_assert(!D_n.corner.is_defined);
fm_assert(D_w.top.from_rotation == null);
fm_assert(D_w.top.is_defined);
+ fm_assert(D_w.corner.is_defined);
fm_assert(atlas.direction_array[D_n.top.from_rotation].top.count == 12);
}