From 8dee586fc018b6a1c85a1c64700fe7f0570792e0 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Fri, 22 Mar 2024 10:51:46 -0700 Subject: [PATCH] Fix failing test on Windows by avoiding using escape sequence in string literal --- .../source/test/intltest/messageformat2test_fromjson.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/icu4c/source/test/intltest/messageformat2test_fromjson.cpp b/icu4c/source/test/intltest/messageformat2test_fromjson.cpp index 4e041288db6e..1ed0eebeab10 100644 --- a/icu4c/source/test/intltest/messageformat2test_fromjson.cpp +++ b/icu4c/source/test/intltest/messageformat2test_fromjson.cpp @@ -588,7 +588,13 @@ void TestMessageFormat2::runSpecTests(IcuTestErrorCode& errorCode) { .build(); TestUtils::runTestCase(*this, test, errorCode); - test = testBuilder.setPattern("hello {\u3000world\r}") + // TODO: + // For some reason, this test fails on Windows if + // `pattern` is replaced with "hello {\\u3000world\r}". + UnicodeString pattern("hello {"); + pattern += ((UChar32) 0x3000); + pattern += "world\r}"; + test = testBuilder.setPattern(pattern) .setExpected("hello world") .build(); TestUtils::runTestCase(*this, test, errorCode);