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

Side by Side Diff: tests/PDFGlyphsToUnicodeTest.cpp

Issue 2292303004: SkPDF: Fix Type3 ToUnicode table. (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2010 The Android Open Source Project 2 * Copyright 2010 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBitSet.h" 8 #include "SkBitSet.h"
9 #include "SkData.h" 9 #include "SkData.h"
10 #include "SkPDFMakeToUnicodeCmap.h" 10 #include "SkPDFMakeToUnicodeCmap.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 REPORTER_ASSERT(reporter, stream_equals(buffer, 0, expectedResultChop2, 119 REPORTER_ASSERT(reporter, stream_equals(buffer, 0, expectedResultChop2,
120 buffer.getOffset())); 120 buffer.getOffset()));
121 121
122 buffer.reset(); 122 buffer.reset();
123 123
124 SkPDFAppendCmapSections(glyphToUnicode, nullptr, &buffer, false, 0xFC, 0x110 ); 124 SkPDFAppendCmapSections(glyphToUnicode, nullptr, &buffer, false, 0xFC, 0x110 );
125 125
126 char expectedResultSingleBytes[] = 126 char expectedResultSingleBytes[] =
127 "2 beginbfchar\n\ 127 "2 beginbfchar\n\
128 <0001> <0000>\n\ 128 <01> <0000>\n\
129 <0002> <0000>\n\ 129 <02> <0000>\n\
130 endbfchar\n\ 130 endbfchar\n\
131 1 beginbfrange\n\ 131 1 beginbfrange\n\
132 <0003> <0006> <1010>\n\ 132 <03> <06> <1010>\n\
133 endbfrange\n"; 133 endbfrange\n";
134 134
135 REPORTER_ASSERT(reporter, stream_equals(buffer, 0, 135 REPORTER_ASSERT(reporter, stream_equals(buffer, 0,
136 expectedResultSingleBytes, 136 expectedResultSingleBytes,
137 buffer.getOffset())); 137 buffer.getOffset()));
138 138
139 glyphToUnicode.reset(); 139 glyphToUnicode.reset();
140 glyphsInSubset.reset(); 140 glyphsInSubset.reset();
141 SkBitSet subset2(kMaximumGlyphCount); 141 SkBitSet subset2(kMaximumGlyphCount);
142 142
(...skipping 23 matching lines...) Expand all
166 <004F> <006C>\n\ 166 <004F> <006C>\n\
167 <0051> <006E>\n\ 167 <0051> <006E>\n\
168 endbfchar\n\ 168 endbfchar\n\
169 1 beginbfrange\n\ 169 1 beginbfrange\n\
170 <0056> <0057> <0073>\n\ 170 <0056> <0057> <0073>\n\
171 endbfrange\n"; 171 endbfrange\n";
172 172
173 REPORTER_ASSERT(reporter, stream_equals(buffer2, 0, expectedResult2, 173 REPORTER_ASSERT(reporter, stream_equals(buffer2, 0, expectedResult2,
174 buffer2.getOffset())); 174 buffer2.getOffset()));
175 } 175 }
OLDNEW
« src/pdf/SkPDFMakeToUnicodeCmap.cpp ('K') | « src/pdf/SkPDFMakeToUnicodeCmap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698