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

Side by Side Diff: core/fpdfapi/parser/cpdf_array_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_array.cpp ('k') | core/fpdfapi/parser/cpdf_boolean.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 "core/fpdfapi/fpdf_parser/cpdf_array.h" 5 #include "core/fpdfapi/parser/cpdf_array.h"
6 #include "core/fpdfapi/fpdf_parser/cpdf_number.h" 6 #include "core/fpdfapi/parser/cpdf_number.h"
7 #include "core/fpdfapi/fpdf_parser/cpdf_reference.h" 7 #include "core/fpdfapi/parser/cpdf_reference.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace { 13 namespace {
14 14
15 using ScopedArray = std::unique_ptr<CPDF_Array, ReleaseDeleter<CPDF_Array>>; 15 using ScopedArray = std::unique_ptr<CPDF_Array, ReleaseDeleter<CPDF_Array>>;
16 16
17 } // namespace 17 } // namespace
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 TEST(cpdf_array, Iterator) { 171 TEST(cpdf_array, Iterator) {
172 int elems[] = {-23, -11, 3, 455, 2345877, 172 int elems[] = {-23, -11, 3, 455, 2345877,
173 0, 7895330, -12564334, 10000, -100000}; 173 0, 7895330, -12564334, 10000, -100000};
174 ScopedArray arr(new CPDF_Array); 174 ScopedArray arr(new CPDF_Array);
175 for (size_t i = 0; i < FX_ArraySize(elems); ++i) 175 for (size_t i = 0; i < FX_ArraySize(elems); ++i)
176 arr->InsertAt(i, new CPDF_Number(elems[i])); 176 arr->InsertAt(i, new CPDF_Number(elems[i]));
177 size_t index = 0; 177 size_t index = 0;
178 for (const auto& it : *arr) 178 for (const auto& it : *arr)
179 EXPECT_EQ(elems[index++], it->AsNumber()->GetInteger()); 179 EXPECT_EQ(elems[index++], it->AsNumber()->GetInteger());
180 } 180 }
OLDNEW
« no previous file with comments | « core/fpdfapi/parser/cpdf_array.cpp ('k') | core/fpdfapi/parser/cpdf_boolean.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698