mirror of
https://github.com/dcronqvist/DotTiled.git
synced 2025-05-09 02:36:03 +03:00
Use proper list assertion and add optional to some Data properties
This commit is contained in:
parent
4fd887e7c8
commit
df075eed8d
4 changed files with 12 additions and 20 deletions
|
@ -18,13 +18,7 @@ public static partial class DotTiledAssert
|
|||
// Data
|
||||
AssertEqual(expected.GlobalTileIDs, actual.GlobalTileIDs, nameof(Data.GlobalTileIDs));
|
||||
AssertEqual(expected.FlippingFlags, actual.FlippingFlags, nameof(Data.FlippingFlags));
|
||||
|
||||
if (expected.Chunks.HasValue)
|
||||
{
|
||||
AssertEqual(expected.Chunks.Value.Length, actual.Chunks.Value.Length, "Chunks.Length");
|
||||
for (var i = 0; i < expected.Chunks.Value.Length; i++)
|
||||
AssertChunk(expected.Chunks.Value[i], actual.Chunks.Value[i]);
|
||||
}
|
||||
AssertOptionalsEqual(expected.Chunks, actual.Chunks, nameof(Data.Chunks), (a, b) => AssertListOrdered(a, b, nameof(Chunk), AssertChunk));
|
||||
}
|
||||
|
||||
private static void AssertChunk(Chunk expected, Chunk actual)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue