Home | History | Annotate | Download | only in tests

Lines Matching refs:Reporter

17 static void testChopCubic(skiatest::Reporter* reporter) {
34 REPORTER_ASSERT(reporter, count);
38 static void check_pairs(skiatest::Reporter* reporter, int index, SkScalar t, const char name[],
44 REPORTER_ASSERT(reporter, eq);
48 static void test_evalquadat(skiatest::Reporter* reporter) {
61 check_pairs(reporter, i, t, "quad-pos", r0.fX, r0.fY, r1.fX, r1.fY);
66 check_pairs(reporter, i, t, "quad-tan", v0.fX, v0.fY, v1.fX, v1.fY);
73 static void test_conic_eval_pos(skiatest::Reporter* reporter, const SkConic& conic, SkScalar t) {
77 check_pairs(reporter, 0, t, "conic-pos", p0.fX, p0.fY, p1.fX, p1.fY);
80 static void test_conic_eval_tan(skiatest::Reporter* reporter, const SkConic& conic, SkScalar t) {
84 check_pairs(reporter, 0, t, "conic-tan", v0.fX, v0.fY, v1.fX, v1.fY);
87 static void test_conic(skiatest::Reporter* reporter) {
101 test_conic_eval_pos(reporter, conic, t);
102 test_conic_eval_tan(reporter, conic, t);
109 static void test_quad_tangents(skiatest::Reporter* reporter) {
121 REPORTER_ASSERT(reporter, start.fX && start.fY);
122 REPORTER_ASSERT(reporter, mid.fX && mid.fY);
123 REPORTER_ASSERT(reporter, end.fX && end.fY);
124 REPORTER_ASSERT(reporter, SkScalarNearlyZero(start.cross(mid)));
125 REPORTER_ASSERT(reporter, SkScalarNearlyZero(mid.cross(end)));
129 static void test_conic_tangents(skiatest::Reporter* reporter) {
141 REPORTER_ASSERT(reporter, start.fX && start.fY);
142 REPORTER_ASSERT(reporter, mid.fX && mid.fY);
143 REPORTER_ASSERT(reporter, end.fX && end.fY);
144 REPORTER_ASSERT(reporter, SkScalarNearlyZero(start.cross(mid)));
145 REPORTER_ASSERT(reporter, SkScalarNearlyZero(mid.cross(end)));
149 static void test_this_conic_to_quad(skiatest::Reporter* r, const SkPoint pts[3], SkScalar w) {
164 static void test_conic_to_quads(skiatest::Reporter* reporter) {
182 test_this_conic_to_quad(reporter, pts, w);
184 test_this_conic_to_quad(reporter, pts, SK_ScalarNaN);
188 static void test_cubic_tangents(skiatest::Reporter* reporter) {
201 REPORTER_ASSERT(reporter, start.fX && start.fY);
202 REPORTER_ASSERT(reporter, mid.fX && mid.fY);
203 REPORTER_ASSERT(reporter, end.fX && end.fY);
204 REPORTER_ASSERT(reporter, SkScalarNearlyZero(start.cross(mid)));
205 REPORTER_ASSERT(reporter, SkScalarNearlyZero(mid.cross(end)));
209 static void check_cubic_type(skiatest::Reporter* reporter,
212 REPORTER_ASSERT(reporter, actualType == expectedType);
215 static void test_classify_cubic(skiatest::Reporter* reporter) {
216 check_cubic_type(reporter, {{{149.325f, 107.705f}, {149.325f, 103.783f},
219 check_cubic_type(reporter, {{{225.694f, 223.15f}, {209.831f, 224.837f},
222 check_cubic_type(reporter, {{{4.873f, 5.581f}, {5.083f, 5.2783f},
227 DEF_TEST(Geometry, reporter) {
235 REPORTER_ASSERT(reporter, count == 1 || count == 2);
245 REPORTER_ASSERT(reporter, nearly_equal(cubic[i], dst[i]));
248 testChopCubic(reporter);
249 test_evalquadat(reporter);
250 test_conic(reporter);
251 test_cubic_tangents(reporter);
252 test_quad_tangents(reporter);
253 test_conic_tangents(reporter);
254 test_conic_to_quads(reporter);
255 test_classify_cubic(reporter);