Lines Matching refs:Reporter
17 #define TEST_NO_INTERSECT(rgn, rect) REPORTER_ASSERT(reporter, !rgn.intersects(rect))
18 #define TEST_INTERSECT(rgn, rect) REPORTER_ASSERT(reporter, rgn.intersects(rect))
19 #define TEST_NO_CONTAINS(rgn, rect) REPORTER_ASSERT(reporter, !rgn.contains(rect))
23 static void test_fromchrome(skiatest::Reporter* reporter) {
80 static void test_empties(skiatest::Reporter* reporter) {
84 REPORTER_ASSERT(reporter, empty.isEmpty());
85 REPORTER_ASSERT(reporter, !valid.isEmpty());
88 REPORTER_ASSERT(reporter, !empty.intersects(empty2));
89 REPORTER_ASSERT(reporter, !valid.intersects(empty));
92 REPORTER_ASSERT(reporter, !empty.contains(empty2));
93 REPORTER_ASSERT(reporter, !valid.contains(empty));
94 REPORTER_ASSERT(reporter, !empty.contains(valid));
134 static void test_contains_iter(skiatest::Reporter* reporter, const SkRegion& rgn) {
138 REPORTER_ASSERT(reporter, rgn.contains(r));
140 REPORTER_ASSERT(reporter, !rgn.contains(r));
145 static void contains_proc(skiatest::Reporter* reporter,
150 REPORTER_ASSERT(reporter, c0 == c1);
157 REPORTER_ASSERT(reporter, c0 == c1);
159 test_contains_iter(reporter, a);
160 test_contains_iter(reporter, b);
163 static void test_intersects_iter(skiatest::Reporter* reporter, const SkRegion& rgn) {
167 REPORTER_ASSERT(reporter, rgn.intersects(r));
169 REPORTER_ASSERT(reporter, rgn.intersects(r));
174 static void intersects_proc(skiatest::Reporter* reporter,
178 REPORTER_ASSERT(reporter, c0 == c1);
180 test_intersects_iter(reporter, a);
181 test_intersects_iter(reporter, b);
184 static void test_proc(skiatest::Reporter* reporter,
185 void (*proc)(skiatest::Reporter*,
193 proc(reporter, outer, inner);
226 DEF_TEST(Region, reporter) {
231 REPORTER_ASSERT(reporter, test_rects(r2, SK_ARRAY_COUNT(r2)));
239 REPORTER_ASSERT(reporter, test_rects(rects, SK_ARRAY_COUNT(rects)));
250 REPORTER_ASSERT(reporter, test_rects(rect, N));
253 test_proc(reporter, contains_proc);
254 test_proc(reporter, intersects_proc);
255 test_empties(reporter);
256 test_fromchrome(reporter);