diff --git a/externals/skia b/externals/skia index bd7b9486..77049b87 160000 --- a/externals/skia +++ b/externals/skia @@ -1 +1 @@ -Subproject commit bd7b9486d19c2856f8dce824c8da3442af4ff469 +Subproject commit 77049b872966dc300ed233fc6e3930eb21bac5e3 diff --git a/tests/Tests/SKRegionTest.cs b/tests/Tests/SKRegionTest.cs index e94ec353..b49409d9 100644 --- a/tests/Tests/SKRegionTest.cs +++ b/tests/Tests/SKRegionTest.cs @@ -83,5 +83,39 @@ namespace SkiaSharp.Tests Assert.True(region.Intersects(rect)); } + + [SkippableFact] + public void ContainsReturnsFalseIfItDoesNotContain() + { + var region = new SKRegion(new SKRectI(30, 30, 40, 40)); + var region2 = new SKRegion(new SKRectI(25, 25, 50, 50)); + + Assert.False(region.Contains(region2)); + } + + [SkippableFact] + public void ContainsReturnsTrueIfItDoesContain() + { + var region = new SKRegion(new SKRectI(25, 25, 50, 50)); + var region2 = new SKRegion(new SKRectI(30, 30, 40, 40)); + + Assert.True(region.Contains(region2)); + } + + [SkippableFact] + public void ContainsReturnsFalseIfItDoesNotContainPoint() + { + var region = new SKRegion(new SKRectI(30, 30, 40, 40)); + + Assert.False(region.Contains(60, 60)); + } + + [SkippableFact] + public void ContainsReturnsTrueIfItDoesContainPoint() + { + var region = new SKRegion(new SKRectI(25, 25, 50, 50)); + + Assert.True(region.Contains(40, 40)); + } } }