Lines Matching defs:reporter
20 static void test_empty(skiatest::Reporter* reporter) {
27 REPORTER_ASSERT(reporter, stream.bytesWritten() == 0);
30 static void test_abort(skiatest::Reporter* reporter) {
41 REPORTER_ASSERT(reporter, stream.bytesWritten() < 256);
44 static void test_abortWithFile(skiatest::Reporter* reporter) {
48 ERRORF(reporter, "missing tmpDir.");
54 ERRORF(reporter, "unable to write to: %s", path.c_str());
73 REPORTER_ASSERT(reporter, fread(buffer, 1, sizeof(buffer), file) < sizeof(buffer));
77 static void test_file(skiatest::Reporter* reporter) {
80 ERRORF(reporter, "missing tmpDir.");
86 ERRORF(reporter, "unable to write to: %s", path.c_str());
101 REPORTER_ASSERT(reporter, file != nullptr);
103 REPORTER_ASSERT(reporter, fread(header, 4, 1, file) != 0);
104 REPORTER_ASSERT(reporter, strncmp(header, "%PDF", 4) == 0);
108 static void test_close(skiatest::Reporter* reporter) {
118 REPORTER_ASSERT(reporter, stream.bytesWritten() != 0);
121 DEF_TEST(SkPDF_document_tests, reporter) {
122 REQUIRE_PDF_DOCUMENT(document_tests, reporter);
123 test_empty(reporter);
124 test_abort(reporter);
125 test_abortWithFile(reporter);
126 test_file(reporter);
127 test_close(reporter);