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

Side by Side Diff: core/fpdfapi/page/cpdf_streamparser_unittest.cpp

Issue 2521123003: Continue splitting pageint.h into per-class files (Closed)
Patch Set: const Created 4 years, 1 month 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/page/cpdf_streamparser.cpp ('k') | core/fpdfapi/page/pageint.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 2015 PDFium Authors. All rights reserved. 1 // Copyright 2015 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 "core/fpdfapi/page/pageint.h" 5 #include "core/fpdfapi/page/cpdf_streamparser.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 TEST(cpdf_streamparser, ReadHexString) { 8 TEST(cpdf_streamparser, ReadHexString) {
9 { 9 {
10 // Position out of bounds. 10 // Position out of bounds.
11 uint8_t data[] = "12ab>"; 11 uint8_t data[] = "12ab>";
12 CPDF_StreamParser parser(data, 5); 12 CPDF_StreamParser parser(data, 5);
13 parser.SetPos(6); 13 parser.SetPos(6);
14 EXPECT_EQ("", parser.ReadHexString()); 14 EXPECT_EQ("", parser.ReadHexString());
15 } 15 }
(...skipping 22 matching lines...) Expand all
38 EXPECT_EQ(4u, parser.GetPos()); 38 EXPECT_EQ(4u, parser.GetPos());
39 } 39 }
40 40
41 { 41 {
42 uint8_t data[] = ">"; 42 uint8_t data[] = ">";
43 CPDF_StreamParser parser(data, 5); 43 CPDF_StreamParser parser(data, 5);
44 EXPECT_EQ("", parser.ReadHexString()); 44 EXPECT_EQ("", parser.ReadHexString());
45 EXPECT_EQ(1u, parser.GetPos()); 45 EXPECT_EQ(1u, parser.GetPos());
46 } 46 }
47 } 47 }
OLDNEW
« no previous file with comments | « core/fpdfapi/page/cpdf_streamparser.cpp ('k') | core/fpdfapi/page/pageint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698