Lines Matching refs:Reporter
19 static void test_assign_and_comparison(skiatest::Reporter* reporter) {
23 REPORTER_ASSERT(reporter, 0 == s.getSaveCount());
27 REPORTER_ASSERT(reporter, 1 == s.getSaveCount());
37 REPORTER_ASSERT(reporter, 2 == s.getSaveCount());
45 REPORTER_ASSERT(reporter, 3 == s.getSaveCount());
52 REPORTER_ASSERT(reporter, s == copy);
56 REPORTER_ASSERT(reporter, 2 == s.getSaveCount());
57 REPORTER_ASSERT(reporter, s != copy);
61 REPORTER_ASSERT(reporter, 3 == s.getSaveCount());
65 REPORTER_ASSERT(reporter, s == copy);
69 REPORTER_ASSERT(reporter, 2 == s.getSaveCount());
71 REPORTER_ASSERT(reporter, 3 == s.getSaveCount());
75 REPORTER_ASSERT(reporter, s != copy);
87 REPORTER_ASSERT(reporter, s != copy);
92 REPORTER_ASSERT(reporter, 2 == s.getSaveCount());
94 REPORTER_ASSERT(reporter, 3 == s.getSaveCount());
98 REPORTER_ASSERT(reporter, s != copy);
102 REPORTER_ASSERT(reporter, 2 == s.getSaveCount());
105 REPORTER_ASSERT(reporter, 2 == copy.getSaveCount());
106 REPORTER_ASSERT(reporter, s == copy);
108 REPORTER_ASSERT(reporter, 1 == s.getSaveCount());
110 REPORTER_ASSERT(reporter, 1 == copy.getSaveCount());
111 REPORTER_ASSERT(reporter, s == copy);
115 REPORTER_ASSERT(reporter, 0 == s.getSaveCount());
117 REPORTER_ASSERT(reporter, 1 == s.getSaveCount());
121 REPORTER_ASSERT(reporter, s != copy);
124 static void assert_count(skiatest::Reporter* reporter, const SkClipStack& stack,
131 REPORTER_ASSERT(reporter, count == counter);
136 static void test_iterators(skiatest::Reporter* reporter) {
151 assert_count(reporter, stack, 4);
161 REPORTER_ASSERT(reporter, SkClipStack::Element::kRect_Type == element->getType());
162 REPORTER_ASSERT(reporter, element->getRect() == gRects[i]);
176 REPORTER_ASSERT(reporter, SkClipStack::Element::kRect_Type == element->getType());
177 REPORTER_ASSERT(reporter, element->getRect() == gRects[i]);
190 REPORTER_ASSERT(reporter, SkClipStack::Element::kRect_Type == element->getType());
191 REPORTER_ASSERT(reporter, element->getRect() == gRects[3]);
196 static void test_bounds(skiatest::Reporter* reporter, bool useRects) {
273 REPORTER_ASSERT(reporter, !stack.isWideOpen());
274 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID != stack.getTopmostGenID());
280 REPORTER_ASSERT(reporter, isIntersectionOfRects ==
283 REPORTER_ASSERT(reporter, !isIntersectionOfRects);
287 REPORTER_ASSERT(reporter, devClipBound == gAnswerRectsBW[testCase]);
296 static void test_isWideOpen(skiatest::Reporter* reporter) {
300 REPORTER_ASSERT(reporter, stack.isWideOpen());
301 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID());
313 REPORTER_ASSERT(reporter, stack.isWideOpen());
314 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID());
332 REPORTER_ASSERT(reporter, stack.isWideOpen());
333 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID());
342 REPORTER_ASSERT(reporter, stack.isWideOpen());
343 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID());
355 REPORTER_ASSERT(reporter, stack.isWideOpen());
356 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID());
367 REPORTER_ASSERT(reporter, !stack.isWideOpen());
368 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID != stack.getTopmostGenID());
372 REPORTER_ASSERT(reporter, stack.isWideOpen());
373 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID());
391 static void test_rect_inverse_fill(skiatest::Reporter* reporter) {
404 REPORTER_ASSERT(reporter, SkClipStack::kInsideOut_BoundsType == boundsType);
405 REPORTER_ASSERT(reporter, bounds == rect);
408 static void test_rect_replace(skiatest::Reporter* reporter) {
420 REPORTER_ASSERT(reporter, 0 == count(stack));
422 REPORTER_ASSERT(reporter, 1 == count(stack));
424 REPORTER_ASSERT(reporter, 1 == count(stack));
431 REPORTER_ASSERT(reporter, 0 == count(stack));
433 REPORTER_ASSERT(reporter, 1 == count(stack));
435 REPORTER_ASSERT(reporter, 1 == count(stack));
442 REPORTER_ASSERT(reporter, 0 == count(stack));
444 REPORTER_ASSERT(reporter, 1 == count(stack));
446 REPORTER_ASSERT(reporter, 1 == count(stack));
448 REPORTER_ASSERT(reporter, 1 == count(stack));
456 REPORTER_ASSERT(reporter, 1 == count(stack));
460 REPORTER_ASSERT(reporter, 2 == count(stack));
462 REPORTER_ASSERT(reporter, bound == rect);
464 REPORTER_ASSERT(reporter, 1 == count(stack));
469 REPORTER_ASSERT(reporter, 2 == count(stack));
471 REPORTER_ASSERT(reporter, 1 == count(stack));
477 REPORTER_ASSERT(reporter, 2 == count(stack));
479 REPORTER_ASSERT(reporter, 1 == count(stack));
484 static void test_path_replace(skiatest::Reporter* reporter) {
492 REPORTER_ASSERT(reporter, 0 == count(stack));
494 REPORTER_ASSERT(reporter, 1 == count(stack));
496 REPORTER_ASSERT(reporter, 1 == count(stack));
503 REPORTER_ASSERT(reporter, 1 == count(stack));
505 REPORTER_ASSERT(reporter, 1 == count(stack));
511 static void test_rect_merging(skiatest::Reporter* reporter) {
531 REPORTER_ASSERT(reporter, 1 == count(stack));
535 REPORTER_ASSERT(reporter, isIntersectionOfRects);
546 REPORTER_ASSERT(reporter, 1 == count(stack));
550 REPORTER_ASSERT(reporter, isIntersectionOfRects);
561 REPORTER_ASSERT(reporter, 2 == count(stack));
565 REPORTER_ASSERT(reporter, !isIntersectionOfRects);
576 REPORTER_ASSERT(reporter, 1 == count(stack));
580 REPORTER_ASSERT(reporter, isIntersectionOfRects);
591 REPORTER_ASSERT(reporter, 1 == count(stack));
595 REPORTER_ASSERT(reporter, isIntersectionOfRects);
606 REPORTER_ASSERT(reporter, 2 == count(stack));
610 REPORTER_ASSERT(reporter, !isIntersectionOfRects);
614 static void test_quickContains(skiatest::Reporter* reporter) {
634 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
641 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect));
649 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect));
658 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
668 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
675 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect));
681 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
687 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
693 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
700 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect));
706 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
712 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
718 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
728 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
737 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
746 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
755 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect));
764 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
772 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
780 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
788 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect));
874 static void test_reduced_clip_stack(skiatest::Reporter* reporter) {
967 REPORTER_ASSERT(reporter, SkClipStack::kInvalidGenID != reducedGenID);
1001 REPORTER_ASSERT(reporter, region == reducedRegion);
1011 static void test_reduced_clip_stack_genid(skiatest::Reporter* reporter) {
1030 REPORTER_ASSERT(reporter, reducedClips.count() == 1);
1032 REPORTER_ASSERT(reporter, SkClipStack::kInvalidGenID != reducedGenID);
1125 REPORTER_ASSERT(reporter, reducedClips.count() == testCases[i].reducedClipCount);
1127 REPORTER_ASSERT(reporter, reducedGenID == testCases[i].reducedGenID);
1129 REPORTER_ASSERT(reporter, initial == testCases[i].initialState);
1132 REPORTER_ASSERT(reporter, tightBounds == testCases[i].tighterBounds);
1139 static void test_reduced_clip_stack_no_aa_crash(skiatest::Reporter* reporter) {
1158 REPORTER_ASSERT(reporter, 0 == reducedClips.count());
1163 DEF_TEST(ClipStack, reporter) {
1166 REPORTER_ASSERT(reporter, 0 == stack.getSaveCount());
1167 assert_count(reporter, stack, 0);
1185 REPORTER_ASSERT(reporter, NULL != element);
1186 REPORTER_ASSERT(reporter, SkClipStack::Element::kRect_Type == element->getType());
1187 REPORTER_ASSERT(reporter, SkRegion::kIntersect_Op == element->getOp());
1188 REPORTER_ASSERT(reporter, element->getRect() == answer);
1190 REPORTER_ASSERT(reporter, !iter.next());
1193 REPORTER_ASSERT(reporter, 0 == stack.getSaveCount());
1194 assert_count(reporter, stack, 0);
1196 test_assign_and_comparison(reporter);
1197 test_iterators(reporter);
1198 test_bounds(reporter, true); // once with rects
1199 test_bounds(reporter, false); // once with paths
1200 test_isWideOpen(reporter);
1201 test_rect_merging(reporter);
1202 test_rect_replace(reporter);
1203 test_rect_inverse_fill(reporter);
1204 test_path_replace(reporter);
1205 test_quickContains(reporter);
1207 test_reduced_clip_stack(reporter);
1208 test_reduced_clip_stack_genid(reporter);
1209 test_reduced_clip_stack_no_aa_crash(reporter);