Lines Matching +full:test +full:- +full:expectations
4 * Use of this source code is governed by a BSD-style license that can be
7 #include "tests/Test.h"
25 doc->close(); in test_empty()
34 SkCanvas* canvas = doc->beginPage(100, 100); in test_abort()
35 canvas->drawColor(SK_ColorRED); in test_abort()
36 doc->endPage(); in test_abort()
38 doc->abort(); in test_abort()
40 // Test that only the header is written, not the full document. in test_abort()
63 SkCanvas* canvas = doc->beginPage(100, 100); in test_abortWithFile()
64 canvas->drawColor(SK_ColorRED); in test_abortWithFile()
65 doc->endPage(); in test_abortWithFile()
67 doc->abort(); in test_abortWithFile()
71 // Test that only the header is written, not the full document. in test_abortWithFile()
93 SkCanvas* canvas = doc->beginPage(100, 100); in test_file()
95 canvas->drawColor(SK_ColorRED); in test_file()
96 doc->endPage(); in test_file()
97 doc->close(); in test_file()
112 SkCanvas* canvas = doc->beginPage(100, 100); in test_close()
113 canvas->drawColor(SK_ColorRED); in test_close()
114 doc->endPage(); in test_close()
116 doc->close(); in test_close()
134 SkCanvas* canvas = doc->beginPage(64, 64); in DEF_TEST()
135 canvas->scale(10000.0f, 10000.0f); in DEF_TEST()
136 canvas->translate(20.0f, 10.0f); in DEF_TEST()
137 canvas->rotate(30.0f); in DEF_TEST()
139 canvas->drawString(text, 0, 0, SkFont(), SkPaint()); in DEF_TEST()
144 size_t N = 1 + size - len; in contains()
158 pdfMetadata.fTitle = "test document"; in DEF_TEST()
164 doc->beginPage(64, 64)->drawColor(SK_ColorRED); in DEF_TEST()
165 doc->close(); in DEF_TEST()
168 static const char* expectations[] = { in DEF_TEST() local
169 "sRGB IEC61966-2.1", in DEF_TEST()
170 "<dc:title><rdf:Alt><rdf:li xml:lang=\"x-default\">test document", in DEF_TEST()
171 "<xmp:CreateDate>1999-12-31T23:59:59+00:00</xmp:CreateDate>", in DEF_TEST()
175 for (const char* expectation : expectations) { in DEF_TEST()
176 if (!contains(data->bytes(), data->size(), expectation)) { in DEF_TEST()
183 doc->beginPage(64, 64)->drawColor(SK_ColorRED); in DEF_TEST()
184 doc->close(); in DEF_TEST()
192 if (!contains(data->bytes(), data->size(), expectation)) { in DEF_TEST()
209 doc->beginPage(612, 792)->drawColor(SK_ColorCYAN); in DEF_TEST()
212 static const char* expectations[] = { in DEF_TEST() local
218 for (const char* expectation : expectations) { in DEF_TEST()
219 if (!contains(data->bytes(), data->size(), expectation)) { in DEF_TEST()
225 // Make sure we excercise the multi-page functionality without problems.
227 // extra_cflags = [ "-DSK_PDF_TEST_MULTIPAGE=\"/tmp/skpdf_test_multipage.pdf\"" ]
238 doc->beginPage(612, 792)->drawColor( in DEF_TEST()
239 SkColorSetARGB(0xFF, 0x00, (uint8_t)(255.0f * i / (n - 1)), 0x00)); in DEF_TEST()
243 // Test to make sure that jobs launched by PDF backend don't cause a segfault
255 doc->beginPage(612, 792)->drawImage(b.asImage(), 0, 0); in DEF_TEST()
256 doc->abort(); in DEF_TEST()