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

Side by Side Diff: Source/wtf/text/StringImplTest.cpp

Issue 1152163005: Speed up case folding for 8-bit strings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added a unit test 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 unified diff | Download patch
« no previous file with comments | « Source/wtf/text/StringImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 19 matching lines...) Expand all
30 #include <gtest/gtest.h> 30 #include <gtest/gtest.h>
31 31
32 namespace { 32 namespace {
33 33
34 TEST(WTF, StringImplCreate8Bit) 34 TEST(WTF, StringImplCreate8Bit)
35 { 35 {
36 RefPtr<StringImpl> testStringImpl = StringImpl::create("1224"); 36 RefPtr<StringImpl> testStringImpl = StringImpl::create("1224");
37 ASSERT_TRUE(testStringImpl->is8Bit()); 37 ASSERT_TRUE(testStringImpl->is8Bit());
38 } 38 }
39 39
40 TEST(WTF, StringImplLatin1CaseFoldTable)
41 {
42 LChar symbol = 0xff;
43 while (symbol--) {
44 EXPECT_EQ(WTF::Unicode::foldCase(symbol), StringImpl::latin1CaseFoldTabl e[symbol]);
45 }
46 }
47
48
40 } // namespace 49 } // namespace
OLDNEW
« 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