Lines Matching defs:reporter
77 DEF_TEST(PathMeasure, reporter) {
94 REPORTER_ASSERT(reporter, length == SK_Scalar1*5);
111 REPORTER_ASSERT(reporter, length == SK_Scalar1 * 4);
114 REPORTER_ASSERT(reporter, length == SK_Scalar1);
117 REPORTER_ASSERT(reporter, meas.getPosTan(SK_ScalarHalf, &position, &tangent));
118 REPORTER_ASSERT(reporter,
122 REPORTER_ASSERT(reporter, position.fY == 0);
123 REPORTER_ASSERT(reporter, tangent.fX == -SK_Scalar1);
124 REPORTER_ASSERT(reporter, tangent.fY == 0);
141 REPORTER_ASSERT(reporter, length == SK_Scalar1 * 6);
142 REPORTER_ASSERT(reporter, meas.getPosTan(SK_ScalarHalf, &position, &tangent));
143 REPORTER_ASSERT(reporter,
147 REPORTER_ASSERT(reporter, position.fY == 0);
148 REPORTER_ASSERT(reporter, tangent.fX == SK_Scalar1);
149 REPORTER_ASSERT(reporter, tangent.fY == 0);
150 REPORTER_ASSERT(reporter, meas.getPosTan(2.5f, &position, &tangent));
151 REPORTER_ASSERT(reporter,
153 REPORTER_ASSERT(reporter,
155 REPORTER_ASSERT(reporter, tangent.fX == 0);
156 REPORTER_ASSERT(reporter, tangent.fY == SK_Scalar1);
157 REPORTER_ASSERT(reporter, meas.getPosTan(4.5f, &position, &tangent));
158 REPORTER_ASSERT(reporter,
162 REPORTER_ASSERT(reporter,
166 REPORTER_ASSERT(reporter, tangent.fX == SK_Scalar1);
167 REPORTER_ASSERT(reporter, tangent.fY == 0);
177 REPORTER_ASSERT(reporter, length == SK_Scalar1);
178 REPORTER_ASSERT(reporter, meas.getPosTan(SK_ScalarHalf, &position, &tangent));
179 REPORTER_ASSERT(reporter,
183 REPORTER_ASSERT(reporter, position.fY == 0);
184 REPORTER_ASSERT(reporter, tangent.fX == SK_Scalar1);
185 REPORTER_ASSERT(reporter, tangent.fY == 0);
188 REPORTER_ASSERT(reporter, length == SK_Scalar1);
189 REPORTER_ASSERT(reporter, meas.getPosTan(SK_ScalarHalf, &position, &tangent));
190 REPORTER_ASSERT(reporter,
194 REPORTER_ASSERT(reporter,
198 REPORTER_ASSERT(reporter, tangent.fX == -SK_Scalar1);
199 REPORTER_ASSERT(reporter, tangent.fY == 0);
206 DEF_TEST(PathMeasureConic, reporter) {
212 REPORTER_ASSERT(reporter, stdm.getPosTan(20, &stdP, nullptr));
217 REPORTER_ASSERT(reporter, stdm.getPosTan(20, &hiP, nullptr));
218 REPORTER_ASSERT(reporter, 19.5f < stdP.fX && stdP.fX < 20.5f);
219 REPORTER_ASSERT(reporter, 19.5f < hiP.fX && hiP.fX < 20.5f);
223 DEF_TEST(PathMeasure_nextctr, reporter) {
229 REPORTER_ASSERT(reporter, !meas.nextContour());
235 skiatest::Reporter* reporter) {
241 REPORTER_ASSERT(reporter, success);
242 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(pos.fX, 0));
243 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(pos.fY, radius));
244 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(tan.fX, -1));
245 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(tan.fY, 0));
248 static void test_empty_contours(skiatest::Reporter* reporter) {
264 REPORTER_ASSERT(reporter, fact.next());
265 REPORTER_ASSERT(reporter, fact.next());
266 REPORTER_ASSERT(reporter, !fact.next());
269 static void test_MLM_contours(skiatest::Reporter* reporter) {
278 REPORTER_ASSERT(reporter, fact.next());
279 REPORTER_ASSERT(reporter, !fact.next());
283 static void test_shrink(skiatest::Reporter* reporter) {
301 DEF_TEST(contour_measure, reporter) {
312 REPORTER_ASSERT(reporter, cm0->isClosed());
313 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(cm0->length(), 200 * SK_ScalarPI, 1.5f));
315 test_90_degrees(cm0, 100, reporter);
317 REPORTER_ASSERT(reporter, cm1->isClosed());
318 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(cm1->length(), 20 * SK_ScalarPI, 0.5f));
320 test_90_degrees(cm1, 10, reporter);
323 REPORTER_ASSERT(reporter, !cm2);
325 test_empty_contours(reporter);
326 test_MLM_contours(reporter);
328 test_shrink(reporter);