diff options
Diffstat (limited to 'tests/PDFPrimitivesTest.cpp')
-rw-r--r-- | tests/PDFPrimitivesTest.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp index 2423d561d5..ea3093f60f 100644 --- a/tests/PDFPrimitivesTest.cpp +++ b/tests/PDFPrimitivesTest.cpp @@ -38,10 +38,10 @@ private: static bool stream_equals(const SkDynamicMemoryWStream& stream, size_t offset, const void* buffer, size_t len) { SkAutoDataUnref data(stream.copyToData()); - if (offset + len > data.size()) { + if (offset + len > data->size()) { return false; } - return memcmp(data.bytes() + offset, buffer, len) == 0; + return memcmp(data->bytes() + offset, buffer, len) == 0; } static void CheckObjectOutput(skiatest::Reporter* reporter, SkPDFObject* obj, @@ -128,19 +128,19 @@ static void TestPDFStream(skiatest::Reporter* reporter) { expectedResult1.writeText("\nendstream"); SkAutoDataUnref expectedResultData1(expectedResult1.copyToData()); CheckObjectOutput(reporter, stream.get(), - (const char*) expectedResultData1.data(), - expectedResultData1.size(), true, false); + (const char*) expectedResultData1->data(), + expectedResultData1->size(), true, false); // Then again with compression. SkDynamicMemoryWStream expectedResult2; expectedResult2.writeText("<</Filter /FlateDecode\n/Length 116\n" ">> stream\n"); - expectedResult2.write(compressedData.data(), compressedData.size()); + expectedResult2.write(compressedData->data(), compressedData->size()); expectedResult2.writeText("\nendstream"); SkAutoDataUnref expectedResultData2(expectedResult2.copyToData()); CheckObjectOutput(reporter, stream.get(), - (const char*) expectedResultData2.data(), - expectedResultData2.size(), true, true); + (const char*) expectedResultData2->data(), + expectedResultData2->size(), true, true); } } |