| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium 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 "platform/text/Character.h" | 5 #include "platform/text/Character.h" |
| 6 | 6 |
| 7 #include "platform/wtf/text/CharacterNames.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "wtf/text/CharacterNames.h" | |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 testing::AssertionResult isCJKIdeographOrSymbolWithMessage(UChar32 codepoint) { | 12 testing::AssertionResult isCJKIdeographOrSymbolWithMessage(UChar32 codepoint) { |
| 13 const size_t formatBufferSize = 10; | 13 const size_t formatBufferSize = 10; |
| 14 char formattedAsHex[formatBufferSize]; | 14 char formattedAsHex[formatBufferSize]; |
| 15 snprintf(formattedAsHex, formatBufferSize, "0x%x", codepoint); | 15 snprintf(formattedAsHex, formatBufferSize, "0x%x", codepoint); |
| 16 | 16 |
| 17 if (Character::isCJKIdeographOrSymbol(codepoint)) { | 17 if (Character::isCJKIdeographOrSymbol(codepoint)) { |
| 18 return testing::AssertionSuccess() << "Codepoint " << formattedAsHex | 18 return testing::AssertionSuccess() << "Codepoint " << formattedAsHex |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 testChar = base + objectReplacementCharacter; | 299 testChar = base + objectReplacementCharacter; |
| 300 EXPECT_FALSE(Character::treatAsZeroWidthSpaceInComplexScript(testChar)); | 300 EXPECT_FALSE(Character::treatAsZeroWidthSpaceInComplexScript(testChar)); |
| 301 | 301 |
| 302 testChar = base + 0xA; | 302 testChar = base + 0xA; |
| 303 EXPECT_FALSE(Character::isNormalizedCanvasSpaceCharacter(testChar)); | 303 EXPECT_FALSE(Character::isNormalizedCanvasSpaceCharacter(testChar)); |
| 304 testChar = base + 0x9; | 304 testChar = base + 0x9; |
| 305 EXPECT_FALSE(Character::isNormalizedCanvasSpaceCharacter(testChar)); | 305 EXPECT_FALSE(Character::isNormalizedCanvasSpaceCharacter(testChar)); |
| 306 } | 306 } |
| 307 | 307 |
| 308 } // namespace blink | 308 } // namespace blink |
| OLD | NEW |