Home | History | Annotate | Download | only in tests

Lines Matching refs:Reporter

41 static double testArc(skiatest::Reporter* reporter, const SkDQuad& quad, const SkDQuad& arcRef,
69 REPORTER_ASSERT(reporter, smallest >= 0);
70 REPORTER_ASSERT(reporter, t >= 0 && t <= 1);
74 static void orderQuads(skiatest::Reporter* reporter, const SkDQuad& quad, double radius,
91 double t = testArc(reporter, quad, cQuad, octant);
106 static double quadAngle(skiatest::Reporter* reporter, const SkDQuad& quad, double t) {
109 REPORTER_ASSERT(reporter, angle >= 0 && angle <= 8);
129 static bool checkParallel(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2) {
143 REPORTER_ASSERT(reporter, s0dt0 != 0);
163 static int quadHullsOverlap(skiatest::Reporter* reporter, const SkDQuad& quad1,
206 REPORTER_ASSERT(reporter, s0xt0 != 0);
207 return checkParallel(reporter, quad1, quad2);
228 static bool orderTRange(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2,
231 orderQuads(reporter, quad1, r, &t1Array);
232 orderQuads(reporter,quad2, r, &t2Array);
240 double a1 = quadAngle(reporter,quad1, t1);
241 double a2 = quadAngle(reporter,quad2, t2);
285 static bool bruteMinT(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2,
300 bool stepUp = orderTRange(reporter, quad1, quad2, r, &tRange);
340 REPORTER_ASSERT(reporter, bestR < maxRadius);
348 bool success = orderTRange(reporter, quad1, quad2, r, &tRange);
394 static void bruteForce(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2,
400 bool result = bruteMinT(reporter, quad1, quad2, &lowerRange, &upperRange);
401 REPORTER_ASSERT(reporter, result);
403 REPORTER_ASSERT(reporter, angle > 3.998 || ccw == upperRange.ccw);
406 static bool bruteForceCheck(skiatest::Reporter* reporter, const SkDQuad& quad1,
409 bool result = bruteMinT(reporter, quad1, quad2, &lowerRange, &upperRange);
410 REPORTER_ASSERT(reporter, result);
421 static void testQuadAngles(skiatest::Reporter* reporter, const SkDQuad& quad1, const SkDQuad& quad2,
437 REPORTER_ASSERT(reporter, origin == quad2[0]);
445 reporter, quad1, quad2);
453 REPORTER_ASSERT(reporter, realMatchesOverlap);
455 overlap = quadHullsOverlap(reporter, quad1, quad2); // set a breakpoint and debug if assert fires
456 REPORTER_ASSERT(reporter, oldSchoolOverlap == (overlap < 0));
467 REPORTER_ASSERT(reporter, !ray1In2);
468 REPORTER_ASSERT(reporter, !ray2In1);
470 REPORTER_ASSERT(reporter, !ctrl1In2);
472 REPORTER_ASSERT(reporter, !ctrl2In1);
474 bruteForce(reporter, quad1, quad2, overlap > 0);
497 REPORTER_ASSERT(reporter, i.used() >= 1);
510 REPORTER_ASSERT(reporter, foundZero == true);
530 REPORTER_ASSERT(reporter, smallestTs[sIndex ^ 1] == 1);
549 firstInside = checkParallel(reporter, quad1, quad2);
557 bruteForce(reporter, quad1, quad2, firstInside);
560 DEF_TEST(PathOpsAngleOverlapHullsOne, reporter) {
572 testQuadAngles(reporter, quad0, quad1, 0, &allocator);
576 DEF_TEST(PathOpsAngleOverlapHulls, reporter) {
601 REPORTER_ASSERT(reporter, i.used() >= 1);
605 testQuadAngles(reporter, q1, q2, index, &allocator);
609 DEF_TEST(PathOpsAngleBruteT, reporter) {
634 REPORTER_ASSERT(reporter, i.used() >= 1);
639 bool result = bruteMinT(reporter, q1, q2, &lowerRange, &upperRange);
640 REPORTER_ASSERT(reporter, result);
654 DEF_TEST(PathOpsAngleBruteTOne, reporter) {
669 bruteMinT(reporter, quads[0], quads[1], &lowerRange, &upperRange);
670 bruteMinT(reporter, quads[2], quads[3], &lowerRange, &upperRange);
671 bruteMinT(reporter, quads[4], quads[5], &lowerRange, &upperRange);
757 static double mDistance(skiatest::Reporter* reporter, bool agrees, const SkDQuad& q1,
766 REPORTER_ASSERT(reporter, dir != 0);
776 REPORTER_ASSERT(reporter, div != 0);
801 static void midPointAgrees(skiatest::Reporter* reporter, const SkDQuad& q1, const SkDQuad& q2,
807 REPORTER_ASSERT(reporter, ccw ? m1.crossCheck(m2) < 0 : m1.crossCheck(m2) > 0);
810 DEF_TEST(PathOpsAngleExtreme, reporter) {
824 REPORTER_ASSERT(reporter, quad1[0] == quad2[0]);
827 REPORTER_ASSERT(reporter, i.used() == 1);
828 REPORTER_ASSERT(reporter, i.pt(0) == quad1[0]);
829 int overlap = quadHullsOverlap(reporter, quad1, quad2);
830 REPORTER_ASSERT(reporter, overlap >= 0);
835 REPORTER_ASSERT(reporter, s0xt0 != 0);
837 bool agrees = bruteForceCheck(reporter, quad1, quad2, ccw);
838 maxR = SkTMin(maxR, mDistance(reporter, agrees, quad1, quad2));
842 midPointAgrees(reporter, quad1, quad2, !ccw);
853 agrees = bruteForceCheck(reporter, q1, q2, ccw);
854 maxR = SkTMin(maxR, mDistance(reporter, agrees, q1, q2));
858 midPointAgrees(reporter, quad1, quad2, !ccw);
870 agrees = bruteForceCheck(reporter, q1, q2, ccw);
871 maxR = SkTMin(maxR, mDistance(reporter, agrees, q1, q2));
873 midPointAgrees(reporter, quad1, quad2, !ccw);