Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 1df34ac

Browse files
committed
Add isEmpty() checks
1 parent 7bd2ae4 commit 1df34ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

display_list/geometry/dl_region_unittests.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ namespace testing {
1414

1515
TEST(DisplayListRegion, EmptyRegion) {
1616
DlRegion region;
17+
EXPECT_TRUE(region.isEmpty());
1718
EXPECT_TRUE(region.getRects().empty());
1819
}
1920

@@ -204,6 +205,7 @@ TEST(DisplayListRegion, Intersection1) {
204205
});
205206
DlRegion i = DlRegion::MakeIntersection(region1, region2);
206207
EXPECT_EQ(i.bounds(), SkIRect::MakeEmpty());
208+
EXPECT_TRUE(i.isEmpty());
207209
auto rects = i.getRects();
208210
EXPECT_TRUE(rects.empty());
209211
}
@@ -309,6 +311,7 @@ TEST(DisplayListRegion, UnionEmpty) {
309311
DlRegion region2(std::vector<SkIRect>{});
310312
DlRegion u = DlRegion::MakeUnion(region1, region2);
311313
EXPECT_EQ(u.bounds(), SkIRect::MakeEmpty());
314+
EXPECT_TRUE(u.isEmpty());
312315
auto rects = u.getRects();
313316
EXPECT_TRUE(rects.empty());
314317
}

0 commit comments

Comments
 (0)