Lines Matching refs:Reporter
34 static void TestAlignment(T* testObj, skiatest::Reporter* reporter) {
38 REPORTER_ASSERT(reporter, SkAlign4(bytesWrittenToMemory) == bytesWrittenToMemory);
40 REPORTER_ASSERT(reporter, SkAlign4(bytesReadFromMemory) == bytesReadFromMemory);
154 static void TestObjectSerializationNoAlign(T* testObj, skiatest::Reporter* reporter) {
158 REPORTER_ASSERT(reporter, SkAlign4(bytesWritten) == bytesWritten);
169 REPORTER_ASSERT(reporter, !buffer.isValid());
178 REPORTER_ASSERT(reporter, buffer2.isValid() == !testInvalid);
181 REPORTER_ASSERT(reporter, offsetAfter - offsetBefore == bytesWritten);
185 static void TestObjectSerialization(T* testObj, skiatest::Reporter* reporter) {
186 TestObjectSerializationNoAlign<T, false>(testObj, reporter);
187 TestAlignment(testObj, reporter);
192 skiatest::Reporter* reporter) {
196 REPORTER_ASSERT(reporter, SkAlign4(bytesWritten) == bytesWritten);
206 REPORTER_ASSERT(reporter, !buffer.isValid());
207 REPORTER_ASSERT(reporter, nullptr == obj);
217 REPORTER_ASSERT(reporter, buffer2.isValid());
218 REPORTER_ASSERT(reporter, static_cast<size_t>(peekAfter - peekBefore) == bytesWritten);
219 REPORTER_ASSERT(reporter, obj2);
222 REPORTER_ASSERT(reporter, !buffer.isValid());
223 REPORTER_ASSERT(reporter, nullptr == obj2);
230 static void TestArraySerialization(T* data, skiatest::Reporter* reporter) {
235 REPORTER_ASSERT(reporter, (4 + kArraySize * sizeof(T)) == bytesWritten);
245 REPORTER_ASSERT(reporter, !success);
251 REPORTER_ASSERT(reporter, success);
257 skiatest::Reporter* reporter) {
269 xfermodeImageFilter.get(), shouldSucceed, reporter));
285 static void TestXfermodeSerialization(skiatest::Reporter* reporter) {
292 REPORTER_ASSERT(reporter, mode);
294 TestFlattenableSerialization<SkXfermode>(mode.get(), true, reporter));
298 static void TestColorFilterSerialization(skiatest::Reporter* reporter) {
305 TestFlattenableSerialization<SkColorFilter>(colorFilter.get(), true, reporter));
317 static void compare_bitmaps(skiatest::Reporter* reporter,
319 REPORTER_ASSERT(reporter, b1.width() == b2.width());
320 REPORTER_ASSERT(reporter, b1.height() == b2.height());
336 REPORTER_ASSERT(reporter, 0 == pixelErrors);
339 skiatest::Reporter* reporter)
366 compare_bitmaps(reporter, origBitmap, destBitmap);
369 static void TestPictureTypefaceSerialization(skiatest::Reporter* reporter) {
375 INFOF(reporter, "Could not run fontstream test because test.ttc not found.");
377 serialize_and_compare_typeface(std::move(typeface), "A!", reporter);
385 INFOF(reporter, "Could not run fontstream test because Distortable.ttf not found.");
391 INFOF(reporter, "Could not run fontstream test because Distortable.ttf not created.");
393 serialize_and_compare_typeface(std::move(typeface), "abc", reporter);
446 DEF_TEST(Serialization, reporter) {
450 TestObjectSerialization(&matrix, reporter);
456 TestObjectSerialization(&path, reporter);
462 TestObjectSerialization(®ion, reporter);
467 TestXfermodeSerialization(reporter);
472 TestColorFilterSerialization(reporter);
478 TestObjectSerializationNoAlign<SkString, false>(&string, reporter);
479 TestObjectSerializationNoAlign<SkString, true>(&string, reporter);
491 TestAlignment(&rrect, reporter);
497 TestArraySerialization(data, reporter);
503 TestArraySerialization(data, reporter);
514 TestArraySerialization(data, reporter);
520 TestArraySerialization(data, reporter);
526 TestArraySerialization(data, reporter);
532 TestArraySerialization(data, reporter);
548 TestBitmapSerialization(validBitmap, invalidBitmap, true, reporter);
569 REPORTER_ASSERT(reporter, reader.isValid());
570 REPORTER_ASSERT(reporter, readPict.get());
573 TestPictureTypefaceSerialization(reporter);
615 sk_sp<SkShader>(TestFlattenableSerialization(lightingShader.get(), true, reporter));
620 sk_sp<SkShader>(TestFlattenableSerialization(lightingShader.get(), true, reporter));
625 sk_sp<SkShader>(TestFlattenableSerialization(lightingShader.get(), true, reporter));
630 sk_sp<SkShader>(TestFlattenableSerialization(lightingShader.get(), true, reporter));
638 sk_sp<SkNormalSource>(TestFlattenableSerialization(bevelSource.get(), true, reporter));
661 skiatest::Reporter* fReporter;
667 TestAnnotationCanvas(skiatest::Reporter* reporter, const AnnotationRec rec[], int count)
669 , fReporter(reporter)
693 DEF_TEST(Annotations, reporter) {
721 TestAnnotationCanvas canvas(reporter, recs, SK_ARRAY_COUNT(recs));