From af74a6c5f876d4996a4e6c37d8b17eebaea1c04e Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Sat, 19 Oct 2019 00:04:45 +0200 Subject: [PATCH] Updating the submodules (#985) * Updated FreeType for Linux * Add fixes and tests for SkRegion.Contains return --- externals/skia | 2 +- tests/Tests/SKRegionTest.cs | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/externals/skia b/externals/skia index bd7b9486d1..77049b8729 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 e94ec35337..b49409d972 100644 --- a/tests/Tests/SKRegionTest.cs +++ b/tests/Tests/SKRegionTest.cs @@ -83,5 +83,39 @@ public void RegionIntersectsWithRectI() 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)); + } } }