Title: [239920] trunk/Tools
Revision
239920
Author
[email protected]
Date
2019-01-14 02:59:06 -0800 (Mon, 14 Jan 2019)

Log Message

[WPE] Workaround for incorrect template specialization being selected when UChar=char16_t
https://bugs.webkit.org/show_bug.cgi?id=193332

Reviewed by Michael Catanzaro.

* TestWebKitAPI/Tests/WTF/StringConcatenate.cpp: When UChar is
defined as a char16_t, which changed in ICU 59, the
StringTypeAdapter<UnsignedInt, ...> overload catches casts to
unsigned short. This test is relying on the behaviour that
UChar=unsigned short, which doesn't hold across platforms and ICU
library versions. The full fix would be a special syntax for
literal characters so that these ambiguities do not arise. That
work is proposed in https://bugs.webkit.org/show_bug.cgi?id=193101.
(TestWebKitAPI::TEST):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (239919 => 239920)


--- trunk/Tools/ChangeLog	2019-01-14 10:32:03 UTC (rev 239919)
+++ trunk/Tools/ChangeLog	2019-01-14 10:59:06 UTC (rev 239920)
@@ -1,3 +1,20 @@
+2019-01-14  Charlie Turner  <[email protected]>
+
+        [WPE] Workaround for incorrect template specialization being selected when UChar=char16_t
+        https://bugs.webkit.org/show_bug.cgi?id=193332
+
+        Reviewed by Michael Catanzaro.
+
+        * TestWebKitAPI/Tests/WTF/StringConcatenate.cpp: When UChar is
+        defined as a char16_t, which changed in ICU 59, the
+        StringTypeAdapter<UnsignedInt, ...> overload catches casts to
+        unsigned short. This test is relying on the behaviour that
+        UChar=unsigned short, which doesn't hold across platforms and ICU
+        library versions. The full fix would be a special syntax for
+        literal characters so that these ambiguities do not arise. That
+        work is proposed in https://bugs.webkit.org/show_bug.cgi?id=193101.
+        (TestWebKitAPI::TEST):
+
 2019-01-14  Carlos Garcia Campos  <[email protected]>
 
         Unreviewed. [GTK][WPE] Run distcheck with gtkdoc and MiniBrowser enabled

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/StringConcatenate.cpp (239919 => 239920)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/StringConcatenate.cpp	2019-01-14 10:32:03 UTC (rev 239919)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/StringConcatenate.cpp	2019-01-14 10:59:06 UTC (rev 239920)
@@ -30,6 +30,7 @@
 #include <wtf/text/StringConcatenateNumbers.h>
 #include <cstddef>
 #include <cstdint>
+#include <unicode/uvernum.h>
 
 namespace TestWebKitAPI {
 
@@ -81,7 +82,7 @@
     EXPECT_EQ("hello 0 world", makeString("hello ", 0u , " world"));
 
     EXPECT_EQ("hello 42 world", makeString("hello ", static_cast<unsigned char>(42) , " world"));
-#if PLATFORM(WIN)
+#if PLATFORM(WIN) || U_ICU_VERSION_MAJOR_NUM >= 59
     EXPECT_EQ("hello 42 world", makeString("hello ", static_cast<unsigned short>(42) , " world"));
 #else
     EXPECT_EQ("hello * world", makeString("hello ", static_cast<unsigned short>(42) , " world")); // Treated as a character.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to