Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Unified Diff: Source/wtf/text/WTFStringTest.cpp

Issue 1181013008: Optimize StringImpl::lower() for 8-bit strings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« Source/wtf/text/StringImpl.cpp ('K') | « Source/wtf/text/StringImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/text/WTFStringTest.cpp
diff --git a/Source/wtf/text/WTFStringTest.cpp b/Source/wtf/text/WTFStringTest.cpp
index 26f882e5faa176193b583962342fc13bb81b63bf..f3ab0730b697c3e03b8b4869167068da42432525 100644
--- a/Source/wtf/text/WTFStringTest.cpp
+++ b/Source/wtf/text/WTFStringTest.cpp
@@ -335,4 +335,12 @@ TEST(WTF, StartsWithIgnoringASCIICase)
EXPECT_FALSE(startsWithIgnoringASCIICase(nonASCII, allASCIIDifferent));
}
+TEST(WTFString, lower)
tkent 2015/06/15 01:12:56 TEST(StringTest, Lower)
+{
+ ASSERT_STREQ("link", String("LINK").lower().ascii().data());
tkent 2015/06/15 01:12:56 Use EXPECT_STREQ. Same for the following lines.
+ ASSERT_STREQ("link", String("lInk").lower().ascii().data());
+ ASSERT_STREQ("lin\xE1k", String("lIn\xC1k").lower().latin1().data());
+ ASSERT_STREQ("link", String::fromUTF8("LIN\xE2\x84\xAA").lower().utf8().data());
+}
+
} // namespace
« Source/wtf/text/StringImpl.cpp ('K') | « Source/wtf/text/StringImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698