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

Unified Diff: tests/PDFPrimitivesTest.cpp

Issue 2099463002: SkPDF: alloc less memory for strings (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-06-23 (Thursday) 16:23:34 EDT Created 4 years, 6 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
« src/pdf/SkPDFDevice.cpp ('K') | « src/pdf/SkPDFUtils.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 e438bfef78aa98d670a4a1a68627ecb549702a69..9e2a89e60953b067faf69e588a05bad9b6a07657 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -217,9 +217,11 @@ static void TestPDFUnion(skiatest::Reporter* reporter) {
SkString stringComplexInput("\ttest ) string ( foo");
SkPDFUnion stringComplex = SkPDFUnion::String(stringComplexInput);
- ASSERT_EMIT_EQ(reporter,
- stringComplex,
- "<0974657374202920737472696E67202820666F6F>");
+ ASSERT_EMIT_EQ(reporter, stringComplex, "(\\011test \\) string \\( foo)");
+
+ SkString binaryStringInput("\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17\20");
+ SkPDFUnion binaryString = SkPDFUnion::String(binaryStringInput);
+ ASSERT_EMIT_EQ(reporter, binaryString, "<0102030405060708090A0B0C0D0E0F10>");
SkString nameInput("Test name\twith#tab");
SkPDFUnion name = SkPDFUnion::Name(nameInput);
« src/pdf/SkPDFDevice.cpp ('K') | « src/pdf/SkPDFUtils.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698