| Index: base/strings/string_util_unittest.cc
|
| diff --git a/base/strings/string_util_unittest.cc b/base/strings/string_util_unittest.cc
|
| index 187e49e6698160e5629283371766f3df4629b09a..765ba83508c6a1948ecbbe4eb4461b20d5d410e9 100644
|
| --- a/base/strings/string_util_unittest.cc
|
| +++ b/base/strings/string_util_unittest.cc
|
| @@ -1080,6 +1080,26 @@ TEST(StringUtilTest, EqualsCaseInsensitiveASCII) {
|
| EXPECT_FALSE(EqualsCaseInsensitiveASCII("Asdf", "aSDFz"));
|
| }
|
|
|
| +TEST(StringUtilTest, IsUnicodeWhitespace) {
|
| + // NOT unicode white space.
|
| + EXPECT_FALSE(IsUnicodeWhitespace(L'\0'));
|
| + EXPECT_FALSE(IsUnicodeWhitespace(L'A'));
|
| + EXPECT_FALSE(IsUnicodeWhitespace(L'0'));
|
| + EXPECT_FALSE(IsUnicodeWhitespace(L'.'));
|
| + EXPECT_FALSE(IsUnicodeWhitespace(L';'));
|
| + EXPECT_FALSE(IsUnicodeWhitespace(L'\x4100'));
|
| +
|
| + // Actual unicode whitespace.
|
| + EXPECT_TRUE(IsUnicodeWhitespace(L' '));
|
| + EXPECT_TRUE(IsUnicodeWhitespace(L'\xa0'));
|
| + EXPECT_TRUE(IsUnicodeWhitespace(L'\x3000'));
|
| + EXPECT_TRUE(IsUnicodeWhitespace(L'\t'));
|
| + EXPECT_TRUE(IsUnicodeWhitespace(L'\r'));
|
| + EXPECT_TRUE(IsUnicodeWhitespace(L'\v'));
|
| + EXPECT_TRUE(IsUnicodeWhitespace(L'\f'));
|
| + EXPECT_TRUE(IsUnicodeWhitespace(L'\n'));
|
| +}
|
| +
|
| class WriteIntoTest : public testing::Test {
|
| protected:
|
| static void WritesCorrectly(size_t num_chars) {
|
|
|