OLD | NEW |
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/fpdf_parser/include/fpdf_parser_decode.h" | 5 #include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h" |
6 | 6 |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 #include "testing/test_support.h" | 8 #include "testing/test_support.h" |
9 | 9 |
10 TEST(fpdf_parser_decode, A85Decode) { | 10 TEST(fpdf_parser_decode, A85Decode) { |
11 pdfium::DecodeTestData test_data[] = { | 11 pdfium::DecodeTestData test_data[] = { |
12 // Empty src string. | 12 // Empty src string. |
13 STR_IN_OUT_CASE("", "", 0), | 13 STR_IN_OUT_CASE("", "", 0), |
14 // Empty content in src string. | 14 // Empty content in src string. |
15 STR_IN_OUT_CASE("~>", "", 0), | 15 STR_IN_OUT_CASE("~>", "", 0), |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 HexDecode(ptr->input, ptr->input_size, result, result_size)) | 69 HexDecode(ptr->input, ptr->input_size, result, result_size)) |
70 << "for case " << i; | 70 << "for case " << i; |
71 ASSERT_EQ(ptr->expected_size, result_size); | 71 ASSERT_EQ(ptr->expected_size, result_size); |
72 for (size_t j = 0; j < result_size; ++j) { | 72 for (size_t j = 0; j < result_size; ++j) { |
73 EXPECT_EQ(ptr->expected[j], result[j]) << "for case " << i << " char " | 73 EXPECT_EQ(ptr->expected[j], result[j]) << "for case " << i << " char " |
74 << j; | 74 << j; |
75 } | 75 } |
76 FX_Free(result); | 76 FX_Free(result); |
77 } | 77 } |
78 } | 78 } |
OLD | NEW |