Move folly/Hash.h to folly/hash/, leaving a shim
[folly.git] / folly / experimental / test / StringKeyedTest.cpp
index 3fbcc021f9a907458bd5065f7af7211b4a5b7a4d..072500b5f400604893793da3d5beeeb0a407d6aa 100644 (file)
@@ -25,8 +25,8 @@
 
 #include <glog/logging.h>
 
-#include <folly/Hash.h>
 #include <folly/Range.h>
+#include <folly/hash/Hash.h>
 #include <folly/portability/GFlags.h>
 #include <folly/portability/GTest.h>
 
@@ -106,25 +106,26 @@ struct MemoryLeakCheckerAllocator {
     return alloc_ == other.alloc_;
   }
 
-private:
+ private:
   Alloc alloc_;
 };
 
-typedef MemoryLeakCheckerAllocator<std::allocator<char>> KeyLeakChecker;
-typedef MemoryLeakCheckerAllocator<
-  std::allocator<std::pair<const StringPiece, int>>> ValueLeakChecker;
+using KeyValuePairLeakChecker = MemoryLeakCheckerAllocator<
+    std::allocator<std::pair<const StringPiece, int>>>;
+using ValueLeakChecker =
+    MemoryLeakCheckerAllocator<std::allocator<StringPiece>>;
 
 typedef StringKeyedUnorderedMap<
     int,
     folly::Hash,
     std::equal_to<StringPiece>,
-    ValueLeakChecker>
+    KeyValuePairLeakChecker>
     LeakCheckedUnorderedMap;
 
 typedef StringKeyedSetBase<std::less<StringPiece>, ValueLeakChecker>
     LeakCheckedSet;
 
-typedef StringKeyedMap<int, std::less<StringPiece>, ValueLeakChecker>
+typedef StringKeyedMap<int, std::less<StringPiece>, KeyValuePairLeakChecker>
     LeakCheckedMap;
 
 using LeakCheckedUnorderedSet = BasicStringKeyedUnorderedSet<