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

Unified Diff: Source/wtf/StringHasherTest.cpp

Issue 1184043002: Fix unit test style in Source/wtf/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: apply review comments 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/StringExtrasTest.cpp ('k') | Source/wtf/TemporaryChangeTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/StringHasherTest.cpp
diff --git a/Source/wtf/StringHasherTest.cpp b/Source/wtf/StringHasherTest.cpp
index f7557b6c6f6ec3aee8a5bb7515df7f4312a7178b..2b7f75990f89055af518e63ec8193d196c450681 100644
--- a/Source/wtf/StringHasherTest.cpp
+++ b/Source/wtf/StringHasherTest.cpp
@@ -24,33 +24,37 @@
*/
#include "config.h"
-
#include "wtf/StringHasher.h"
+
#include <gtest/gtest.h>
+namespace WTF {
+
namespace {
-static const LChar nullLChars[2] = { 0, 0 };
-static const UChar nullUChars[2] = { 0, 0 };
+const LChar nullLChars[2] = { 0, 0 };
+const UChar nullUChars[2] = { 0, 0 };
+
+const unsigned emptyStringHash = 0x4EC889EU;
+const unsigned singleNullCharacterHash = 0x3D3ABF44U;
-static const unsigned emptyStringHash = 0x4EC889EU;
-static const unsigned singleNullCharacterHash = 0x3D3ABF44U;
+const LChar testALChars[6] = { 0x41, 0x95, 0xFF, 0x50, 0x01, 0 };
+const UChar testAUChars[6] = { 0x41, 0x95, 0xFF, 0x50, 0x01, 0 };
+const UChar testBUChars[6] = { 0x41, 0x95, 0xFFFF, 0x1080, 0x01, 0 };
-static const LChar testALChars[6] = { 0x41, 0x95, 0xFF, 0x50, 0x01, 0 };
-static const UChar testAUChars[6] = { 0x41, 0x95, 0xFF, 0x50, 0x01, 0 };
-static const UChar testBUChars[6] = { 0x41, 0x95, 0xFFFF, 0x1080, 0x01, 0 };
+const unsigned testAHash1 = 0xEA32B004;
+const unsigned testAHash2 = 0x93F0F71E;
+const unsigned testAHash3 = 0xCB609EB1;
+const unsigned testAHash4 = 0x7984A706;
+const unsigned testAHash5 = 0x0427561F;
-static const unsigned testAHash1 = 0xEA32B004;
-static const unsigned testAHash2 = 0x93F0F71E;
-static const unsigned testAHash3 = 0xCB609EB1;
-static const unsigned testAHash4 = 0x7984A706;
-static const unsigned testAHash5 = 0x0427561F;
+const unsigned testBHash1 = 0xEA32B004;
+const unsigned testBHash2 = 0x93F0F71E;
+const unsigned testBHash3 = 0x59EB1B2C;
+const unsigned testBHash4 = 0xA7BCCC0A;
+const unsigned testBHash5 = 0x79201649;
-static const unsigned testBHash1 = 0xEA32B004;
-static const unsigned testBHash2 = 0x93F0F71E;
-static const unsigned testBHash3 = 0x59EB1B2C;
-static const unsigned testBHash4 = 0xA7BCCC0A;
-static const unsigned testBHash5 = 0x79201649;
+} // anonymous namespace
TEST(StringHasherTest, StringHasher)
{
@@ -406,4 +410,4 @@ TEST(StringHasherTest, StringHasher_hashMemory)
EXPECT_EQ(testBHash5 & 0xFFFFFF, StringHasher::hashMemory<10>(testBUChars));
}
-} // namespace
+} // namespace WTF
« no previous file with comments | « Source/wtf/StringExtrasTest.cpp ('k') | Source/wtf/TemporaryChangeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698