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

Side by Side Diff: core/src/fpdfapi/fpdf_parser/cpdf_object_unittest.cpp

Issue 1776913007: Split fpdf_parser_objects.cpp into per-class .cpp/.h files. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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 // 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 "core/include/fpdfapi/fpdf_objects.h" 5 #include "core/include/fpdfapi/cpdf_array.h"
6 #include "core/include/fpdfapi/cpdf_boolean.h"
7 #include "core/include/fpdfapi/cpdf_dictionary.h"
8 #include "core/include/fpdfapi/cpdf_name.h"
9 #include "core/include/fpdfapi/cpdf_null.h"
10 #include "core/include/fpdfapi/cpdf_number.h"
11 #include "core/include/fpdfapi/cpdf_reference.h"
12 #include "core/include/fpdfapi/cpdf_string.h"
13 #include "core/include/fpdfapi/cpdf_stream.h"
dsinclair 2016/03/10 21:23:45 Can this test be split to per object type? Or, fil
Tom Sepez 2016/03/10 22:05:19 we'll split it later, that was my intent.
6 14
7 #include <memory> 15 #include <memory>
8 #include <string> 16 #include <string>
9 #include <vector> 17 #include <vector>
10 18
19 #include "core/include/fpdfapi/cpdf_indirect_object_holder.h"
11 #include "core/include/fxcrt/fx_basic.h" 20 #include "core/include/fxcrt/fx_basic.h"
12 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
13 22
14 namespace { 23 namespace {
15 24
16 using ScopedArray = std::unique_ptr<CPDF_Array, ReleaseDeleter<CPDF_Array>>; 25 using ScopedArray = std::unique_ptr<CPDF_Array, ReleaseDeleter<CPDF_Array>>;
17 26
18 void TestArrayAccessors(const CPDF_Array* arr, 27 void TestArrayAccessors(const CPDF_Array* arr,
19 size_t index, 28 size_t index,
20 const char* str_val, 29 const char* str_val,
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 EXPECT_EQ(arr->GetCount(), arr1->GetCount()); 767 EXPECT_EQ(arr->GetCount(), arr1->GetCount());
759 for (size_t i = 0; i < arr->GetCount(); ++i) { 768 for (size_t i = 0; i < arr->GetCount(); ++i) {
760 EXPECT_EQ(CPDF_Object::REFERENCE, arr->GetElement(i)->GetType()); 769 EXPECT_EQ(CPDF_Object::REFERENCE, arr->GetElement(i)->GetType());
761 EXPECT_EQ(indirect_objs[i], arr->GetElement(i)->GetDirect()); 770 EXPECT_EQ(indirect_objs[i], arr->GetElement(i)->GetDirect());
762 EXPECT_EQ(indirect_objs[i], arr->GetElementValue(i)); 771 EXPECT_EQ(indirect_objs[i], arr->GetElementValue(i));
763 EXPECT_EQ(CPDF_Object::REFERENCE, arr1->GetElement(i)->GetType()); 772 EXPECT_EQ(CPDF_Object::REFERENCE, arr1->GetElement(i)->GetType());
764 EXPECT_EQ(indirect_objs[i], arr1->GetElement(i)->GetDirect()); 773 EXPECT_EQ(indirect_objs[i], arr1->GetElement(i)->GetDirect());
765 EXPECT_EQ(indirect_objs[i], arr1->GetElementValue(i)); 774 EXPECT_EQ(indirect_objs[i], arr1->GetElementValue(i));
766 } 775 }
767 } 776 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698