From 75f7085c860d92673ac933435a59071b805c5c96 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 7 Nov 2024 14:01:44 +0100 Subject: [PATCH] also test for whether the padding intersects --- Tests/TexturePackerTests.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Tests/TexturePackerTests.cs b/Tests/TexturePackerTests.cs index 92cfae38..6837bc75 100644 --- a/Tests/TexturePackerTests.cs +++ b/Tests/TexturePackerTests.cs @@ -49,10 +49,18 @@ public void TestOverlap([Values(0, 1, 5, 10)] int padding) { } foreach (var r1 in packed) { + var r1Padded = r1.Area; + r1Padded.Inflate(padding, padding); + foreach (var r2 in packed) { if (r1 == r2) continue; + Assert.False(r1.Area.Intersects(r2.Area)); + + var r2Padded = r2.Area; + r2Padded.Inflate(padding, padding); + Assert.False(r1Padded.Intersects(r2Padded)); } } }