Lines Matching refs:REPORTER_ASSERT

33     REPORTER_ASSERT(reporter, bounds == rrect.rect());  in test_add_rrect()
38 REPORTER_ASSERT(reporter, bounds == path.getBounds()); in test_add_rrect()
46 REPORTER_ASSERT(reporter, !path.isConvex()); in test_skbug_3469()
199 REPORTER_ASSERT(reporter, 50 == last.fX); in test_path_close_issue1474()
200 REPORTER_ASSERT(reporter, 50 == last.fY); in test_path_close_issue1474()
210 REPORTER_ASSERT(reporter, 75 == last.fX); in test_path_close_issue1474()
211 REPORTER_ASSERT(reporter, 75 == last.fY); in test_path_close_issue1474()
221 REPORTER_ASSERT(reporter, 85 == last.fX); in test_path_close_issue1474()
222 REPORTER_ASSERT(reporter, 85 == last.fY); in test_path_close_issue1474()
232 REPORTER_ASSERT(reporter, 95 == last.fX); in test_path_close_issue1474()
233 REPORTER_ASSERT(reporter, 95 == last.fY); in test_path_close_issue1474()
238 REPORTER_ASSERT(reporter, a.getGenerationID() == b.getGenerationID()); in test_gen_id()
242 REPORTER_ASSERT(reporter, z != b.getGenerationID()); in test_gen_id()
245 REPORTER_ASSERT(reporter, a.getGenerationID() == b.getGenerationID()); in test_gen_id()
249 REPORTER_ASSERT(reporter, z != y); in test_gen_id()
253 REPORTER_ASSERT(reporter, x != y && x != z); in test_gen_id()
256 REPORTER_ASSERT(reporter, b.getGenerationID() == y && a.getGenerationID() == x); in test_gen_id()
259 REPORTER_ASSERT(reporter, b.getGenerationID() == x); in test_gen_id()
262 REPORTER_ASSERT(reporter, c.getGenerationID() == x); in test_gen_id()
266 REPORTER_ASSERT(reporter, b.getGenerationID() == x); in test_gen_id()
267 REPORTER_ASSERT(reporter, a.getGenerationID() == x); in test_gen_id()
268 REPORTER_ASSERT(reporter, w != x); in test_gen_id()
278 REPORTER_ASSERT(reporter, (v == w) == kExpectGenIDToIgnoreFill); in test_gen_id()
281 REPORTER_ASSERT(reporter, v != c.getGenerationID()); in test_gen_id()
426 REPORTER_ASSERT(reporter, path.isRect(NULL)); in test_addrect()
431 REPORTER_ASSERT(reporter, !path.isRect(NULL)); in test_addrect()
436 REPORTER_ASSERT(reporter, !path.isRect(NULL)); in test_addrect()
441 REPORTER_ASSERT(reporter, !path.isRect(NULL)); in test_addrect()
446 REPORTER_ASSERT(reporter, !path.isRect(NULL)); in test_addrect()
454 REPORTER_ASSERT(reporter, path.isFinite()); in test_addrect_isfinite()
458 REPORTER_ASSERT(reporter, !path.isFinite()); in test_addrect_isfinite()
461 REPORTER_ASSERT(reporter, !path.isFinite()); in test_addrect_isfinite()
464 REPORTER_ASSERT(reporter, path.isFinite()); in test_addrect_isfinite()
467 REPORTER_ASSERT(reporter, path.isFinite()); in test_addrect_isfinite()
548 REPORTER_ASSERT(reporter, path.getBounds().isFinite()); in test_isfinite_after_transform()
549 REPORTER_ASSERT(reporter, !path.getBounds().isEmpty()); in test_isfinite_after_transform()
552 REPORTER_ASSERT(reporter, path.getBounds().isEmpty()); in test_isfinite_after_transform()
557 REPORTER_ASSERT(reporter, !path.isFinite()); in test_isfinite_after_transform()
558 REPORTER_ASSERT(reporter, path.getBounds().isEmpty()); in test_isfinite_after_transform()
624 REPORTER_ASSERT(reporter, temp.isConvex()); in test_arb_round_rect_is_convex()
652 REPORTER_ASSERT(reporter, temp.isRect(&result)); in test_arb_zero_rad_round_rect_is_rect()
653 REPORTER_ASSERT(reporter, r == result); in test_arb_zero_rad_round_rect_is_rect()
664 REPORTER_ASSERT(reporter, r.isFinite()); in test_rect_isfinite()
666 REPORTER_ASSERT(reporter, !r.isFinite()); in test_rect_isfinite()
668 REPORTER_ASSERT(reporter, !r.isFinite()); in test_rect_isfinite()
677 REPORTER_ASSERT(reporter, isFine); in test_rect_isfinite()
678 REPORTER_ASSERT(reporter, !r.isEmpty()); in test_rect_isfinite()
682 REPORTER_ASSERT(reporter, !isFine); in test_rect_isfinite()
683 REPORTER_ASSERT(reporter, r.isEmpty()); in test_rect_isfinite()
687 REPORTER_ASSERT(reporter, !isFine); in test_rect_isfinite()
688 REPORTER_ASSERT(reporter, r.isEmpty()); in test_rect_isfinite()
697 REPORTER_ASSERT(reporter, path.isFinite()); in test_path_isfinite()
700 REPORTER_ASSERT(reporter, path.isFinite()); in test_path_isfinite()
704 REPORTER_ASSERT(reporter, path.isFinite()); in test_path_isfinite()
708 REPORTER_ASSERT(reporter, !path.isFinite()); in test_path_isfinite()
712 REPORTER_ASSERT(reporter, !path.isFinite()); in test_path_isfinite()
737 REPORTER_ASSERT(reporter, firstTime); in test_poly()
738 REPORTER_ASSERT(reporter, pts[0] == srcPts[0]); in test_poly()
743 REPORTER_ASSERT(reporter, !firstTime); in test_poly()
744 REPORTER_ASSERT(reporter, pts[1] == srcPts[0]); in test_poly()
757 REPORTER_ASSERT(reporter, !firstTime); in test_poly()
758 REPORTER_ASSERT(reporter, !foundClose); in test_poly()
759 REPORTER_ASSERT(reporter, expectClose); in test_poly()
767 REPORTER_ASSERT(reporter, foundClose == expectClose); in test_poly()
790 REPORTER_ASSERT(reporter, rec.isFillStyle()); in test_strokerec()
793 REPORTER_ASSERT(reporter, rec.isHairlineStyle()); in test_strokerec()
796 REPORTER_ASSERT(reporter, SkStrokeRec::kStroke_Style == rec.getStyle()); in test_strokerec()
799 REPORTER_ASSERT(reporter, SkStrokeRec::kStrokeAndFill_Style == rec.getStyle()); in test_strokerec()
802 REPORTER_ASSERT(reporter, SkStrokeRec::kHairline_Style == rec.getStyle()); in test_strokerec()
805 REPORTER_ASSERT(reporter, SkStrokeRec::kFill_Style == rec.getStyle()); in test_strokerec()
821 REPORTER_ASSERT(reporter, dir == expected); in check_direction()
823 REPORTER_ASSERT(reporter, SkPath::kUnknown_Direction == expected); in check_direction()
830 REPORTER_ASSERT(reporter, !path.cheapComputeDirection(NULL)); in test_direction()
831 REPORTER_ASSERT(reporter, !path.cheapIsDirection(SkPath::kCW_Direction)); in test_direction()
832 REPORTER_ASSERT(reporter, !path.cheapIsDirection(SkPath::kCCW_Direction)); in test_direction()
833 REPORTER_ASSERT(reporter, path.cheapIsDirection(SkPath::kUnknown_Direction)); in test_direction()
846 REPORTER_ASSERT(reporter, valid); in test_direction()
847 REPORTER_ASSERT(reporter, !path.cheapComputeDirection(NULL)); in test_direction()
862 REPORTER_ASSERT(reporter, valid); in test_direction()
878 REPORTER_ASSERT(reporter, valid); in test_direction()
911 REPORTER_ASSERT(reporter, SkPath::kConvex_Convexity == path.getConvexity()); in test_direction()
937 REPORTER_ASSERT(reporter, path0.getBounds() == path1.getBounds()); in test_bounds()
992 REPORTER_ASSERT(reporter, mv == pts[0]); in check_close()
1001 REPORTER_ASSERT(reporter, !i || nMT == nCL); in check_close()
1076 REPORTER_ASSERT(reporter, c == expected); in check_convexity()
1247 REPORTER_ASSERT(reporter, p.isConvex()); in check_convex_bounds()
1248 REPORTER_ASSERT(reporter, p.getBounds() == bounds); in check_convex_bounds()
1251 REPORTER_ASSERT(reporter, p2.isConvex()); in check_convex_bounds()
1252 REPORTER_ASSERT(reporter, p2.getBounds() == bounds); in check_convex_bounds()
1256 REPORTER_ASSERT(reporter, other.isConvex()); in check_convex_bounds()
1257 REPORTER_ASSERT(reporter, other.getBounds() == bounds); in check_convex_bounds()
1291 REPORTER_ASSERT(reporter, path.cheapIsDirection(SkPath::kCCW_Direction)); in test_convexity()
1296 REPORTER_ASSERT(reporter, path.cheapIsDirection(SkPath::kCW_Direction)); in test_convexity()
1323 REPORTER_ASSERT(reporter, (gRec[i].fExpectedDirection == SkPath::kUnknown_Direction) in test_convexity()
1325 REPORTER_ASSERT(reporter, !foundDir || gRec[i].fExpectedDirection == dir); in test_convexity()
1328 REPORTER_ASSERT(reporter, gRec[i].fExpectedConvexity == path.getConvexity()); in test_convexity()
1411 REPORTER_ASSERT(reporter, !path.isLine(NULL)); in test_isLine()
1416 REPORTER_ASSERT(reporter, !path.isLine(pts)); in test_isLine()
1418 REPORTER_ASSERT(reporter, pts[0].equals(value, value)); in test_isLine()
1419 REPORTER_ASSERT(reporter, pts[1].equals(value, value)); in test_isLine()
1423 REPORTER_ASSERT(reporter, value != moveX && value != moveY); in test_isLine()
1426 REPORTER_ASSERT(reporter, !path.isLine(NULL)); in test_isLine()
1427 REPORTER_ASSERT(reporter, !path.isLine(pts)); in test_isLine()
1429 REPORTER_ASSERT(reporter, pts[0].equals(value, value)); in test_isLine()
1430 REPORTER_ASSERT(reporter, pts[1].equals(value, value)); in test_isLine()
1434 REPORTER_ASSERT(reporter, value != lineX && value != lineY); in test_isLine()
1437 REPORTER_ASSERT(reporter, path.isLine(NULL)); in test_isLine()
1439 REPORTER_ASSERT(reporter, !pts[0].equals(moveX, moveY)); in test_isLine()
1440 REPORTER_ASSERT(reporter, !pts[1].equals(lineX, lineY)); in test_isLine()
1441 REPORTER_ASSERT(reporter, path.isLine(pts)); in test_isLine()
1442 REPORTER_ASSERT(reporter, pts[0].equals(moveX, moveY)); in test_isLine()
1443 REPORTER_ASSERT(reporter, pts[1].equals(lineX, lineY)); in test_isLine()
1446 REPORTER_ASSERT(reporter, !path.isLine(NULL)); in test_isLine()
1447 REPORTER_ASSERT(reporter, !path.isLine(pts)); in test_isLine()
1448 REPORTER_ASSERT(reporter, pts[0].equals(moveX, moveY)); in test_isLine()
1449 REPORTER_ASSERT(reporter, pts[1].equals(lineX, lineY)); in test_isLine()
1453 REPORTER_ASSERT(reporter, !path.isLine(NULL)); in test_isLine()
1559 REPORTER_ASSERT(reporter, kQueries[q].fInRect == in test_conservativelyContains()
1564 REPORTER_ASSERT(reporter, kQueries[q].fInCircle == in test_conservativelyContains()
1569 REPORTER_ASSERT(reporter, kQueries[q].fInRR == in test_conservativelyContains()
1581 REPORTER_ASSERT(reporter, kQueries[q].fInCubicRR == in test_conservativelyContains()
1593 REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(qRect)); in test_conservativelyContains()
1604 REPORTER_ASSERT(reporter, path.conservativelyContainsRect(SkRect::MakeXYWH(SkIntToScalar(50), 0, in test_conservativelyContains()
1608 REPORTER_ASSERT(reporter, !path.conservativelyContainsRect( in test_conservativelyContains()
1614 REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(SkRect::MakeXYWH(SkIntToScalar(-10), in test_conservativelyContains()
1620 REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(SkRect::MakeXYWH(SkIntToScalar(10), in test_conservativelyContains()
1632 REPORTER_ASSERT(reporter, path.conservativelyContainsRect(SkRect::MakeXYWH(SkIntToScalar(50), 0, in test_conservativelyContains()
1644 REPORTER_ASSERT(reporter, path.conservativelyContainsRect(SkRect::MakeXYWH(SkIntToScalar(50), 0, in test_conservativelyContains()
1658 REPORTER_ASSERT(reporter, !path.conservativelyContainsRect( in test_conservativelyContains()
1665 REPORTER_ASSERT(reporter, !path.conservativelyContainsRect(SkRect::MakeXYWH(0, 0, 1, 1))); in test_conservativelyContains()
1675 REPORTER_ASSERT(reporter, path.isRect(NULL, &isClosed, NULL)); in test_isRect_open_close()
1676 REPORTER_ASSERT(reporter, isClosed); in test_isRect_open_close()
1779 REPORTER_ASSERT(reporter, tests[testIndex].fIsRect == path.isRect(NULL)); in test_isRect()
1786 REPORTER_ASSERT(reporter, path.cheapComputeDirection(&cheapDirection)); in test_isRect()
1787 REPORTER_ASSERT(reporter, path.isRect(&computed, &isClosed, &direction)); in test_isRect()
1788 REPORTER_ASSERT(reporter, expected == computed); in test_isRect()
1789 REPORTER_ASSERT(reporter, isClosed == tests[testIndex].fClose); in test_isRect()
1790 REPORTER_ASSERT(reporter, direction == cheapDirection); in test_isRect()
1796 REPORTER_ASSERT(reporter, !path.isRect(&computed, &isClosed, &direction)); in test_isRect()
1797 REPORTER_ASSERT(reporter, computed.fLeft == 123 && computed.fTop == 456); in test_isRect()
1798 REPORTER_ASSERT(reporter, computed.fRight == 789 && computed.fBottom == 1011); in test_isRect()
1799 REPORTER_ASSERT(reporter, isClosed == (bool) -1); in test_isRect()
1800 REPORTER_ASSERT(reporter, direction == (SkPath::Direction) -1); in test_isRect()
1812 REPORTER_ASSERT(reporter, !path1.isRect(NULL)); in test_isRect()
1824 REPORTER_ASSERT(reporter, !path1.isRect(NULL)); in test_isRect()
1833 REPORTER_ASSERT(reporter, !path1.isRect(NULL)); in test_isRect()
1845 REPORTER_ASSERT(reporter, !path1.isRect(NULL)); in test_isRect()
1857 REPORTER_ASSERT(reporter, !path1.isRect(NULL)); in test_isRect()
1944 REPORTER_ASSERT(reporter, in test_isNestedFillRects()
1959 REPORTER_ASSERT(reporter, path.isNestedFillRects(computed, computedDirs)); in test_isNestedFillRects()
1960 REPORTER_ASSERT(reporter, expected[0] == computed[0]); in test_isNestedFillRects()
1961 REPORTER_ASSERT(reporter, expected[1] == computed[1]); in test_isNestedFillRects()
1962 REPORTER_ASSERT(reporter, expectedDirs[0] == computedDirs[0]); in test_isNestedFillRects()
1963 REPORTER_ASSERT(reporter, expectedDirs[1] == computedDirs[1]); in test_isNestedFillRects()
1981 REPORTER_ASSERT(reporter, !path1.isNestedFillRects(NULL)); in test_isNestedFillRects()
1999 REPORTER_ASSERT(reporter, !path1.isNestedFillRects(NULL)); in test_isNestedFillRects()
2014 REPORTER_ASSERT(reporter, !path1.isNestedFillRects(NULL)); in test_isNestedFillRects()
2032 REPORTER_ASSERT(reporter, !path1.isNestedFillRects(NULL)); in test_isNestedFillRects()
2050 REPORTER_ASSERT(reporter, !path1.isNestedFillRects(NULL)); in test_isNestedFillRects()
2056 REPORTER_ASSERT(reporter, !path1.isNestedFillRects(NULL)); in test_isNestedFillRects()
2071 REPORTER_ASSERT(reporter, path.isNestedFillRects(NULL)); in test_isNestedFillRects()
2080 REPORTER_ASSERT(reporter, dst.isNestedFillRects(NULL)); in test_isNestedFillRects()
2093 REPORTER_ASSERT(reporter, readBack != p); in write_and_read_back()
2095 REPORTER_ASSERT(reporter, readBack == p); in write_and_read_back()
2097 REPORTER_ASSERT(reporter, readBack.getConvexityOrUnknown() == in write_and_read_back()
2100 REPORTER_ASSERT(reporter, readBack.isOval(NULL) == p.isOval(NULL)); in write_and_read_back()
2105 REPORTER_ASSERT(reporter, origBounds == readBackBounds); in write_and_read_back()
2129 REPORTER_ASSERT(reporter, size1 == size2); in test_flattening()
2133 REPORTER_ASSERT(reporter, size1 == size3); in test_flattening()
2134 REPORTER_ASSERT(reporter, p == p2); in test_flattening()
2137 REPORTER_ASSERT(reporter, !size3); in test_flattening()
2141 REPORTER_ASSERT(reporter, tooShort.isEmpty()); in test_flattening()
2145 REPORTER_ASSERT(reporter, size1 == size3); in test_flattening()
2146 REPORTER_ASSERT(reporter, memcmp(buffer, buffer2, size1) == 0); in test_flattening()
2187 REPORTER_ASSERT(reporter, p == p1); in test_transform()
2200 REPORTER_ASSERT(reporter, kPtCount == count); in test_transform()
2203 REPORTER_ASSERT(reporter, newPt == pts1[i]); in test_transform()
2216 REPORTER_ASSERT(reporter, matrix.invert(&matrix)); in test_transform()
2220 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(pBounds.fLeft, p1Bounds.fLeft)); in test_transform()
2221 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(pBounds.fTop, p1Bounds.fTop)); in test_transform()
2222 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(pBounds.fRight, p1Bounds.fRight)); in test_transform()
2223 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(pBounds.fBottom, p1Bounds.fBottom)); in test_transform()
2236 REPORTER_ASSERT(reporter, p1.cheapIsDirection(SkPath::kCW_Direction)); in test_transform()
2248 REPORTER_ASSERT(reporter, p1.cheapIsDirection(SkPath::kCCW_Direction)); in test_transform()
2258 REPORTER_ASSERT(reporter, p1.cheapIsDirection(SkPath::kUnknown_Direction)); in test_transform()
2322 REPORTER_ASSERT(reporter, valid); in test_zero_length_paths()
2323 REPORTER_ASSERT(reporter, !p.isEmpty()); in test_zero_length_paths()
2324 REPORTER_ASSERT(reporter, gZeroLengthTests[i].numResultPts == (size_t)p.countPoints()); in test_zero_length_paths()
2325 REPORTER_ASSERT(reporter, gZeroLengthTests[i].resultBound == p.getBounds()); in test_zero_length_paths()
2326REPORTER_ASSERT(reporter, gZeroLengthTests[i].numResultVerbs == (size_t)p.getVerbs(verbs, SK_ARRAY… in test_zero_length_paths()
2328 REPORTER_ASSERT(reporter, gZeroLengthTests[i].resultVerbs[j] == verbs[j]); in test_zero_length_paths()
2345 REPORTER_ASSERT(reporter, SkPath::kQuad_SegmentMask == p.getSegmentMasks()); in test_segment_masks()
2346 REPORTER_ASSERT(reporter, !p.isEmpty()); in test_segment_masks()
2348 REPORTER_ASSERT(reporter, p2.getSegmentMasks() == p.getSegmentMasks()); in test_segment_masks()
2350 REPORTER_ASSERT(reporter, kCurveSegmentMask == p.getSegmentMasks()); in test_segment_masks()
2351 REPORTER_ASSERT(reporter, !p.isEmpty()); in test_segment_masks()
2353 REPORTER_ASSERT(reporter, p2.getSegmentMasks() == p.getSegmentMasks()); in test_segment_masks()
2358 REPORTER_ASSERT(reporter, SkPath::kCubic_SegmentMask == p.getSegmentMasks()); in test_segment_masks()
2360 REPORTER_ASSERT(reporter, p2.getSegmentMasks() == p.getSegmentMasks()); in test_segment_masks()
2362 REPORTER_ASSERT(reporter, !p.isEmpty()); in test_segment_masks()
2371 REPORTER_ASSERT(reporter, noPathIter.next(pts) == SkPath::kDone_Verb); in test_iter()
2375 REPORTER_ASSERT(reporter, noPathIter.next(pts) == SkPath::kDone_Verb); in test_iter()
2379 REPORTER_ASSERT(reporter, noPathIter.next(pts) == SkPath::kDone_Verb); in test_iter()
2383 REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb); in test_iter()
2387 REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb); in test_iter()
2451 REPORTER_ASSERT(reporter, valid); in test_iter()
2455REPORTER_ASSERT(reporter, iter.next(pts, gIterTests[i].consumeDegenerates) == gIterTests[i].result… in test_iter()
2457 REPORTER_ASSERT(reporter, pts[k] == gIterTests[i].resultPts[l++]); in test_iter()
2460 REPORTER_ASSERT(reporter, j == (int)gIterTests[i].numResultVerbs); in test_iter()
2465 REPORTER_ASSERT(reporter, !iter.isClosedContour()); in test_iter()
2469 REPORTER_ASSERT(reporter, iter.isClosedContour()); in test_iter()
2472 REPORTER_ASSERT(reporter, !iter.isClosedContour()); in test_iter()
2475 REPORTER_ASSERT(reporter, iter.isClosedContour()); in test_iter()
2479 REPORTER_ASSERT(reporter, !iter.isClosedContour()); in test_iter()
2490 REPORTER_ASSERT(reporter, SkPath::kClose_Verb == iter.next(pts, false)); in test_iter()
2497 REPORTER_ASSERT(reporter, SkPath::kQuad_Verb == iter.next(pts, false)); in test_iter()
2500 REPORTER_ASSERT(reporter, SkPath::kDone_Verb == iter.next(pts, true)); in test_iter()
2506 REPORTER_ASSERT(reporter, SkPath::kConic_Verb == iter.next(pts, false)); in test_iter()
2509 REPORTER_ASSERT(reporter, SkPath::kDone_Verb == iter.next(pts, true)); in test_iter()
2515 REPORTER_ASSERT(reporter, SkPath::kCubic_Verb == iter.next(pts, false)); in test_iter()
2518 REPORTER_ASSERT(reporter, SkPath::kDone_Verb == iter.next(pts, true)); in test_iter()
2523 REPORTER_ASSERT(reporter, SkPath::kCubic_Verb == iter.next(pts, false)); in test_iter()
2526 REPORTER_ASSERT(reporter, SkPath::kDone_Verb == iter.next(pts, true)); in test_iter()
2538 REPORTER_ASSERT(reporter, SkPath::kMove_Verb == iter.next(pts)); in test_iter()
2539 REPORTER_ASSERT(reporter, SkPath::kLine_Verb == iter.next(pts)); in test_iter()
2540 REPORTER_ASSERT(reporter, SkPath::kLine_Verb == iter.next(pts)); in test_iter()
2541 REPORTER_ASSERT(reporter, SkPath::kConic_Verb == iter.next(pts)); in test_iter()
2542 REPORTER_ASSERT(reporter, SK_ScalarRoot2Over2 == iter.conicWeight()); in test_iter()
2551 REPORTER_ASSERT(reporter, noPathIter.next(pts) == SkPath::kDone_Verb); in test_raw_iter()
2554 REPORTER_ASSERT(reporter, noPathIter.next(pts) == SkPath::kDone_Verb); in test_raw_iter()
2558 REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb); in test_raw_iter()
2563 REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb); in test_raw_iter()
2564 REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1); in test_raw_iter()
2565 REPORTER_ASSERT(reporter, pts[0].fY == 0); in test_raw_iter()
2566 REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb); in test_raw_iter()
2572 REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb); in test_raw_iter()
2573 REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1); in test_raw_iter()
2574 REPORTER_ASSERT(reporter, pts[0].fY == 0); in test_raw_iter()
2575 REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb); in test_raw_iter()
2576 REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1*2); in test_raw_iter()
2577 REPORTER_ASSERT(reporter, pts[0].fY == SK_Scalar1); in test_raw_iter()
2578 REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb); in test_raw_iter()
2579 REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1*3); in test_raw_iter()
2580 REPORTER_ASSERT(reporter, pts[0].fY == SK_Scalar1*2); in test_raw_iter()
2581 REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb); in test_raw_iter()
2587 REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb); in test_raw_iter()
2601 REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb); in test_raw_iter()
2602 REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1); in test_raw_iter()
2603 REPORTER_ASSERT(reporter, pts[0].fY == 0); in test_raw_iter()
2604 REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kClose_Verb); in test_raw_iter()
2605 REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1); in test_raw_iter()
2606 REPORTER_ASSERT(reporter, pts[0].fY == 0); in test_raw_iter()
2607 REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb); in test_raw_iter()
2608 REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1*2); in test_raw_iter()
2609 REPORTER_ASSERT(reporter, pts[0].fY == SK_Scalar1); in test_raw_iter()
2610 REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kClose_Verb); in test_raw_iter()
2611 REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1*2); in test_raw_iter()
2612 REPORTER_ASSERT(reporter, pts[0].fY == SK_Scalar1); in test_raw_iter()
2613 REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb); in test_raw_iter()
2614 REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1*3); in test_raw_iter()
2615 REPORTER_ASSERT(reporter, pts[0].fY == SK_Scalar1*2); in test_raw_iter()
2616 REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kMove_Verb); in test_raw_iter()
2617 REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1*4); in test_raw_iter()
2618 REPORTER_ASSERT(reporter, pts[0].fY == SK_Scalar1*3); in test_raw_iter()
2619 REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kClose_Verb); in test_raw_iter()
2620 REPORTER_ASSERT(reporter, pts[0].fX == SK_Scalar1*4); in test_raw_iter()
2621 REPORTER_ASSERT(reporter, pts[0].fY == SK_Scalar1*3); in test_raw_iter()
2622 REPORTER_ASSERT(reporter, iter.next(pts) == SkPath::kDone_Verb); in test_raw_iter()
2729 REPORTER_ASSERT(reporter, nextVerb == expectedVerbs[numIterVerbs]); in test_raw_iter()
2733 REPORTER_ASSERT(reporter, numIterPts < numPoints); in test_raw_iter()
2734 REPORTER_ASSERT(reporter, pts[0] == expectedPts[numIterPts]); in test_raw_iter()
2739 REPORTER_ASSERT(reporter, numIterPts < numPoints + 1); in test_raw_iter()
2740 REPORTER_ASSERT(reporter, pts[0] == lastPt); in test_raw_iter()
2741 REPORTER_ASSERT(reporter, pts[1] == expectedPts[numIterPts]); in test_raw_iter()
2747 REPORTER_ASSERT(reporter, numIterPts < numPoints + 2); in test_raw_iter()
2748 REPORTER_ASSERT(reporter, pts[0] == lastPt); in test_raw_iter()
2749 REPORTER_ASSERT(reporter, pts[1] == expectedPts[numIterPts]); in test_raw_iter()
2750 REPORTER_ASSERT(reporter, pts[2] == expectedPts[numIterPts + 1]); in test_raw_iter()
2755 REPORTER_ASSERT(reporter, numIterPts < numPoints + 3); in test_raw_iter()
2756 REPORTER_ASSERT(reporter, pts[0] == lastPt); in test_raw_iter()
2757 REPORTER_ASSERT(reporter, pts[1] == expectedPts[numIterPts]); in test_raw_iter()
2758 REPORTER_ASSERT(reporter, pts[2] == expectedPts[numIterPts + 1]); in test_raw_iter()
2759 REPORTER_ASSERT(reporter, pts[3] == expectedPts[numIterPts + 2]); in test_raw_iter()
2764 REPORTER_ASSERT(reporter, pts[0] == lastMoveTo); in test_raw_iter()
2771 REPORTER_ASSERT(reporter, numIterPts == numPoints); in test_raw_iter()
2772 REPORTER_ASSERT(reporter, numIterVerbs == numVerbs); in test_raw_iter()
2781 REPORTER_ASSERT(reporter, path.isOval(&rect) == expectedCircle); in check_for_circle()
2782 REPORTER_ASSERT(reporter, path.cheapIsDirection(expectedDir)); in check_for_circle()
2785 REPORTER_ASSERT(reporter, rect.height() == rect.width()); in check_for_circle()
2801 REPORTER_ASSERT(reporter, SkPath::kCW_Direction == dir); in test_circle_skew()
2859 REPORTER_ASSERT(reporter, SkPath::kCCW_Direction == dir); in test_circle_mirror_x()
2878 REPORTER_ASSERT(reporter, SkPath::kCCW_Direction == dir); in test_circle_mirror_y()
2984 REPORTER_ASSERT(reporter, path.isEmpty()); in test_circle()
2995 REPORTER_ASSERT(reporter, path.isOval(NULL)); in test_oval()
3001 REPORTER_ASSERT(reporter, tmp.isOval(NULL)); in test_oval()
3008 REPORTER_ASSERT(reporter, !tmp.isOval(NULL)); in test_oval()
3015 REPORTER_ASSERT(reporter, !tmp.isOval(NULL)); in test_oval()
3019 REPORTER_ASSERT(reporter, !tmp.isOval(NULL)); in test_oval()
3025 REPORTER_ASSERT(reporter, !tmp.isOval(NULL)); in test_oval()
3032 REPORTER_ASSERT(reporter, path.isOval(NULL)); in test_oval()
3039 REPORTER_ASSERT(reporter, path.isOval(NULL)); in test_oval()
3045 REPORTER_ASSERT(reporter, p.isEmpty()); in test_empty()
3046 REPORTER_ASSERT(reporter, 0 == p.countPoints()); in test_empty()
3047 REPORTER_ASSERT(reporter, 0 == p.countVerbs()); in test_empty()
3048 REPORTER_ASSERT(reporter, 0 == p.getSegmentMasks()); in test_empty()
3049 REPORTER_ASSERT(reporter, p.isConvex()); in test_empty()
3050 REPORTER_ASSERT(reporter, p.getFillType() == SkPath::kWinding_FillType); in test_empty()
3051 REPORTER_ASSERT(reporter, !p.isInverseFillType()); in test_empty()
3052 REPORTER_ASSERT(reporter, p == empty); in test_empty()
3053 REPORTER_ASSERT(reporter, !(p != empty)); in test_empty()
3058 REPORTER_ASSERT(reporter, path->isConvex()); in test_rrect_is_convex()
3059 REPORTER_ASSERT(reporter, path->cheapIsDirection(dir)); in test_rrect_is_convex()
3061 REPORTER_ASSERT(reporter, path->isConvex()); in test_rrect_is_convex()
3067 REPORTER_ASSERT(reporter, path->isConvex()); in test_rrect_convexity_is_unknown()
3068 REPORTER_ASSERT(reporter, path->cheapIsDirection(dir)); in test_rrect_convexity_is_unknown()
3070 REPORTER_ASSERT(reporter, path->getConvexity() == SkPath::kUnknown_Convexity); in test_rrect_convexity_is_unknown()
3102 REPORTER_ASSERT(reporter, p.isRect(&returnedRect)); in test_rrect()
3103 REPORTER_ASSERT(reporter, returnedRect == r); in test_rrect()
3110 REPORTER_ASSERT(reporter, p.isRect(NULL, &closed, &dir)); in test_rrect()
3111 REPORTER_ASSERT(reporter, closed); in test_rrect()
3112 REPORTER_ASSERT(reporter, SkPath::kCW_Direction == dir); in test_rrect()
3116 REPORTER_ASSERT(reporter, !p.isConvex()); in test_rrect()
3120 REPORTER_ASSERT(reporter, !p.isConvex()); in test_rrect()
3125 REPORTER_ASSERT(reporter, p.isEmpty()); in test_rrect()
3134 REPORTER_ASSERT(reporter, rr.isEmpty()); in test_rrect()
3144 REPORTER_ASSERT(reporter, emptyOval.isEmpty()); in test_arc()
3146 REPORTER_ASSERT(reporter, p.isEmpty()); in test_arc()
3150 REPORTER_ASSERT(reporter, p.isEmpty()); in test_arc()
3155 REPORTER_ASSERT(reporter, p == cwOval); in test_arc()
3160 REPORTER_ASSERT(reporter, p == ccwOval); in test_arc()
3163 REPORTER_ASSERT(reporter, p.isConvex()); in test_arc()
3164 REPORTER_ASSERT(reporter, p.cheapIsDirection(SkPath::kCW_Direction)); in test_arc()
3166 REPORTER_ASSERT(reporter, p.isConvex()); in test_arc()
3173 REPORTER_ASSERT(reporter, v == SkPath::kMove_Verb); in check_move()
3174 REPORTER_ASSERT(reporter, pts[0].fX == x0); in check_move()
3175 REPORTER_ASSERT(reporter, pts[0].fY == y0); in check_move()
3182 REPORTER_ASSERT(reporter, v == SkPath::kLine_Verb); in check_line()
3183 REPORTER_ASSERT(reporter, pts[1].fX == x1); in check_line()
3184 REPORTER_ASSERT(reporter, pts[1].fY == y1); in check_line()
3191 REPORTER_ASSERT(reporter, v == SkPath::kQuad_Verb); in check_quad()
3192 REPORTER_ASSERT(reporter, pts[1].fX == x1); in check_quad()
3193 REPORTER_ASSERT(reporter, pts[1].fY == y1); in check_quad()
3194 REPORTER_ASSERT(reporter, pts[2].fX == x2); in check_quad()
3195 REPORTER_ASSERT(reporter, pts[2].fY == y2); in check_quad()
3201 REPORTER_ASSERT(reporter, v == SkPath::kDone_Verb); in check_done()
3268 REPORTER_ASSERT(reporter, p.getLastPt(&pt) && pt.fX == 1 && pt.fY == 1); in test_arcTo()
3271 REPORTER_ASSERT(reporter, p.getLastPt(&pt) && pt.fX == 1 && pt.fY == -1); in test_arcTo()
3285 REPORTER_ASSERT(reporter, nearly_equal(p.getBounds(), oval)); in test_arcTo()
3291 REPORTER_ASSERT(reporter, nearly_equal(p.getBounds(), oval)); in test_arcTo()
3298 REPORTER_ASSERT(reporter, p.isEmpty()); in test_arcTo()
3303 REPORTER_ASSERT(reporter, p.isEmpty()); in test_arcTo()
3317 REPORTER_ASSERT(reporter, p.getBounds() == expected); in test_addPath()
3321 REPORTER_ASSERT(reporter, p.getBounds() == reverseExpected); in test_addPath()
3337 REPORTER_ASSERT(reporter, verbcount == 4); in test_addPathMode()
3338 REPORTER_ASSERT(reporter, verbs[0] == SkPath::kMove_Verb); in test_addPathMode()
3339 REPORTER_ASSERT(reporter, verbs[1] == SkPath::kLine_Verb); in test_addPathMode()
3340 REPORTER_ASSERT(reporter, verbs[2] == (extend ? SkPath::kLine_Verb : SkPath::kMove_Verb)); in test_addPathMode()
3341 REPORTER_ASSERT(reporter, verbs[3] == SkPath::kLine_Verb); in test_addPathMode()
3355 REPORTER_ASSERT(reporter, verbcount == 7); in test_extendClosedPath()
3356 REPORTER_ASSERT(reporter, verbs[0] == SkPath::kMove_Verb); in test_extendClosedPath()
3357 REPORTER_ASSERT(reporter, verbs[1] == SkPath::kLine_Verb); in test_extendClosedPath()
3358 REPORTER_ASSERT(reporter, verbs[2] == SkPath::kLine_Verb); in test_extendClosedPath()
3359 REPORTER_ASSERT(reporter, verbs[3] == SkPath::kClose_Verb); in test_extendClosedPath()
3360 REPORTER_ASSERT(reporter, verbs[4] == SkPath::kMove_Verb); in test_extendClosedPath()
3361 REPORTER_ASSERT(reporter, verbs[5] == SkPath::kLine_Verb); in test_extendClosedPath()
3362 REPORTER_ASSERT(reporter, verbs[6] == SkPath::kLine_Verb); in test_extendClosedPath()
3365 REPORTER_ASSERT(reporter, p.getLastPt(&pt)); in test_extendClosedPath()
3366 REPORTER_ASSERT(reporter, pt == SkPoint::Make(2, 3)); in test_extendClosedPath()
3367 REPORTER_ASSERT(reporter, p.getPoint(3) == SkPoint::Make(1, 1)); in test_extendClosedPath()
3376 REPORTER_ASSERT(reporter, q == p); in test_addEmptyPath()
3379 REPORTER_ASSERT(reporter, q == p); in test_addEmptyPath()
3383 REPORTER_ASSERT(reporter, q.isEmpty()); in test_addEmptyPath()
3399 REPORTER_ASSERT(reporter, pt == SkPoint::Make(0, 0)); in test_get_point()
3400 REPORTER_ASSERT(reporter, !p.getLastPt(NULL)); in test_get_point()
3401 REPORTER_ASSERT(reporter, !p.getLastPt(&pt) && pt == SkPoint::Make(0, 0)); in test_get_point()
3404 REPORTER_ASSERT(reporter, pt == SkPoint::Make(10, 10)); in test_get_point()
3405 REPORTER_ASSERT(reporter, p.getLastPt(NULL)); in test_get_point()
3407 REPORTER_ASSERT(reporter, p.getLastPt(&pt) && pt == SkPoint::Make(20, 20)); in test_get_point()
3413 REPORTER_ASSERT(reporter, p.contains(0, 0)); in test_contains()
3415 REPORTER_ASSERT(reporter, !p.contains(0, 0)); in test_contains()
3420 REPORTER_ASSERT(reporter, !p.contains(4, 0)); in test_contains()
3421 REPORTER_ASSERT(reporter, !p.contains(0, 4)); in test_contains()
3422 REPORTER_ASSERT(reporter, !p.contains(4, 10)); in test_contains()
3423 REPORTER_ASSERT(reporter, !p.contains(10, 4)); in test_contains()
3425 REPORTER_ASSERT(reporter, !p.contains(5, 7)); in test_contains()
3426 REPORTER_ASSERT(reporter, p.contains(6, 7)); in test_contains()
3427 REPORTER_ASSERT(reporter, !p.contains(7, 7)); in test_contains()
3433 REPORTER_ASSERT(reporter, !p.contains(7, 5)); in test_contains()
3434 REPORTER_ASSERT(reporter, p.contains(7, 6)); in test_contains()
3435 REPORTER_ASSERT(reporter, !p.contains(7, 7)); in test_contains()
3442 REPORTER_ASSERT(reporter, p.contains(5, 6)); in test_contains()
3443 REPORTER_ASSERT(reporter, !p.contains(6, 5)); in test_contains()
3450 REPORTER_ASSERT(reporter, p.contains(5, 6)); in test_contains()
3451 REPORTER_ASSERT(reporter, !p.contains(6, 5)); in test_contains()
3460 REPORTER_ASSERT(reporter, p.contains(5, 6)); in test_contains()
3461 REPORTER_ASSERT(reporter, !p.contains(6, 5)); in test_contains()
3473 REPORTER_ASSERT(reporter, p.contains(5.5f, 5.5f)); in test_contains()
3474 REPORTER_ASSERT(reporter, !p.contains(4.5f, 5.5f)); in test_contains()
3489 REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs()); in TestPathRef()
3490 REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countPoints()); in TestPathRef()
3491 REPORTER_ASSERT(reporter, 0 == pathRef->getSegmentMasks()); in TestPathRef()
3493 REPORTER_ASSERT(reporter, SkPath::kMove_Verb == pathRef->atVerb(i)); in TestPathRef()
3500 REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs()); in TestPathRef()
3501 REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countPoints()); in TestPathRef()
3502 REPORTER_ASSERT(reporter, SkPath::kLine_SegmentMask == pathRef->getSegmentMasks()); in TestPathRef()
3504 REPORTER_ASSERT(reporter, SkPath::kLine_Verb == pathRef->atVerb(i)); in TestPathRef()
3511 REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs()); in TestPathRef()
3512 REPORTER_ASSERT(reporter, 2*kRepeatCnt == pathRef->countPoints()); in TestPathRef()
3513 REPORTER_ASSERT(reporter, SkPath::kQuad_SegmentMask == pathRef->getSegmentMasks()); in TestPathRef()
3515 REPORTER_ASSERT(reporter, SkPath::kQuad_Verb == pathRef->atVerb(i)); in TestPathRef()
3523 REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs()); in TestPathRef()
3524 REPORTER_ASSERT(reporter, 2*kRepeatCnt == pathRef->countPoints()); in TestPathRef()
3525 REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countWeights()); in TestPathRef()
3526 REPORTER_ASSERT(reporter, SkPath::kConic_SegmentMask == pathRef->getSegmentMasks()); in TestPathRef()
3527 REPORTER_ASSERT(reporter, weights); in TestPathRef()
3529 REPORTER_ASSERT(reporter, SkPath::kConic_Verb == pathRef->atVerb(i)); in TestPathRef()
3536 REPORTER_ASSERT(reporter, kRepeatCnt == pathRef->countVerbs()); in TestPathRef()
3537 REPORTER_ASSERT(reporter, 3*kRepeatCnt == pathRef->countPoints()); in TestPathRef()
3538 REPORTER_ASSERT(reporter, SkPath::kCubic_SegmentMask == pathRef->getSegmentMasks()); in TestPathRef()
3540 REPORTER_ASSERT(reporter, SkPath::kCubic_Verb == pathRef->atVerb(i)); in TestPathRef()
3550 REPORTER_ASSERT(reporter, a == a); in test_operatorEqual()
3551 REPORTER_ASSERT(reporter, a == b); in test_operatorEqual()
3553 REPORTER_ASSERT(reporter, a != b); in test_operatorEqual()
3555 REPORTER_ASSERT(reporter, a == b); in test_operatorEqual()
3557 REPORTER_ASSERT(reporter, a != b); in test_operatorEqual()
3559 REPORTER_ASSERT(reporter, a == b); in test_operatorEqual()
3562 REPORTER_ASSERT(reporter, a != b); in test_operatorEqual()
3565 REPORTER_ASSERT(reporter, a == b); in test_operatorEqual()
3573 REPORTER_ASSERT(reporter, data->size() == strlen(str)); in compare_dump()
3575 REPORTER_ASSERT(reporter, !memcmp(data->data(), str, strlen(str))); in compare_dump()
3577 REPORTER_ASSERT(reporter, data->data() == NULL || !memcmp(data->data(), str, strlen(str))); in compare_dump()
3638 REPORTER_ASSERT(reporter, p.getBounds() == reverseExpected); in TestPathTo()
3651 REPORTER_ASSERT(reporter, p.getBounds().isEmpty()); in DEF_TEST()
3665 REPORTER_ASSERT(reporter, in DEF_TEST()
3667 REPORTER_ASSERT(reporter, !p.isEmpty()); in DEF_TEST()
3674 REPORTER_ASSERT(reporter, !p.isEmpty()); in DEF_TEST()
3682 REPORTER_ASSERT(reporter, SkPath::kLine_SegmentMask == p.getSegmentMasks()); in DEF_TEST()
3683 REPORTER_ASSERT(reporter, !p.isEmpty()); in DEF_TEST()
3685 REPORTER_ASSERT(reporter, p != empty); in DEF_TEST()
3686 REPORTER_ASSERT(reporter, !(p == empty)); in DEF_TEST()
3689 REPORTER_ASSERT(reporter, p.getPoints(NULL, 0) == 4); in DEF_TEST()
3690 REPORTER_ASSERT(reporter, p.getVerbs(NULL, 0) == 5); in DEF_TEST()
3693 REPORTER_ASSERT(reporter, count == 4); in DEF_TEST()
3697 REPORTER_ASSERT(reporter, SkPath::kMove_Verb == verbs[0]); in DEF_TEST()
3698 REPORTER_ASSERT(reporter, SkPath::kLine_Verb == verbs[1]); in DEF_TEST()
3699 REPORTER_ASSERT(reporter, SkPath::kLine_Verb == verbs[2]); in DEF_TEST()
3700 REPORTER_ASSERT(reporter, SkPath::kLine_Verb == verbs[3]); in DEF_TEST()
3701 REPORTER_ASSERT(reporter, SkPath::kClose_Verb == verbs[4]); in DEF_TEST()
3702 REPORTER_ASSERT(reporter, 0xff == verbs[5]); in DEF_TEST()
3704 REPORTER_ASSERT(reporter, bounds == bounds2); in DEF_TEST()
3708 REPORTER_ASSERT(reporter, bounds == p.getBounds()); in DEF_TEST()
3710 REPORTER_ASSERT(reporter, p.isRect(NULL)); in DEF_TEST()
3712 REPORTER_ASSERT(reporter, p.isRect(&bounds2)); in DEF_TEST()
3713 REPORTER_ASSERT(reporter, bounds == bounds2); in DEF_TEST()
3718 REPORTER_ASSERT(reporter, !p.isRect(NULL)); in DEF_TEST()
3726 REPORTER_ASSERT(reporter, p.isRect(&r)); in DEF_TEST()
3727 REPORTER_ASSERT(reporter, r == bounds); in DEF_TEST()
3730 REPORTER_ASSERT(reporter, p.isRect(&r)); in DEF_TEST()
3731 REPORTER_ASSERT(reporter, r == bounds); in DEF_TEST()