proxygen
|
#include <folly/experimental/StringKeyedMap.h>
#include <folly/experimental/StringKeyedSet.h>
#include <folly/experimental/StringKeyedUnorderedMap.h>
#include <folly/experimental/StringKeyedUnorderedSet.h>
#include <list>
#include <string>
#include <glog/logging.h>
#include <folly/Range.h>
#include <folly/hash/Hash.h>
#include <folly/portability/GFlags.h>
#include <folly/portability/GTest.h>
Go to the source code of this file.
Classes | |
struct | MemoryLeakCheckerAllocator< Alloc > |
struct | MemoryLeakCheckerAllocator< Alloc >::rebind< U > |
Typedefs | |
using | KeyValuePairLeakChecker = MemoryLeakCheckerAllocator< std::allocator< std::pair< const StringPiece, int >>> |
using | ValueLeakChecker = MemoryLeakCheckerAllocator< std::allocator< StringPiece >> |
using | LeakCheckedUnorderedMap = StringKeyedUnorderedMap< int, folly::transparent< folly::hasher< StringPiece >>, folly::transparent< std::equal_to< StringPiece >>, MemoryLeakCheckerAllocator< std::allocator< std::pair< const std::string, int >>>> |
typedef StringKeyedSetBase< std::less< StringPiece >, ValueLeakChecker > | LeakCheckedSet |
typedef StringKeyedMap< int, std::less< StringPiece >, KeyValuePairLeakChecker > | LeakCheckedMap |
using | LeakCheckedUnorderedSet = BasicStringKeyedUnorderedSet< folly::transparent< folly::hasher< StringPiece >>, folly::transparent< std::equal_to< folly::StringPiece >>, MemoryLeakCheckerAllocator< std::allocator< std::string >>> |
Functions | |
TEST (StringKeyedUnorderedMapTest, sanity) | |
TEST (StringKeyedUnorderedMapTest, constructors) | |
TEST (StringKeyedSetTest, sanity) | |
TEST (StringKeyedSetTest, constructors) | |
TEST (StringKeyedUnorderedSetTest, sanity) | |
TEST (StringKeyedUnorderedSetTest, constructors) | |
TEST (StringKeyedMapTest, sanity) | |
TEST (StringKeyedMapTest, constructors) | |
int | main (int argc, char **argv) |
TEST (StringKeyed, memory_balance) | |
Variables | |
static unsigned long long | allocated = 0 |
static unsigned long long | freed = 0 |
using KeyValuePairLeakChecker = MemoryLeakCheckerAllocator< std::allocator<std::pair<const StringPiece, int>>> |
Definition at line 110 of file StringKeyedTest.cpp.
typedef StringKeyedMap<int, std::less<StringPiece>, KeyValuePairLeakChecker> LeakCheckedMap |
Definition at line 125 of file StringKeyedTest.cpp.
typedef StringKeyedSetBase<std::less<StringPiece>, ValueLeakChecker> LeakCheckedSet |
Definition at line 122 of file StringKeyedTest.cpp.
using LeakCheckedUnorderedMap = StringKeyedUnorderedMap< int, folly::transparent<folly::hasher<StringPiece>>, folly::transparent<std::equal_to<StringPiece>>, MemoryLeakCheckerAllocator< std::allocator<std::pair<const std::string, int>>>> |
Definition at line 119 of file StringKeyedTest.cpp.
using LeakCheckedUnorderedSet = BasicStringKeyedUnorderedSet< folly::transparent<folly::hasher<StringPiece>>, folly::transparent<std::equal_to<folly::StringPiece>>, MemoryLeakCheckerAllocator<std::allocator<std::string>>> |
Definition at line 130 of file StringKeyedTest.cpp.
using ValueLeakChecker = MemoryLeakCheckerAllocator<std::allocator<StringPiece>> |
Definition at line 112 of file StringKeyedTest.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 508 of file StringKeyedTest.cpp.
References testing::InitGoogleTest(), and RUN_ALL_TESTS().
TEST | ( | StringKeyedUnorderedMapTest | , |
sanity | |||
) |
Definition at line 132 of file StringKeyedTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, folly::StringKeyedUnorderedMap< Mapped, Hash, Eq, Alloc >::insert(), map(), and s.
TEST | ( | StringKeyedUnorderedMapTest | , |
constructors | |||
) |
Definition at line 161 of file StringKeyedTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, and folly::gen::move.
TEST | ( | StringKeyedSetTest | , |
sanity | |||
) |
Definition at line 215 of file StringKeyedTest.cpp.
References folly::empty(), folly::test::end(), EXPECT_EQ, EXPECT_FALSE, EXPECT_NE, EXPECT_TRUE, s, and folly::size().
TEST | ( | StringKeyedSetTest | , |
constructors | |||
) |
Definition at line 249 of file StringKeyedTest.cpp.
References folly::StringKeyedSetBase< Compare, Alloc >::emplace(), folly::StringKeyedSetBase< Compare, Alloc >::erase(), EXPECT_EQ, EXPECT_NE, EXPECT_TRUE, folly::StringKeyedSetBase< Compare, Alloc >::insert(), and folly::gen::move.
TEST | ( | StringKeyedUnorderedSetTest | , |
sanity | |||
) |
Definition at line 300 of file StringKeyedTest.cpp.
References folly::empty(), folly::test::end(), EXPECT_EQ, EXPECT_FALSE, EXPECT_NE, EXPECT_TRUE, s, and folly::size().
TEST | ( | StringKeyedUnorderedSetTest | , |
constructors | |||
) |
Definition at line 329 of file StringKeyedTest.cpp.
References EXPECT_EQ, EXPECT_GE, EXPECT_NE, EXPECT_TRUE, and folly::gen::move.
TEST | ( | StringKeyedMapTest | , |
sanity | |||
) |
Definition at line 425 of file StringKeyedTest.cpp.
References folly::StringKeyedMap< Value, Compare, Alloc >::emplace(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, folly::gen::first, folly::StringKeyedMap< Value, Compare, Alloc >::insert(), map(), and s.
TEST | ( | StringKeyedMapTest | , |
constructors | |||
) |
Definition at line 459 of file StringKeyedTest.cpp.
References folly::StringKeyedMap< Value, Compare, Alloc >::erase(), EXPECT_EQ, EXPECT_TRUE, and folly::gen::move.
TEST | ( | StringKeyed | , |
memory_balance | |||
) |
|
static |
Definition at line 40 of file StringKeyedTest.cpp.
Referenced by MemoryLeakCheckerAllocator< Alloc >::allocate(), producerConsumerBench(), and TEST().
|
static |
Definition at line 41 of file StringKeyedTest.cpp.
Referenced by MemoryLeakCheckerAllocator< Alloc >::deallocate(), TEST(), and wangle::SSLStats::~SSLStats().