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

Unified Diff: Source/wtf/HashSetTest.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/HashMapTest.cpp ('k') | Source/wtf/ListHashSetTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/HashSetTest.cpp
diff --git a/Source/wtf/HashSetTest.cpp b/Source/wtf/HashSetTest.cpp
index 888495aa9ff79ce686daa5889cb6f829e3ba948d..420077f4854a4b3e6f035d6fc0a08f7cbafd4324 100644
--- a/Source/wtf/HashSetTest.cpp
+++ b/Source/wtf/HashSetTest.cpp
@@ -24,24 +24,26 @@
*/
#include "config.h"
-
#include "wtf/HashSet.h"
+
#include "wtf/OwnPtr.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/RefCounted.h"
#include <gtest/gtest.h>
-namespace {
+namespace WTF {
template<int initialCapacity>
- struct InitialCapacityTestHashTraits : public WTF::UnsignedWithZeroKeyHashTraits<int> {
+struct InitialCapacityTestHashTraits : public UnsignedWithZeroKeyHashTraits<int> {
static const int minimumTableSize = initialCapacity;
};
+namespace {
+
template<unsigned size>
void testInitialCapacity()
{
- const unsigned initialCapacity = WTF::HashTableCapacityForSize<size>::value;
+ const unsigned initialCapacity = HashTableCapacityForSize<size>::value;
HashSet<int, DefaultHash<int>::Hash, InitialCapacityTestHashTraits<initialCapacity>> testSet;
// Initial capacity is null.
@@ -163,7 +165,7 @@ TEST(HashSetTest, HashSetOwnPtr)
EXPECT_EQ(ptr2, ownPtr2);
}
-class DummyRefCounted: public WTF::RefCounted<DummyRefCounted> {
+class DummyRefCounted : public RefCounted<DummyRefCounted> {
public:
DummyRefCounted(bool& isDeleted) : m_isDeleted(isDeleted) { m_isDeleted = false; }
~DummyRefCounted() { m_isDeleted = true; }
@@ -208,5 +210,6 @@ TEST(HashSetTest, HashSetRefPtr)
EXPECT_EQ(1, DummyRefCounted::s_refInvokesCount);
}
+} // anonymous namespace
-} // namespace
+} // namespace WTF
« no previous file with comments | « Source/wtf/HashMapTest.cpp ('k') | Source/wtf/ListHashSetTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698