OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 const char* greekLocales[] = { | 208 const char* greekLocales[] = { |
209 "el", "el-GR", "el_GR", "el@foo=bar", "el-US", "EL", "el-gr", "eL", | 209 "el", "el-GR", "el_GR", "el@foo=bar", "el-US", "EL", "el-gr", "eL", |
210 }; | 210 }; |
211 const char* nonGreekLocales[] = { | 211 const char* nonGreekLocales[] = { |
212 "en", "en-US", "en_US", "en@foo=bar", "EN", "En", | 212 "en", "en-US", "en_US", "en@foo=bar", "EN", "En", |
213 "ja", "tr", "az", "fil", "fi", "lt", | 213 "ja", "tr", "az", "fil", "fi", "lt", |
214 }; | 214 }; |
215 const char* lithuanianLocales[] = { | 215 const char* lithuanianLocales[] = { |
216 "lt", "lt-LT", "lt_LT", "lt@foo=bar", "lt-US", "LT", "lt-lt", "lT", | 216 "lt", "lt-LT", "lt_LT", "lt@foo=bar", "lt-US", "LT", "lt-lt", "lT", |
217 }; | 217 }; |
218 // Should not have "tr" or "az" because "lt" and 'tr/az' rules conflict with eac
h other. | 218 // Should not have "tr" or "az" because "lt" and 'tr/az' rules conflict with |
| 219 // each other. |
219 const char* nonLithuanianLocales[] = { | 220 const char* nonLithuanianLocales[] = { |
220 "en", "en-US", "en_US", "en@foo=bar", "EN", "En", "ja", "fil", "fi", "el", | 221 "en", "en-US", "en_US", "en@foo=bar", "EN", "En", "ja", "fil", "fi", "el", |
221 }; | 222 }; |
222 | 223 |
223 TEST(StringTest, ToUpperLocale) { | 224 TEST(StringTest, ToUpperLocale) { |
224 CaseFoldingTestData testDataList[] = { | 225 CaseFoldingTestData testDataList[] = { |
225 { | 226 { |
226 "Turkic input", turkicInput, turkicLocales, | 227 "Turkic input", turkicInput, turkicLocales, |
227 sizeof(turkicLocales) / sizeof(const char*), | 228 sizeof(turkicLocales) / sizeof(const char*), |
228 "IS\xC4\xB0\xC4\xB0 \xC4\xB0SII", | 229 "IS\xC4\xB0\xC4\xB0 \xC4\xB0SII", |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 EXPECT_EQ(CString("<null>"), toCStringThroughPrinter(String())); | 480 EXPECT_EQ(CString("<null>"), toCStringThroughPrinter(String())); |
480 | 481 |
481 static const UChar unicodeSample[] = {0x30C6, 0x30B9, | 482 static const UChar unicodeSample[] = {0x30C6, 0x30B9, |
482 0x30C8}; // "Test" in Japanese. | 483 0x30C8}; // "Test" in Japanese. |
483 EXPECT_EQ(CString("\"\\u30C6\\u30B9\\u30C8\""), | 484 EXPECT_EQ(CString("\"\\u30C6\\u30B9\\u30C8\""), |
484 toCStringThroughPrinter( | 485 toCStringThroughPrinter( |
485 String(unicodeSample, WTF_ARRAY_LENGTH(unicodeSample)))); | 486 String(unicodeSample, WTF_ARRAY_LENGTH(unicodeSample)))); |
486 } | 487 } |
487 | 488 |
488 } // namespace WTF | 489 } // namespace WTF |
OLD | NEW |