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

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: rebased 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
« no previous file with comments | « 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 129d335ea9a8863d9b61aced569f1b8584d63503..66cf6370575e91a79756585de2b5ad831776f677 100644
--- a/Source/wtf/text/WTFStringTest.cpp
+++ b/Source/wtf/text/WTFStringTest.cpp
@@ -339,4 +339,12 @@ TEST(WTF, StartsWithIgnoringASCIICase)
EXPECT_FALSE(startsWithIgnoringASCIICase(nonASCII, allASCIIDifferent));
}
+TEST(StringTest, Lower)
+{
+ EXPECT_STREQ("link", String("LINK").lower().ascii().data());
+ EXPECT_STREQ("link", String("lInk").lower().ascii().data());
+ EXPECT_STREQ("lin\xE1k", String("lIn\xC1k").lower().latin1().data());
+ EXPECT_STREQ("link", String::fromUTF8("LIN\xE2\x84\xAA").lower().utf8().data());
+}
+
} // namespace WTF
« no previous file with comments | « Source/wtf/text/StringImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698