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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 | 6 |
Tom Sepez
2016/02/17 21:32:26
no space, sort order.
dsinclair
2016/02/17 21:54:00
Done.
| |
7 #include "font_int.h" | 7 #include "core/src/fpdfapi/fpdf_font/font_int.h" |
8 | 8 |
9 namespace { | 9 namespace { |
10 | 10 |
11 bool uint_ranges_equal(uint8_t* a, uint8_t* b, size_t count) { | 11 bool uint_ranges_equal(uint8_t* a, uint8_t* b, size_t count) { |
12 for (size_t i = 0; i < count; ++i) { | 12 for (size_t i = 0; i < count; ++i) { |
13 if (a[i] != b[i]) | 13 if (a[i] != b[i]) |
14 return false; | 14 return false; |
15 } | 15 } |
16 return true; | 16 return true; |
17 } | 17 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 EXPECT_EQ(1, range.m_CharSize); | 57 EXPECT_EQ(1, range.m_CharSize); |
58 EXPECT_EQ(161, range.m_Lower[0]); | 58 EXPECT_EQ(161, range.m_Lower[0]); |
59 EXPECT_EQ(243, range.m_Upper[0]); | 59 EXPECT_EQ(243, range.m_Upper[0]); |
60 | 60 |
61 // The second string should return 0's if it is shorter | 61 // The second string should return 0's if it is shorter |
62 EXPECT_TRUE(CPDF_CMapParser::CMap_GetCodeRange(range, "<a1>", "")); | 62 EXPECT_TRUE(CPDF_CMapParser::CMap_GetCodeRange(range, "<a1>", "")); |
63 EXPECT_EQ(1, range.m_CharSize); | 63 EXPECT_EQ(1, range.m_CharSize); |
64 EXPECT_EQ(161, range.m_Lower[0]); | 64 EXPECT_EQ(161, range.m_Lower[0]); |
65 EXPECT_EQ(0, range.m_Upper[0]); | 65 EXPECT_EQ(0, range.m_Upper[0]); |
66 } | 66 } |
OLD | NEW |