Home | History | Annotate | Download | only in tests

Lines Matching refs:Reporter

35 static void TestAlignment(T* testObj, skiatest::Reporter* reporter) {
39 REPORTER_ASSERT(reporter, SkAlign4(bytesWrittenToMemory) == bytesWrittenToMemory);
41 REPORTER_ASSERT(reporter, SkAlign4(bytesReadFromMemory) == bytesReadFromMemory);
155 static void TestObjectSerializationNoAlign(T* testObj, skiatest::Reporter* reporter) {
159 REPORTER_ASSERT(reporter, SkAlign4(bytesWritten) == bytesWritten);
170 REPORTER_ASSERT(reporter, !buffer.isValid());
179 REPORTER_ASSERT(reporter, buffer2.isValid() == !testInvalid);
182 REPORTER_ASSERT(reporter, offsetAfter - offsetBefore == bytesWritten);
186 static void TestObjectSerialization(T* testObj, skiatest::Reporter* reporter) {
187 TestObjectSerializationNoAlign<T, false>(testObj, reporter);
188 TestAlignment(testObj, reporter);
193 skiatest::Reporter* reporter) {
197 REPORTER_ASSERT(reporter, SkAlign4(bytesWritten) == bytesWritten);
207 REPORTER_ASSERT(reporter, !buffer.isValid());
208 REPORTER_ASSERT(reporter, nullptr == obj);
218 REPORTER_ASSERT(reporter, buffer2.isValid());
219 REPORTER_ASSERT(reporter, static_cast<size_t>(peekAfter - peekBefore) == bytesWritten);
220 REPORTER_ASSERT(reporter, obj2);
223 REPORTER_ASSERT(reporter, !buffer.isValid());
224 REPORTER_ASSERT(reporter, nullptr == obj2);
231 static void TestArraySerialization(T* data, skiatest::Reporter* reporter) {
236 REPORTER_ASSERT(reporter, (4 + kArraySize * sizeof(T)) == bytesWritten);
246 REPORTER_ASSERT(reporter, !success);
252 REPORTER_ASSERT(reporter, success);
258 skiatest::Reporter* reporter) {
270 xfermodeImageFilter.get(), shouldSucceed, reporter));
286 static void TestColorFilterSerialization(skiatest::Reporter* reporter) {
293 TestFlattenableSerialization<SkColorFilter>(colorFilter.get(), true, reporter));
305 static void compare_bitmaps(skiatest::Reporter* reporter,
307 REPORTER_ASSERT(reporter, b1.width() == b2.width());
308 REPORTER_ASSERT(reporter, b1.height() == b2.height());
322 REPORTER_ASSERT(reporter, 0 == pixelErrors);
325 skiatest::Reporter* reporter)
352 compare_bitmaps(reporter, origBitmap, destBitmap);
355 static void TestPictureTypefaceSerialization(skiatest::Reporter* reporter) {
361 INFOF(reporter, "Could not run fontstream test because test.ttc not found.");
363 serialize_and_compare_typeface(std::move(typeface), "A!", reporter);
371 INFOF(reporter, "Could not run fontstream test because Distortable.ttf not found.");
377 INFOF(reporter, "Could not run fontstream test because Distortable.ttf not created.");
379 serialize_and_compare_typeface(std::move(typeface), "abc", reporter);
432 DEF_TEST(Serialization, reporter) {
436 TestObjectSerialization(&matrix, reporter);
442 TestObjectSerialization(&path, reporter);
448 TestObjectSerialization(&region, reporter);
453 TestColorFilterSerialization(reporter);
459 TestObjectSerializationNoAlign<SkString, false>(&string, reporter);
460 TestObjectSerializationNoAlign<SkString, true>(&string, reporter);
472 TestAlignment(&rrect, reporter);
478 TestArraySerialization(data, reporter);
484 TestArraySerialization(data, reporter);
495 TestArraySerialization(data, reporter);
501 TestArraySerialization(data, reporter);
507 TestArraySerialization(data, reporter);
513 TestArraySerialization(data, reporter);
529 TestBitmapSerialization(validBitmap, invalidBitmap, true, reporter);
550 REPORTER_ASSERT(reporter, reader.isValid());
551 REPORTER_ASSERT(reporter, readPict.get());
554 TestPictureTypefaceSerialization(reporter);
596 sk_sp<SkShader>(TestFlattenableSerialization(as_SB(lightingShader.get()), true, reporter));
601 sk_sp<SkShader>(TestFlattenableSerialization(as_SB(lightingShader.get()), true, reporter));
606 sk_sp<SkShader>(TestFlattenableSerialization(as_SB(lightingShader.get()), true, reporter));
611 sk_sp<SkShader>(TestFlattenableSerialization(as_SB(lightingShader.get()), true, reporter));
632 skiatest::Reporter* fReporter;
638 TestAnnotationCanvas(skiatest::Reporter* reporter, const AnnotationRec rec[], int count)
640 , fReporter(reporter)
664 DEF_TEST(Annotations, reporter) {
692 TestAnnotationCanvas canvas(reporter, recs, SK_ARRAY_COUNT(recs));