Home | History | Annotate | Download | only in tests

Lines Matching full:reporter

18 static void test_assign_and_comparison(skiatest::Reporter* reporter) {
22 REPORTER_ASSERT(reporter, 0 == s.getSaveCount());
26 REPORTER_ASSERT(reporter, 1 == s.getSaveCount());
36 REPORTER_ASSERT(reporter, 2 == s.getSaveCount());
44 REPORTER_ASSERT(reporter, 3 == s.getSaveCount());
51 REPORTER_ASSERT(reporter, s == copy);
55 REPORTER_ASSERT(reporter, 2 == s.getSaveCount());
56 REPORTER_ASSERT(reporter, s != copy);
60 REPORTER_ASSERT(reporter, 3 == s.getSaveCount());
63 REPORTER_ASSERT(reporter, s == copy);
67 REPORTER_ASSERT(reporter, 2 == s.getSaveCount());
69 REPORTER_ASSERT(reporter, 3 == s.getSaveCount());
72 REPORTER_ASSERT(reporter, s != copy);
80 REPORTER_ASSERT(reporter, s == copy);
84 REPORTER_ASSERT(reporter, 2 == s.getSaveCount());
86 REPORTER_ASSERT(reporter, 3 == s.getSaveCount());
90 REPORTER_ASSERT(reporter, s != copy);
94 REPORTER_ASSERT(reporter, 2 == s.getSaveCount());
97 REPORTER_ASSERT(reporter, 2 == copy.getSaveCount());
98 REPORTER_ASSERT(reporter, s == copy);
100 REPORTER_ASSERT(reporter, 1 == s.getSaveCount());
102 REPORTER_ASSERT(reporter, 1 == copy.getSaveCount());
103 REPORTER_ASSERT(reporter, s == copy);
107 REPORTER_ASSERT(reporter, 0 == s.getSaveCount());
109 REPORTER_ASSERT(reporter, 1 == s.getSaveCount());
113 REPORTER_ASSERT(reporter, s != copy);
116 static void assert_count(skiatest::Reporter* reporter, const SkClipStack& stack,
123 REPORTER_ASSERT(reporter, count == counter);
128 static void test_iterators(skiatest::Reporter* reporter) {
143 assert_count(reporter, stack, 4);
153 REPORTER_ASSERT(reporter, SkClipStack::Element::kRect_Type == element->getType());
154 REPORTER_ASSERT(reporter, element->getRect() == gRects[i]);
168 REPORTER_ASSERT(reporter, SkClipStack::Element::kRect_Type == element->getType());
169 REPORTER_ASSERT(reporter, element->getRect() == gRects[i]);
182 REPORTER_ASSERT(reporter, SkClipStack::Element::kRect_Type == element->getType());
183 REPORTER_ASSERT(reporter, element->getRect() == gRects[3]);
188 static void test_bounds(skiatest::Reporter* reporter, SkClipStack::Element::Type primType) {
278 REPORTER_ASSERT(reporter, !stack.isWideOpen());
279 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID != stack.getTopmostGenID());
285 REPORTER_ASSERT(reporter, isIntersectionOfRects ==
288 REPORTER_ASSERT(reporter, !isIntersectionOfRects);
292 REPORTER_ASSERT(reporter, devClipBound == gAnswerRectsBW[testCase]);
301 static void test_isWideOpen(skiatest::Reporter* reporter) {
305 REPORTER_ASSERT(reporter, stack.isWideOpen());
306 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID());
318 REPORTER_ASSERT(reporter, stack.isWideOpen());
319 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID());
337 REPORTER_ASSERT(reporter, stack.isWideOpen());
338 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID());
347 REPORTER_ASSERT(reporter, stack.isWideOpen());
348 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID());
360 REPORTER_ASSERT(reporter, stack.isWideOpen());
361 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID());
372 REPORTER_ASSERT(reporter, !stack.isWideOpen());
373 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID != stack.getTopmostGenID());
377 REPORTER_ASSERT(reporter, stack.isWideOpen());
378 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID());
396 static void test_rect_inverse_fill(skiatest::Reporter* reporter) {
409 REPORTER_ASSERT(reporter, SkClipStack::kInsideOut_BoundsType == boundsType);
410 REPORTER_ASSERT(reporter, bounds == rect);
413 static void test_rect_replace(skiatest::Reporter* reporter) {
425 REPORTER_ASSERT(reporter, 0 == count(stack));
427 REPORTER_ASSERT(reporter, 1 == count(stack));
429 REPORTER_ASSERT(reporter, 1 == count(stack));
436 REPORTER_ASSERT(reporter, 0 == count(stack));
438 REPORTER_ASSERT(reporter, 1 == count(stack));
440 REPORTER_ASSERT(reporter, 1 == count(stack));
447 REPORTER_ASSERT(reporter, 0 == count(stack));
449 REPORTER_ASSERT(reporter, 1 == count(stack));
451 REPORTER_ASSERT(reporter, 1 == count(stack));
453 REPORTER_ASSERT(reporter, 1 == count(stack));
461 REPORTER_ASSERT(reporter, 1 == count(stack));
465 REPORTER_ASSERT(reporter, 2 == count(stack));
467 REPORTER_ASSERT(reporter, bound == rect);
469 REPORTER_ASSERT(reporter, 1 == count(stack));
474 REPORTER_ASSERT(reporter, 2 == count(stack));
476 REPORTER_ASSERT(reporter, 1 == count(stack));
482 REPORTER_ASSERT(reporter, 2 == count(stack));
484 REPORTER_ASSERT(reporter, 1 == count(stack));
489 static void test_path_replace(skiatest::Reporter* reporter) {
497 REPORTER_ASSERT(reporter, 0 == count(stack));
499 REPORTER_ASSERT(reporter, 1 == count(stack));
501 REPORTER_ASSERT(reporter, 1 == count(stack));
508 REPORTER_ASSERT(reporter, 1 == count(stack));
510 REPORTER_ASSERT(reporter, 1 == count(stack));
516 static void test_rect_merging(skiatest::Reporter* reporter) {
536 REPORTER_ASSERT(reporter, 1 == count(stack));
540 REPORTER_ASSERT(reporter, isIntersectionOfRects);
551 REPORTER_ASSERT(reporter, 1 == count(stack));
555 REPORTER_ASSERT(reporter, isIntersectionOfRects);
566 REPORTER_ASSERT(reporter, 2 == count(stack));
570 REPORTER_ASSERT(reporter, !isIntersectionOfRects);
581 REPORTER_ASSERT(reporter, 1 == count(stack));
585 REPORTER_ASSERT(reporter, isIntersectionOfRects);
596 REPORTER_ASSERT(reporter, 1 == count(stack));
600 REPORTER_ASSERT(reporter, isIntersectionOfRects);
611 REPORTER_ASSERT(reporter, 2 == count(stack));
615 REPORTER_ASSERT(reporter, !isIntersectionOfRects);
619 static void test_quickContains(skiatest::Reporter* reporter) {
639 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
646 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect));
654 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect));
663 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
673 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
680 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect));
686 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
692 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
698 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
705 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect));
711 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
717 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
723 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
733 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
742 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
751 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
760 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect));
769 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
777 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
785 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect));
793 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect));
881 static void test_reduced_clip_stack(skiatest::Reporter* reporter) {
975 REPORTER_ASSERT(reporter, SkClipStack::kInvalidGenID != reducedGenID);
1010 REPORTER_ASSERT_MESSAGE(reporter, region == reducedRegion, testCase.c_str());
1020 static void test_reduced_clip_stack_genid(skiatest::Reporter* reporter) {
1039 REPORTER_ASSERT(reporter, reducedClips.count() == 1);
1041 REPORTER_ASSERT(reporter, SkClipStack::kInvalidGenID != reducedGenID);
1134 REPORTER_ASSERT(reporter, reducedClips.count() == testCases[i].reducedClipCount);
1136 REPORTER_ASSERT(reporter, reducedGenID == testCases[i].reducedGenID);
1138 REPORTER_ASSERT(reporter, initial == testCases[i].initialState);
1141 REPORTER_ASSERT(reporter, tightBounds == testCases[i].tighterBounds);
1148 static void test_reduced_clip_stack_no_aa_crash(skiatest::Reporter* reporter) {
1167 REPORTER_ASSERT(reporter, 0 == reducedClips.count());
1172 DEF_TEST(ClipStack, reporter) {
1175 REPORTER_ASSERT(reporter, 0 == stack.getSaveCount());
1176 assert_count(reporter, stack, 0);
1194 REPORTER_ASSERT(reporter, NULL != element);
1195 REPORTER_ASSERT(reporter, SkClipStack::Element::kRect_Type == element->getType());
1196 REPORTER_ASSERT(reporter, SkRegion::kIntersect_Op == element->getOp());
1197 REPORTER_ASSERT(reporter, element->getRect() == answer);
1199 REPORTER_ASSERT(reporter, !iter.next());
1202 REPORTER_ASSERT(reporter, 0 == stack.getSaveCount());
1203 assert_count(reporter, stack, 0);
1205 test_assign_and_comparison(reporter);
1206 test_iterators(reporter);
1207 test_bounds(reporter, SkClipStack::Element::kRect_Type);
1208 test_bounds(reporter, SkClipStack::Element::kRRect_Type);
1209 test_bounds(reporter, SkClipStack::Element::kPath_Type);
1210 test_isWideOpen(reporter);
1211 test_rect_merging(reporter);
1212 test_rect_replace(reporter);
1213 test_rect_inverse_fill(reporter);
1214 test_path_replace(reporter);
1215 test_quickContains(reporter);
1217 test_reduced_clip_stack(reporter);
1218 test_reduced_clip_stack_genid(reporter);
1219 test_reduced_clip_stack_no_aa_crash(reporter);