Index: tests/WindowRectanglesTest.cpp |
diff --git a/tests/WindowRectanglesTest.cpp b/tests/WindowRectanglesTest.cpp |
index e9545651afd8b9fc90a1395c8c7340911aeb0afc..d569f1d7aa2320fdae27d3896e5cf9ec3a8819ec 100644 |
--- a/tests/WindowRectanglesTest.cpp |
+++ b/tests/WindowRectanglesTest.cpp |
@@ -31,6 +31,7 @@ |
GrWindowRectangles wr2(wr); |
REPORTER_ASSERT(reporter, wr2 == wr); |
+ REPORTER_ASSERT(reporter, wr2.mode() == wr.mode()); |
REPORTER_ASSERT(reporter, wr2.count() == wr.count()); |
REPORTER_ASSERT(reporter, !memcmp(wr2.data(), wr.data(), i * sizeof(SkIRect))); |
@@ -71,6 +72,21 @@ |
REPORTER_ASSERT(reporter, !memcmp(A.data(), windowData, |
GrWindowRectangles::kMaxWindows * sizeof(SkIRect))); |
} |
+ |
+ GrWindowRectangles wrI(GrWindowRectangles::Mode::kInclusive); |
+ for (int i = 0; i < wr.count(); ++i) { |
+ wrI.addWindow(windowData[i]); |
+ } |
+ REPORTER_ASSERT(reporter, wrI != wr); |
+ REPORTER_ASSERT(reporter, wrI.mode() != wr.mode()); |
+ REPORTER_ASSERT(reporter, wrI.count() == wr.count()); |
+ REPORTER_ASSERT(reporter, !memcmp(wrI.data(), wr.data(), wr.count() * sizeof(SkIRect))); |
+ |
+ wr.reset(GrWindowRectangles::Mode::kInclusive); |
+ for (int i = 0; i < wrI.count(); ++i) { |
+ wr.addWindow(windowData[i]); |
+ } |
+ REPORTER_ASSERT(reporter, wrI == wr); |
} |
#endif |