Changeset 234411 in webkit
- Timestamp:
- Jul 31, 2018 2:20:57 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r234344 r234411 1 2018-07-31 Tomas Popela <tpopela@redhat.com> 2 3 [WTF] String::formatWithArguments() is unused 4 https://bugs.webkit.org/show_bug.cgi?id=187955 5 6 Reviewed by Darin Adler. 7 8 This method is unused, remove it. 9 10 * wtf/text/WTFString.cpp: 11 (WTF::String::formatWithArguments): Deleted. 12 * wtf/text/WTFString.h: 13 1 14 2018-07-28 Mark Lam <mark.lam@apple.com> 2 15 -
trunk/Source/WTF/wtf/text/WTFString.cpp
r234278 r234411 500 500 } 501 501 502 String String::formatWithArguments(const char *format, va_list args)503 {504 return createWithFormatAndArguments(format, args);505 }506 507 502 String String::format(const char *format, ...) 508 503 { -
trunk/Source/WTF/wtf/text/WTFString.h
r234278 r234411 264 264 265 265 WTF_EXPORT_PRIVATE static String format(const char *, ...) WTF_ATTRIBUTE_PRINTF(1, 2); 266 WTF_EXPORT_PRIVATE static String formatWithArguments(const char *, va_list) WTF_ATTRIBUTE_PRINTF(1, 0);267 266 268 267 // Returns an uninitialized string. The characters needs to be written -
trunk/Tools/ChangeLog
r234398 r234411 1 2018-07-31 Tomas Popela <tpopela@redhat.com> 2 3 [WTF] String::formatWithArguments() is unused 4 https://bugs.webkit.org/show_bug.cgi?id=187955 5 6 Reviewed by Darin Adler. 7 8 Remove tests for WTF::String::formatWithArguments() as it's unused and 9 we are removing it. 10 11 * TestWebKitAPI/Tests/WTF/WTFString.cpp: 12 1 13 2018-07-30 Aakash Jain <aakash_jain@apple.com> 2 14 -
trunk/Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp
r234278 r234411 461 461 } 462 462 463 WTF_ATTRIBUTE_PRINTF(2, 3)464 static void testWithFormatAndArguments(const char* expected, const char* format, ...)465 {466 va_list arguments;467 va_start(arguments, format);468 469 #if COMPILER(GCC_OR_CLANG)470 #pragma GCC diagnostic push471 #pragma GCC diagnostic ignored "-Wformat-nonliteral"472 #endif473 String result = String::formatWithArguments(format, arguments);474 #if COMPILER(GCC_OR_CLANG)475 #pragma GCC diagnostic pop476 #endif477 478 va_end(arguments);479 480 EXPECT_STREQ(expected, result.utf8().data());481 }482 483 TEST(WTF, StringFormatWithArguments)484 {485 testWithFormatAndArguments("hello cruel world", "%s %s %s", "hello", "cruel" , "world");486 487 testWithFormatAndArguments("hello 17890 world", "%s%u%s", "hello ", 17890u, " world");488 489 testWithFormatAndArguments("hello 17890.000 world", "%s %.3f %s", "hello", 17890.0f, "world");490 testWithFormatAndArguments("hello 17890.50 world", "%s %.2f %s", "hello", 17890.5f, "world");491 492 testWithFormatAndArguments("hello -17890 world", "%s %.0f %s", "hello", -17890.0f, "world");493 testWithFormatAndArguments("hello -17890.5 world", "%s %.1f %s", "hello", -17890.5f, "world");494 495 testWithFormatAndArguments("hello 17890 world", "%s %.0f %s", "hello", 17890.0, "world");496 testWithFormatAndArguments("hello 17890.5 world", "%s %.1f %s", "hello", 17890.5, "world");497 498 testWithFormatAndArguments("hello -17890 world", "%s %.0f %s", "hello", -17890.0, "world");499 testWithFormatAndArguments("hello -17890.5 world", "%s %.1f %s", "hello", -17890.5, "world");500 }501 502 463 TEST(WTF, StringSplitWithConsecutiveSeparators) 503 464 {
Note: See TracChangeset
for help on using the changeset viewer.