Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(665)

Unified Diff: tests/PDFPrimitivesTest.cpp

Issue 2188623004: SkPDF: SkPDFStream takes a unique_ptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pdf/SkPDFStream.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PDFPrimitivesTest.cpp
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index cef11503b3e2f15764a04cf1d27506e8584a581d..0664ef406524ca0eb9eea5f6cece4b48094a5c99 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -83,9 +83,9 @@ static void assert_emit_eq(skiatest::Reporter* reporter,
static void TestPDFStream(skiatest::Reporter* reporter) {
char streamBytes[] = "Test\nFoo\tBar";
- SkAutoTDelete<SkMemoryStream> streamData(new SkMemoryStream(
+ std::unique_ptr<SkStreamAsset> streamData(new SkMemoryStream(
streamBytes, strlen(streamBytes), true));
- sk_sp<SkPDFStream> stream(new SkPDFStream(streamData.get()));
+ auto stream = sk_make_sp<SkPDFStream>(std::move(streamData));
assert_emit_eq(reporter,
*stream,
"<</Length 12>> stream\nTest\nFoo\tBar\nendstream");
« no previous file with comments | « src/pdf/SkPDFStream.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698