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

Side by Side Diff: core/fpdfapi/parser/cpdf_syntax_parser_unittest.cpp

Issue 2392603004: Move core/fpdfapi/fpdf_parser to core/fpdfapi/parser (Closed)
Patch Set: Rebase to master Created 4 years, 2 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
« no previous file with comments | « core/fpdfapi/parser/cpdf_syntax_parser.cpp ('k') | core/fpdfapi/parser/fpdf_parser_decode.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <limits> 5 #include <limits>
6 #include <string> 6 #include <string>
7 7
8 #include "core/fpdfapi/fpdf_parser/cpdf_parser.h" 8 #include "core/fpdfapi/parser/cpdf_parser.h"
9 #include "core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h" 9 #include "core/fpdfapi/parser/cpdf_syntax_parser.h"
10 #include "core/fxcrt/fx_ext.h" 10 #include "core/fxcrt/fx_ext.h"
11 #include "core/fxcrt/fx_stream.h" 11 #include "core/fxcrt/fx_stream.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "testing/utils/path_service.h" 13 #include "testing/utils/path_service.h"
14 14
15 TEST(cpdf_syntax_parser, ReadHexString) { 15 TEST(cpdf_syntax_parser, ReadHexString) {
16 { 16 {
17 // Empty string. 17 // Empty string.
18 uint8_t data[] = ""; 18 uint8_t data[] = "";
19 ScopedFileStream stream(FX_CreateMemoryStream(data, 0, FALSE)); 19 ScopedFileStream stream(FX_CreateMemoryStream(data, 0, FALSE));
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // Just ending character. 162 // Just ending character.
163 uint8_t data[] = ">"; 163 uint8_t data[] = ">";
164 ScopedFileStream stream(FX_CreateMemoryStream(data, 1, FALSE)); 164 ScopedFileStream stream(FX_CreateMemoryStream(data, 1, FALSE));
165 165
166 CPDF_SyntaxParser parser; 166 CPDF_SyntaxParser parser;
167 parser.InitParser(stream.get(), 0); 167 parser.InitParser(stream.get(), 0);
168 EXPECT_EQ("", parser.ReadHexString()); 168 EXPECT_EQ("", parser.ReadHexString());
169 EXPECT_EQ(1, parser.SavePos()); 169 EXPECT_EQ(1, parser.SavePos());
170 } 170 }
171 } 171 }
OLDNEW
« no previous file with comments | « core/fpdfapi/parser/cpdf_syntax_parser.cpp ('k') | core/fpdfapi/parser/fpdf_parser_decode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698