mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
ICU-2804 add UnicodeString test for \x{...}
X-SVN-Rev: 11861
This commit is contained in:
parent
239a55e4ce
commit
800f4020cb
1 changed files with 2 additions and 1 deletions
|
@ -1159,7 +1159,7 @@ UnicodeStringTest::TestStackAllocation()
|
|||
* Test the unescape() function.
|
||||
*/
|
||||
void UnicodeStringTest::TestUnescape(void) {
|
||||
UnicodeString IN("abc\\u4567 \\n\\r \\U00101234xyz");
|
||||
UnicodeString IN("abc\\u4567 \\n\\r \\U00101234xyz\\x1\\x{5289}\\x1b");
|
||||
UnicodeString OUT("abc");
|
||||
OUT.append((UChar)0x4567);
|
||||
OUT.append(" ");
|
||||
|
@ -1168,6 +1168,7 @@ void UnicodeStringTest::TestUnescape(void) {
|
|||
OUT.append(" ");
|
||||
OUT.append((UChar32)0x00101234);
|
||||
OUT.append("xyz");
|
||||
OUT.append((UChar32)1).append((UChar32)0x5289).append((UChar)0x1b);
|
||||
UnicodeString result = IN.unescape();
|
||||
if (result != OUT) {
|
||||
errln("FAIL: " + prettify(IN) + ".unescape() -> " +
|
||||
|
|
Loading…
Add table
Reference in a new issue