diff options
Diffstat (limited to 'tests/AnnotationTest.cpp')
-rw-r--r-- | tests/AnnotationTest.cpp | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/tests/AnnotationTest.cpp b/tests/AnnotationTest.cpp index 274d53ea4f..0ba3af9e9b 100644 --- a/tests/AnnotationTest.cpp +++ b/tests/AnnotationTest.cpp @@ -39,11 +39,6 @@ DEF_TEST(Annotation_NoDraw, reporter) { REPORTER_ASSERT(reporter, 0 == *bm.getAddr32(0, 0)); } -struct testCase { - SkPDFDocument::Flags flags; - bool expectAnnotations; -}; - DEF_TEST(Annotation_PdfLink, reporter) { SkISize size = SkISize::Make(612, 792); SkMatrix initialTransform; @@ -56,20 +51,14 @@ DEF_TEST(Annotation_PdfLink, reporter) { SkAutoDataUnref data(SkData::NewWithCString("http://www.gooogle.com")); SkAnnotateRectWithURL(&canvas, r, data.get()); - testCase tests[] = {{(SkPDFDocument::Flags)0, true}, - {SkPDFDocument::kNoLinks_Flags, false}}; - for (size_t testNum = 0; testNum < SK_ARRAY_COUNT(tests); testNum++) { - SkPDFDocument doc(tests[testNum].flags); - doc.appendPage(&device); - SkDynamicMemoryWStream outStream; - doc.emitPDF(&outStream); - SkAutoDataUnref out(outStream.copyToData()); - const char* rawOutput = (const char*)out->data(); + SkPDFDocument doc; + doc.appendPage(&device); + SkDynamicMemoryWStream outStream; + doc.emitPDF(&outStream); + SkAutoDataUnref out(outStream.copyToData()); + const char* rawOutput = (const char*)out->data(); - REPORTER_ASSERT(reporter, - ContainsString(rawOutput, out->size(), "/Annots ") - == tests[testNum].expectAnnotations); - } + REPORTER_ASSERT(reporter, ContainsString(rawOutput, out->size(), "/Annots ")); } DEF_TEST(Annotation_NamedDestination, reporter) { |