Lines Matching refs:Reporter
19 static void TestBuilder(skiatest::Reporter* reporter) {
23 RunBuilderTest(reporter, builder, nullptr, 0, nullptr, 0);
28 RunBuilderTest(reporter, builder, set1, SK_ARRAY_COUNT(set1), set1, SK_ARRAY_COUNT(set1));
33 RunBuilderTest(reporter, builder, set2, SK_ARRAY_COUNT(set2), set2, SK_ARRAY_COUNT(set2));
38 RunBuilderTest(reporter, builder, set3, SK_ARRAY_COUNT(set3), set3, SK_ARRAY_COUNT(set3));
45 RunBuilderTest(reporter, builder, set4, SK_ARRAY_COUNT(set4), set4, SK_ARRAY_COUNT(set4));
56 RunBuilderTest(reporter, builder, set5, SK_ARRAY_COUNT(set5), mergedSet5,
67 RunBuilderTest(reporter, builder, set6, SK_ARRAY_COUNT(set6), mergedSet6,
95 RunBuilderTest(reporter, builder, set7, SK_ARRAY_COUNT(set7), mergedSet7,
100 static void TestBounds(skiatest::Reporter* reporter) {
108 REPORTER_ASSERT(reporter, !blob);
115 REPORTER_ASSERT(reporter, blob->bounds() == r1);
122 REPORTER_ASSERT(reporter, blob->bounds() == r1);
129 REPORTER_ASSERT(reporter, blob->bounds() == r1);
142 REPORTER_ASSERT(reporter, blob->bounds() == SkRect::MakeXYWH(0, 5, 65, 65));
147 REPORTER_ASSERT(reporter, !blob);
171 REPORTER_ASSERT(reporter, blob->bounds().isEmpty());
176 static void TestPaintProps(skiatest::Reporter* reporter) {
200 REPORTER_ASSERT(reporter, defaultPaint.getTextSize() != font.getTextSize());
201 REPORTER_ASSERT(reporter, defaultPaint.getTextScaleX() != font.getTextScaleX());
202 REPORTER_ASSERT(reporter, defaultPaint.getTypeface() != font.getTypeface());
203 REPORTER_ASSERT(reporter, defaultPaint.getTextSkewX() != font.getTextSkewX());
204 REPORTER_ASSERT(reporter, defaultPaint.getTextAlign() != font.getTextAlign());
205 REPORTER_ASSERT(reporter, defaultPaint.getHinting() != font.getHinting());
206 REPORTER_ASSERT(reporter, defaultPaint.isAntiAlias() != font.isAntiAlias());
207 REPORTER_ASSERT(reporter, defaultPaint.isFakeBoldText() != font.isFakeBoldText());
208 REPORTER_ASSERT(reporter, defaultPaint.isLinearText() != font.isLinearText());
209 REPORTER_ASSERT(reporter, defaultPaint.isSubpixelText() != font.isSubpixelText());
210 REPORTER_ASSERT(reporter, defaultPaint.isDevKernText() != font.isDevKernText());
211 REPORTER_ASSERT(reporter, defaultPaint.isLCDRenderText() != font.isLCDRenderText());
212 REPORTER_ASSERT(reporter, defaultPaint.isEmbeddedBitmapText() != font.isEmbeddedBitmapText());
213 REPORTER_ASSERT(reporter, defaultPaint.isAutohinted() != font.isAutohinted());
214 REPORTER_ASSERT(reporter, defaultPaint.isVerticalText() != font.isVerticalText());
215 REPORTER_ASSERT(reporter, (defaultPaint.getFlags() & SkPaint::kGenA8FromLCD_Flag) !=
229 REPORTER_ASSERT(reporter, paint.getTextSize() == font.getTextSize());
230 REPORTER_ASSERT(reporter, paint.getTextScaleX() == font.getTextScaleX());
231 REPORTER_ASSERT(reporter, paint.getTypeface() == font.getTypeface());
232 REPORTER_ASSERT(reporter, paint.getTextSkewX() == font.getTextSkewX());
233 REPORTER_ASSERT(reporter, paint.getTextAlign() == font.getTextAlign());
234 REPORTER_ASSERT(reporter, paint.getHinting() == font.getHinting());
235 REPORTER_ASSERT(reporter, paint.isAntiAlias() == font.isAntiAlias());
236 REPORTER_ASSERT(reporter, paint.isFakeBoldText() == font.isFakeBoldText());
237 REPORTER_ASSERT(reporter, paint.isLinearText() == font.isLinearText());
238 REPORTER_ASSERT(reporter, paint.isSubpixelText() == font.isSubpixelText());
239 REPORTER_ASSERT(reporter, paint.isDevKernText() == font.isDevKernText());
240 REPORTER_ASSERT(reporter, paint.isLCDRenderText() == font.isLCDRenderText());
241 REPORTER_ASSERT(reporter, paint.isEmbeddedBitmapText() == font.isEmbeddedBitmapText());
242 REPORTER_ASSERT(reporter, paint.isAutohinted() == font.isAutohinted());
243 REPORTER_ASSERT(reporter, paint.isVerticalText() == font.isVerticalText());
244 REPORTER_ASSERT(reporter, (paint.getFlags() & SkPaint::kGenA8FromLCD_Flag) ==
259 static void RunBuilderTest(skiatest::Reporter* reporter, SkTextBlobBuilder& builder,
275 REPORTER_ASSERT(reporter, (inCount > 0) == SkToBool(blob));
282 REPORTER_ASSERT(reporter, !it.done());
283 REPORTER_ASSERT(reporter, out[i].pos == it.positioning());
284 REPORTER_ASSERT(reporter, out[i].count == it.glyphCount());
286 REPORTER_ASSERT(reporter, out[i].x == it.offset().x());
287 REPORTER_ASSERT(reporter, out[i].y == it.offset().y());
289 REPORTER_ASSERT(reporter, out[i].y == it.offset().y());
293 REPORTER_ASSERT(reporter, k % 128 == it.glyphs()[k]);
295 REPORTER_ASSERT(reporter, SkIntToScalar(k % 128) == it.pos()[k]);
297 REPORTER_ASSERT(reporter, SkIntToScalar(k % 128) == it.pos()[k * 2]);
298 REPORTER_ASSERT(reporter, -SkIntToScalar(k % 128) == it.pos()[k * 2 + 1]);
305 REPORTER_ASSERT(reporter, it.done());
341 DEF_TEST(TextBlob_builder, reporter) {
342 TextBlobTester::TestBuilder(reporter);
343 TextBlobTester::TestBounds(reporter);
346 DEF_TEST(TextBlob_paint, reporter) {
347 TextBlobTester::TestPaintProps(reporter);
350 DEF_TEST(TextBlob_extended, reporter) {
369 REPORTER_ASSERT(reporter, blob);
372 REPORTER_ASSERT(reporter, it.glyphCount() == (uint32_t)glyphCount);
374 REPORTER_ASSERT(reporter
376 REPORTER_ASSERT(reporter, SkTextBlob::kDefault_Positioning == it.positioning());
377 REPORTER_ASSERT(reporter, (SkPoint{0.0f, 0.0f}) == it.offset());
378 REPORTER_ASSERT(reporter, it.textSize() > 0);
379 REPORTER_ASSERT(reporter, it.clusters());
381 REPORTER_ASSERT(reporter, i == it.clusters()[i]);
383 REPORTER_ASSERT(reporter, 0 == strncmp(text2, it.text(), it.textSize()));