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

Unified Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp

Issue 1650793002: Remove the m_V5Type member variable from CPDF_Parser. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 11 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 | « core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp
index e091f14cbe84ac74f8837b57b510623ca9f32d58..b39eb967851d0be4d3c33f6c8087d7f45941ea3b 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp
@@ -290,9 +290,10 @@ TEST(fpdf_parser_parser, LoadCrossRefV4) {
ASSERT_TRUE(parser.LoadCrossRefV4(0, 0, FALSE));
const FX_FILESIZE offsets[] = {0, 17, 81, 0, 331, 409};
const uint8_t types[] = {0, 1, 1, 0, 1, 1};
- for (size_t i = 0; i < FX_ArraySize(offsets); ++i)
+ for (size_t i = 0; i < FX_ArraySize(offsets); ++i) {
EXPECT_EQ(offsets[i], parser.m_ObjectInfo[i].pos);
- ASSERT_TRUE(CompareArray(parser.m_V5Type, types, FX_ArraySize(types)));
+ EXPECT_EQ(types[i], parser.m_ObjectInfo[i].type);
+ }
}
{
const unsigned char xref_table[] =
@@ -315,9 +316,10 @@ TEST(fpdf_parser_parser, LoadCrossRefV4) {
const FX_FILESIZE offsets[] = {0, 0, 0, 25325, 0, 0, 0,
0, 25518, 25635, 0, 0, 25777};
const uint8_t types[] = {0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1};
- for (size_t i = 0; i < FX_ArraySize(offsets); ++i)
+ for (size_t i = 0; i < FX_ArraySize(offsets); ++i) {
EXPECT_EQ(offsets[i], parser.m_ObjectInfo[i].pos);
- ASSERT_TRUE(CompareArray(parser.m_V5Type, types, FX_ArraySize(types)));
+ EXPECT_EQ(types[i], parser.m_ObjectInfo[i].type);
+ }
}
{
const unsigned char xref_table[] =
@@ -340,9 +342,10 @@ TEST(fpdf_parser_parser, LoadCrossRefV4) {
const FX_FILESIZE offsets[] = {0, 0, 0, 25325, 0, 0, 0,
0, 0, 25635, 0, 0, 25777};
const uint8_t types[] = {0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1};
- for (size_t i = 0; i < FX_ArraySize(offsets); ++i)
+ for (size_t i = 0; i < FX_ArraySize(offsets); ++i) {
EXPECT_EQ(offsets[i], parser.m_ObjectInfo[i].pos);
- ASSERT_TRUE(CompareArray(parser.m_V5Type, types, FX_ArraySize(types)));
+ EXPECT_EQ(types[i], parser.m_ObjectInfo[i].type);
+ }
}
{
const unsigned char xref_table[] =
@@ -363,8 +366,9 @@ TEST(fpdf_parser_parser, LoadCrossRefV4) {
ASSERT_TRUE(parser.LoadCrossRefV4(0, 0, FALSE));
const FX_FILESIZE offsets[] = {0, 23, 0, 0, 0, 45, 179};
const uint8_t types[] = {0, 1, 0, 0, 0, 1, 1};
- for (size_t i = 0; i < FX_ArraySize(offsets); ++i)
+ for (size_t i = 0; i < FX_ArraySize(offsets); ++i) {
EXPECT_EQ(offsets[i], parser.m_ObjectInfo[i].pos);
- ASSERT_TRUE(CompareArray(parser.m_V5Type, types, FX_ArraySize(types)));
+ EXPECT_EQ(types[i], parser.m_ObjectInfo[i].type);
+ }
}
}
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698