| 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_font/font_int.h" | 5 #include "core/fpdfapi/font/font_int.h" |
| 6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
| 7 | 7 |
| 8 namespace { | 8 namespace { |
| 9 | 9 |
| 10 bool uint_ranges_equal(uint8_t* a, uint8_t* b, size_t count) { | 10 bool uint_ranges_equal(uint8_t* a, uint8_t* b, size_t count) { |
| 11 for (size_t i = 0; i < count; ++i) { | 11 for (size_t i = 0; i < count; ++i) { |
| 12 if (a[i] != b[i]) | 12 if (a[i] != b[i]) |
| 13 return false; | 13 return false; |
| 14 } | 14 } |
| 15 return true; | 15 return true; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 EXPECT_EQ(1, range.m_CharSize); | 61 EXPECT_EQ(1, range.m_CharSize); |
| 62 EXPECT_EQ(161, range.m_Lower[0]); | 62 EXPECT_EQ(161, range.m_Lower[0]); |
| 63 EXPECT_EQ(243, range.m_Upper[0]); | 63 EXPECT_EQ(243, range.m_Upper[0]); |
| 64 | 64 |
| 65 // The second string should return 0's if it is shorter | 65 // The second string should return 0's if it is shorter |
| 66 EXPECT_TRUE(CPDF_CMapParser::CMap_GetCodeRange(range, "<a1>", "")); | 66 EXPECT_TRUE(CPDF_CMapParser::CMap_GetCodeRange(range, "<a1>", "")); |
| 67 EXPECT_EQ(1, range.m_CharSize); | 67 EXPECT_EQ(1, range.m_CharSize); |
| 68 EXPECT_EQ(161, range.m_Lower[0]); | 68 EXPECT_EQ(161, range.m_Lower[0]); |
| 69 EXPECT_EQ(0, range.m_Upper[0]); | 69 EXPECT_EQ(0, range.m_Upper[0]); |
| 70 } | 70 } |
| OLD | NEW |