Chromium Code Reviews| Index: Source/wtf/HashMapTest.cpp |
| diff --git a/Source/wtf/HashMapTest.cpp b/Source/wtf/HashMapTest.cpp |
| index 6fe352e06ab685ad4be453f54e746d88b5a2c234..3e6ea9074a9e214f78e284c82bdf9010ae543f8e 100644 |
| --- a/Source/wtf/HashMapTest.cpp |
| +++ b/Source/wtf/HashMapTest.cpp |
| @@ -24,8 +24,8 @@ |
| */ |
| #include "config.h" |
| - |
| #include "wtf/HashMap.h" |
| + |
| #include "wtf/OwnPtr.h" |
| #include "wtf/PassOwnPtr.h" |
| #include "wtf/PassRefPtr.h" |
| @@ -33,9 +33,11 @@ |
| #include "wtf/Vector.h" |
| #include <gtest/gtest.h> |
| +namespace WTF { |
| + |
| namespace { |
| -typedef WTF::HashMap<int, int> IntHashMap; |
| +using IntHashMap = HashMap<int, int>; |
| TEST(HashMapTest, IteratorComparison) |
| { |
| @@ -59,9 +61,9 @@ struct TestDoubleHashTraits : HashTraits<double> { |
| static const unsigned minimumTableSize = 8; |
| }; |
| -typedef HashMap<double, int64_t, DefaultHash<double>::Hash, TestDoubleHashTraits> DoubleHashMap; |
| +using DoubleHashMap = HashMap<double, int64_t, DefaultHash<double>::Hash, TestDoubleHashTraits>; |
| -static int bucketForKey(double key) |
| +int bucketForKey(double key) |
| { |
| return DefaultHash<double>::Hash::hash(key) & (TestDoubleHashTraits::minimumTableSize - 1); |
| } |
| @@ -102,7 +104,7 @@ private: |
| int* m_destructNumber; |
| }; |
| -typedef WTF::HashMap<int, OwnPtr<DestructCounter>> OwnPtrHashMap; |
| +using OwnPtrHashMap = HashMap<int, OwnPtr<DestructCounter>>; |
| TEST(HashMapTest, OwnPtrAsValue) |
| { |
| @@ -137,7 +139,6 @@ TEST(HashMapTest, OwnPtrAsValue) |
| EXPECT_EQ(2, destructNumber); |
| } |
| - |
| class DummyRefCounted: public WTF::RefCounted<DummyRefCounted> { |
|
kochi
2015/06/15 03:34:22
One space between DummyRefCounted and ':'.
WTF:: n
tkent
2015/06/15 04:45:57
Done.
|
| public: |
| DummyRefCounted(bool& isDeleted) : m_isDeleted(isDeleted) { m_isDeleted = false; } |
| @@ -242,7 +243,7 @@ public: |
| private: |
| int m_v; |
| }; |
| -typedef HashMap<int, OwnPtr<SimpleClass>> IntSimpleMap; |
| +using IntSimpleMap = HashMap<int, OwnPtr<SimpleClass>>; |
| TEST(HashMapTest, AddResult) |
| { |
| @@ -302,4 +303,6 @@ TEST(HashMapTest, ValueTypeDestructed) |
| EXPECT_EQ(0, InstanceCounter::counter); |
| } |
| -} // namespace |
| +} // anonymous namespace |
| + |
| +} // namespace WTF |