Lines Matching refs:reporter
34 static void test_assign_and_comparison(skiatest::Reporter* reporter) {
38 REPORTER_ASSERT(reporter, 0 == s.getSaveCount());
42 REPORTER_ASSERT(reporter, 1 == s.getSaveCount());
52 REPORTER_ASSERT(reporter, 2 == s.getSaveCount());
60 REPORTER_ASSERT(reporter, 3 == s.getSaveCount());
67 REPORTER_ASSERT(reporter, s == copy);
71 REPORTER_ASSERT(reporter, 2 == s.getSaveCount());
72 REPORTER_ASSERT(reporter, s != copy);
76 REPORTER_ASSERT(reporter, 3 == s.getSaveCount());
79 REPORTER_ASSERT(reporter, s == copy);
83 REPORTER_ASSERT(reporter, 2 == s.getSaveCount());
85 REPORTER_ASSERT(reporter, 3 == s.getSaveCount());
88 REPORTER_ASSERT(reporter, s != copy);
96 REPORTER_ASSERT(reporter, s == copy);
100 REPORTER_ASSERT(reporter, 2 == s.getSaveCount());
102 REPORTER_ASSERT(reporter, 3 == s.getSaveCount());
106 REPORTER_ASSERT(reporter, s != copy);
109 REPORTER_ASSERT(reporter, 2 == s.getSaveCount());
112 REPORTER_ASSERT(reporter, 2 == copy.getSaveCount());
113 REPORTER_ASSERT(reporter, s == copy);
115 REPORTER_ASSERT(reporter, 1 == s.getSaveCount());
117 REPORTER_ASSERT(reporter, 1 == copy.getSaveCount());
118 REPORTER_ASSERT(reporter, s == copy);
122 REPORTER_ASSERT(reporter, 0 == s.getSaveCount());
124 REPORTER_ASSERT(reporter, 1 == s.getSaveCount());
128 REPORTER_ASSERT(reporter, s != copy);
131 static void assert_count(skiatest::Reporter* reporter, const SkClipStack& stack,
138 REPORTER_ASSERT(reporter, count == counter);
143 static void test_iterators(skiatest::Reporter* reporter) {
158 assert_count(reporter, stack, 4);
168 REPORTER_ASSERT(reporter, SkClipStack::Element::DeviceSpaceType::kRect ==
170 REPORTER_ASSERT(reporter, element->getDeviceSpaceRect() == gRects[i]);
184 REPORTER_ASSERT(reporter, SkClipStack::Element::DeviceSpaceType::kRect ==
186 REPORTER_ASSERT(reporter, element->getDeviceSpaceRect() == gRects[i]);
199 REPORTER_ASSERT(reporter, SkClipStack::Element::DeviceSpaceType::kRect ==
201 REPORTER_ASSERT(reporter, element->getDeviceSpaceRect() == gRects[3]);
206 static void test_bounds(skiatest::Reporter* reporter,
283 REPORTER_ASSERT(reporter, !stack.isWideOpen());
284 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID != stack.getTopmostGenID());
290 REPORTER_ASSERT(reporter, isIntersectionOfRects ==
293 REPORTER_ASSERT(reporter, !isIntersectionOfRects);
297 REPORTER_ASSERT(reporter, devClipBound == gAnswerRectsBW[testCase]);
306 static void test_isWideOpen(skiatest::Reporter* reporter) {
310 REPORTER_ASSERT(reporter, stack.isWideOpen());
311 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID());
323 REPORTER_ASSERT(reporter, stack.isWideOpen());
324 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID());
336 REPORTER_ASSERT(reporter, stack.isWideOpen());
337 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID());
348 REPORTER_ASSERT(reporter, !stack.isWideOpen());
349 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID != stack.getTopmostGenID());
353 REPORTER_ASSERT(reporter, stack.isWideOpen());
354 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID());
371 static void test_rect_inverse_fill(skiatest::Reporter* reporter) {
384 REPORTER_ASSERT(reporter, SkClipStack::kInsideOut_BoundsType == boundsType);
385 REPORTER_ASSERT(reporter, bounds == rect);
388 static void test_rect_replace(skiatest::Reporter* reporter) {
400 REPORTER_ASSERT(reporter, 0 == count(stack));
402 REPORTER_ASSERT(reporter, 1 == count(stack));
404 REPORTER_ASSERT(reporter, 1 == count(stack));
411 REPORTER_ASSERT(reporter, 0 == count(stack));
413 REPORTER_ASSERT(reporter, 1 == count(stack));
415 REPORTER_ASSERT(reporter, 1 == count(stack));
422 REPORTER_ASSERT(reporter, 0 == count(stack));
424 REPORTER_ASSERT(reporter, 1 == count(stack));
426 REPORTER_ASSERT(reporter, 1 == count(stack));
428 REPORTER_ASSERT(reporter, 1 == count(stack));
436 REPORTER_ASSERT(reporter, 1 == count(stack));
440 REPORTER_ASSERT(reporter, 2 == count(stack));
442 REPORTER_ASSERT(reporter, bound == rect);
444 REPORTER_ASSERT(reporter, 1 == count(stack));
449 REPORTER_ASSERT(reporter, 2 == count(stack));
451 REPORTER_ASSERT(reporter, 1 == count(stack));
457 REPORTER_ASSERT(reporter, 2 == count(stack));
459 REPORTER_ASSERT(reporter, 1 == count(stack));
464 static void test_path_replace(skiatest::Reporter* reporter) {
480 REPORTER_ASSERT(reporter, 0 == count(stack));
482 REPORTER_ASSERT(reporter, 2 == count(stack));
484 REPORTER_ASSERT(reporter, 2 == count(stack));
491 REPORTER_ASSERT(reporter, 1 == count(stack));
493 REPORTER_ASSERT(reporter, 2 == count(stack));
499 static void test_rect_merging(skiatest::Reporter* reporter) {
517 REPORTER_ASSERT(reporter, 1 == count(stack));
521 REPORTER_ASSERT(reporter, isIntersectionOfRects);
530 REPORTER_ASSERT(reporter, 1 == count(stack));
534 REPORTER_ASSERT(reporter, isIntersectionOfRects);
543 REPORTER_ASSERT(reporter, 2 == count(stack));
547 REPORTER_ASSERT(reporter, !isIntersectionOfRects);
556 REPORTER_ASSERT(reporter, 1 == count(stack));
560 REPORTER_ASSERT(reporter, isIntersectionOfRects);
569 REPORTER_ASSERT(reporter, 1 == count(stack));
573 REPORTER_ASSERT(reporter, isIntersectionOfRects);
582 REPORTER_ASSERT(reporter, 2 == count(stack));
586 REPORTER_ASSERT(reporter, !isIntersectionOfRects);
590 static void test_quickContains(skiatest::Reporter* reporter) {
610 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
617 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect));
625 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect));
634 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
644 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
651 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect));
657 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
663 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
669 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
676 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect));
682 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
688 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
694 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
704 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
713 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
722 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
731 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect));
740 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
748 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
756 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
764 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect));
791 static void test_invfill_diff_bug(skiatest::Reporter* reporter) {
800 REPORTER_ASSERT(reporter, SkClipStack::kEmptyGenID == stack.getTopmostGenID());
806 REPORTER_ASSERT(reporter, stackBounds.isEmpty());
807 REPORTER_ASSERT(reporter, SkClipStack::kNormal_BoundsType == stackBoundsType);
812 REPORTER_ASSERT(reporter, region.isEmpty());
817 static void test_is_rrect_deep_rect_stack(skiatest::Reporter* reporter) {
832 REPORTER_ASSERT(reporter, rrect == expected);
833 REPORTER_ASSERT(reporter, aa == isAA);
835 ERRORF(reporter, "Expected to be an rrect.");
849 REPORTER_ASSERT(reporter, !stack.isRRect(kTargetBounds, &rrect, &isAA));
852 DEF_TEST(ClipStack, reporter) {
855 REPORTER_ASSERT(reporter, 0 == stack.getSaveCount());
856 assert_count(reporter, stack, 0);
874 REPORTER_ASSERT(reporter, element);
875 REPORTER_ASSERT(reporter,
877 REPORTER_ASSERT(reporter, SkClipOp::kIntersect == element->getOp());
878 REPORTER_ASSERT(reporter, element->getDeviceSpaceRect() == answer);
880 REPORTER_ASSERT(reporter, !iter.next());
883 REPORTER_ASSERT(reporter, 0 == stack.getSaveCount());
884 assert_count(reporter, stack, 0);
886 test_assign_and_comparison(reporter);
887 test_iterators(reporter);
888 test_bounds(reporter, SkClipStack::Element::DeviceSpaceType::kRect);
889 test_bounds(reporter, SkClipStack::Element::DeviceSpaceType::kRRect);
890 test_bounds(reporter, SkClipStack::Element::DeviceSpaceType::kPath);
891 test_isWideOpen(reporter);
892 test_rect_merging(reporter);
893 test_rect_replace(reporter);
894 test_rect_inverse_fill(reporter);
895 test_path_replace(reporter);
896 test_quickContains(reporter);
897 test_invfill_diff_bug(reporter);
898 test_is_rrect_deep_rect_stack(reporter);