Lines Matching defs:reporter
18 #define TEST_NO_INTERSECT(rgn, rect) REPORTER_ASSERT(reporter, !rgn.intersects(rect))
19 #define TEST_INTERSECT(rgn, rect) REPORTER_ASSERT(reporter, rgn.intersects(rect))
20 #define TEST_NO_CONTAINS(rgn, rect) REPORTER_ASSERT(reporter, !rgn.contains(rect))
24 static void test_fromchrome(skiatest::Reporter* reporter) {
81 static void test_empties(skiatest::Reporter* reporter) {
85 REPORTER_ASSERT(reporter, empty.isEmpty());
86 REPORTER_ASSERT(reporter, !valid.isEmpty());
89 REPORTER_ASSERT(reporter, !empty.intersects(empty2));
90 REPORTER_ASSERT(reporter, !valid.intersects(empty));
93 REPORTER_ASSERT(reporter, !empty.contains(empty2));
94 REPORTER_ASSERT(reporter, !valid.contains(empty));
95 REPORTER_ASSERT(reporter, !empty.contains(valid));
142 static void test_contains_iter(skiatest::Reporter* reporter, const SkRegion& rgn) {
146 REPORTER_ASSERT(reporter, rgn.contains(r));
148 REPORTER_ASSERT(reporter, !rgn.contains(r));
153 static void contains_proc(skiatest::Reporter* reporter,
158 REPORTER_ASSERT(reporter, c0 == c1);
165 REPORTER_ASSERT(reporter, c0 == c1);
167 test_contains_iter(reporter, a);
168 test_contains_iter(reporter, b);
171 static void test_intersects_iter(skiatest::Reporter* reporter, const SkRegion& rgn) {
175 REPORTER_ASSERT(reporter, rgn.intersects(r));
177 REPORTER_ASSERT(reporter, rgn.intersects(r));
182 static void intersects_proc(skiatest::Reporter* reporter,
186 REPORTER_ASSERT(reporter, c0 == c1);
188 test_intersects_iter(reporter, a);
189 test_intersects_iter(reporter, b);
192 static void test_proc(skiatest::Reporter* reporter,
201 proc(reporter, outer, inner);
234 DEF_TEST(Region, reporter) {
239 REPORTER_ASSERT(reporter, test_rects(r2, SK_ARRAY_COUNT(r2)));
247 REPORTER_ASSERT(reporter, test_rects(rects, SK_ARRAY_COUNT(rects)));
258 REPORTER_ASSERT(reporter, test_rects(rect, N));
261 test_proc(reporter, contains_proc);
262 test_proc(reporter, intersects_proc);
263 test_empties(reporter);
264 test_fromchrome(reporter);
400 DEF_TEST(region_toobig, reporter) {
405 REPORTER_ASSERT(reporter, !neg.isEmpty());
406 REPORTER_ASSERT(reporter, !pos.isEmpty());
411 REPORTER_ASSERT(reporter, !negR.isEmpty());
412 REPORTER_ASSERT(reporter, !posR.isEmpty());
419 REPORTER_ASSERT(reporter, rgn.isEmpty());
422 DEF_TEST(region_inverse_union_skbug_7491, reporter) {
434 REPORTER_ASSERT(reporter, clip == rgn);
437 DEF_TEST(giant_path_region, reporter) {
447 DEF_TEST(rrect_region_crbug_850350, reporter) {
470 DEF_TEST(region_bug_chromium_873051, reporter) {
472 REPORTER_ASSERT(reporter, region.setRect({0, 0, 0x7FFFFFFE, 0x7FFFFFFE}));
473 REPORTER_ASSERT(reporter, !region.setRect({0, 0, 0x7FFFFFFE, 0x7FFFFFFF}));
474 REPORTER_ASSERT(reporter, !region.setRect({0, 0, 0x7FFFFFFF, 0x7FFFFFFE}));
475 REPORTER_ASSERT(reporter, !region.setRect({0, 0, 0x7FFFFFFF, 0x7FFFFFFF}));
478 DEF_TEST(region_empty_iter, reporter) {
480 REPORTER_ASSERT(reporter, !emptyIter.rewind());
481 REPORTER_ASSERT(reporter, emptyIter.done());
483 REPORTER_ASSERT(reporter, eRect.isEmpty());
484 REPORTER_ASSERT(reporter, SkIRect::MakeEmpty() == eRect);
485 REPORTER_ASSERT(reporter, !emptyIter.rgn());
490 REPORTER_ASSERT(reporter, resetIter.rewind());
491 REPORTER_ASSERT(reporter, resetIter.done());
493 REPORTER_ASSERT(reporter, rRect.isEmpty());
494 REPORTER_ASSERT(reporter, SkIRect::MakeEmpty() == rRect);
495 REPORTER_ASSERT(reporter, resetIter.rgn());
496 REPORTER_ASSERT(reporter, resetIter.rgn()->isEmpty());
499 REPORTER_ASSERT(reporter, iter.done());
501 REPORTER_ASSERT(reporter, iRect.isEmpty());
502 REPORTER_ASSERT(reporter, SkIRect::MakeEmpty() == iRect);
503 REPORTER_ASSERT(reporter, iter.rgn());
504 REPORTER_ASSERT(reporter, iter.rgn()->isEmpty());
507 REPORTER_ASSERT(reporter, clipIter.done());
509 REPORTER_ASSERT(reporter, cRect.isEmpty());
510 REPORTER_ASSERT(reporter, SkIRect::MakeEmpty() == cRect);
514 REPORTER_ASSERT(reporter, !spanIter.next(&left, &right));
515 REPORTER_ASSERT(reporter, !left);
516 REPORTER_ASSERT(reporter, !right);