Home | History | Annotate | Download | only in tests

Lines Matching refs:Reporter

37 static void TestAlignment(T* testObj, skiatest::Reporter* reporter) {
41 REPORTER_ASSERT(reporter, SkAlign4(bytesWrittenToMemory) == bytesWrittenToMemory);
43 REPORTER_ASSERT(reporter, SkAlign4(bytesReadFromMemory) == bytesReadFromMemory);
158 static void TestObjectSerializationNoAlign(T* testObj, skiatest::Reporter* reporter) {
162 REPORTER_ASSERT(reporter, SkAlign4(bytesWritten) == bytesWritten);
173 REPORTER_ASSERT(reporter, !buffer.isValid());
182 REPORTER_ASSERT(reporter, buffer2.isValid() == !testInvalid);
185 REPORTER_ASSERT(reporter, offsetAfter - offsetBefore == bytesWritten);
189 static void TestObjectSerialization(T* testObj, skiatest::Reporter* reporter) {
190 TestObjectSerializationNoAlign<T, false>(testObj, reporter);
191 SerializationTest::TestAlignment(testObj, reporter);
196 skiatest::Reporter* reporter) {
200 REPORTER_ASSERT(reporter, SkAlign4(bytesWritten) == bytesWritten);
210 REPORTER_ASSERT(reporter, !buffer.isValid());
211 REPORTER_ASSERT(reporter, nullptr == obj);
221 REPORTER_ASSERT(reporter, buffer2.isValid());
222 REPORTER_ASSERT(reporter, static_cast<size_t>(peekAfter - peekBefore) == bytesWritten);
223 REPORTER_ASSERT(reporter, obj2);
226 REPORTER_ASSERT(reporter, !buffer.isValid());
227 REPORTER_ASSERT(reporter, nullptr == obj2);
234 static void TestArraySerialization(T* data, skiatest::Reporter* reporter) {
239 REPORTER_ASSERT(reporter, (4 + kArraySize * sizeof(T)) == bytesWritten);
249 REPORTER_ASSERT(reporter, !success);
255 REPORTER_ASSERT(reporter, success);
261 skiatest::Reporter* reporter) {
273 xfermodeImageFilter.get(), shouldSucceed, reporter));
289 static void TestColorFilterSerialization(skiatest::Reporter* reporter) {
296 TestFlattenableSerialization<SkColorFilter>(colorFilter.get(), true, reporter));
308 static void compare_bitmaps(skiatest::Reporter* reporter,
310 REPORTER_ASSERT(reporter, b1.width() == b2.width());
311 REPORTER_ASSERT(reporter, b1.height() == b2.height());
325 REPORTER_ASSERT(reporter, 0 == pixelErrors);
328 skiatest::Reporter* reporter)
355 compare_bitmaps(reporter, origBitmap, destBitmap);
358 static void TestPictureTypefaceSerialization(skiatest::Reporter* reporter) {
364 INFOF(reporter, "Could not run fontstream test because test.ttc not found.");
366 serialize_and_compare_typeface(std::move(typeface), "A!", reporter);
374 INFOF(reporter, "Could not run fontstream test because Distortable.ttf not found.");
380 INFOF(reporter, "Could not run fontstream test because Distortable.ttf not created.");
382 serialize_and_compare_typeface(std::move(typeface), "abc", reporter);
435 DEF_TEST(Serialization, reporter) {
439 TestObjectSerialization(&matrix, reporter);
445 TestObjectSerialization(&path, reporter);
451 TestObjectSerialization(&region, reporter);
456 TestColorFilterSerialization(reporter);
462 TestObjectSerializationNoAlign<SkString, false>(&string, reporter);
463 TestObjectSerializationNoAlign<SkString, true>(&string, reporter);
475 SerializationTest::TestAlignment(&rrect, reporter);
481 TestArraySerialization(data, reporter);
487 TestArraySerialization(data, reporter);
498 TestArraySerialization(data, reporter);
504 TestArraySerialization(data, reporter);
510 TestArraySerialization(data, reporter);
516 TestArraySerialization(data, reporter);
532 TestBitmapSerialization(validBitmap, invalidBitmap, true, reporter);
553 REPORTER_ASSERT(reporter, reader.isValid());
554 REPORTER_ASSERT(reporter, readPict.get());
557 TestPictureTypefaceSerialization(reporter);
577 skiatest::Reporter* fReporter;
583 TestAnnotationCanvas(skiatest::Reporter* reporter, const AnnotationRec rec[], int count)
585 , fReporter(reporter)
609 DEF_TEST(Annotations, reporter) {
637 TestAnnotationCanvas canvas(reporter, recs, SK_ARRAY_COUNT(recs));