OLD | NEW |
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/cpdf_simple_parser.h" | 5 #include "core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "core/fpdfapi/fpdf_parser/fpdf_parser_utility.h" | 9 #include "core/fpdfapi/fpdf_parser/fpdf_parser_utility.h" |
10 #include "core/include/fxcrt/fx_basic.h" | 10 #include "core/include/fxcrt/fx_basic.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "testing/test_support.h" | 12 #include "testing/test_support.h" |
13 | 13 |
14 TEST(SimpleParserTest, GetWord) { | 14 TEST(SimpleParserTest, GetWord) { |
15 pdfium::StrFuncTestData test_data[] = { | 15 pdfium::StrFuncTestData test_data[] = { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 }; | 87 }; |
88 for (size_t i = 0; i < FX_ArraySize(test_data); ++i) { | 88 for (size_t i = 0; i < FX_ArraySize(test_data); ++i) { |
89 const FindTagTestStruct& data = test_data[i]; | 89 const FindTagTestStruct& data = test_data[i]; |
90 CPDF_SimpleParser parser(data.input, data.input_size); | 90 CPDF_SimpleParser parser(data.input, data.input_size); |
91 EXPECT_EQ(data.result, | 91 EXPECT_EQ(data.result, |
92 parser.FindTagParamFromStart(data.token, data.num_params)) | 92 parser.FindTagParamFromStart(data.token, data.num_params)) |
93 << " for case " << i; | 93 << " for case " << i; |
94 EXPECT_EQ(data.result_pos, parser.GetCurPos()) << " for case " << i; | 94 EXPECT_EQ(data.result_pos, parser.GetCurPos()) << " for case " << i; |
95 } | 95 } |
96 } | 96 } |
OLD | NEW |