Lines Matching refs:Reporter
16 static void testChopCubic(skiatest::Reporter* reporter) {
33 REPORTER_ASSERT(reporter, count);
37 static void check_pairs(skiatest::Reporter* reporter, int index, SkScalar t, const char name[],
43 REPORTER_ASSERT(reporter, eq);
47 static void test_evalquadat(skiatest::Reporter* reporter) {
60 check_pairs(reporter, i, t, "quad-pos", r0.fX, r0.fY, r1.fX, r1.fY);
65 check_pairs(reporter, i, t, "quad-tan", v0.fX, v0.fY, v1.fX, v1.fY);
72 static void test_conic_eval_pos(skiatest::Reporter* reporter, const SkConic& conic, SkScalar t) {
76 check_pairs(reporter, 0, t, "conic-pos", p0.fX, p0.fY, p1.fX, p1.fY);
79 static void test_conic_eval_tan(skiatest::Reporter* reporter, const SkConic& conic, SkScalar t) {
83 check_pairs(reporter, 0, t, "conic-tan", v0.fX, v0.fY, v1.fX, v1.fY);
86 static void test_conic(skiatest::Reporter* reporter) {
100 test_conic_eval_pos(reporter, conic, t);
101 test_conic_eval_tan(reporter, conic, t);
108 static void test_quad_tangents(skiatest::Reporter* reporter) {
120 REPORTER_ASSERT(reporter, start.fX && start.fY);
121 REPORTER_ASSERT(reporter, mid.fX && mid.fY);
122 REPORTER_ASSERT(reporter, end.fX && end.fY);
123 REPORTER_ASSERT(reporter, SkScalarNearlyZero(start.cross(mid)));
124 REPORTER_ASSERT(reporter, SkScalarNearlyZero(mid.cross(end)));
128 static void test_conic_tangents(skiatest::Reporter* reporter) {
140 REPORTER_ASSERT(reporter, start.fX && start.fY);
141 REPORTER_ASSERT(reporter, mid.fX && mid.fY);
142 REPORTER_ASSERT(reporter, end.fX && end.fY);
143 REPORTER_ASSERT(reporter, SkScalarNearlyZero(start.cross(mid)));
144 REPORTER_ASSERT(reporter, SkScalarNearlyZero(mid.cross(end)));
148 static void test_this_conic_to_quad(skiatest::Reporter* r, const SkPoint pts[3], SkScalar w) {
163 static void test_conic_to_quads(skiatest::Reporter* reporter) {
181 test_this_conic_to_quad(reporter, pts, w);
183 test_this_conic_to_quad(reporter, pts, SK_ScalarNaN);
187 static void test_cubic_tangents(skiatest::Reporter* reporter) {
200 REPORTER_ASSERT(reporter, start.fX && start.fY);
201 REPORTER_ASSERT(reporter, mid.fX && mid.fY);
202 REPORTER_ASSERT(reporter, end.fX && end.fY);
203 REPORTER_ASSERT(reporter, SkScalarNearlyZero(start.cross(mid)));
204 REPORTER_ASSERT(reporter, SkScalarNearlyZero(mid.cross(end)));
208 DEF_TEST(Geometry, reporter) {
216 REPORTER_ASSERT(reporter, count == 1 || count == 2);
226 REPORTER_ASSERT(reporter, nearly_equal(cubic[i], dst[i]));
229 testChopCubic(reporter);
230 test_evalquadat(reporter);
231 test_conic(reporter);
232 test_cubic_tangents(reporter);
233 test_quad_tangents(reporter);
234 test_conic_tangents(reporter);
235 test_conic_to_quads(reporter);