proxygen
|
#include <folly/Memory.h>
#include <limits>
#include <memory>
#include <type_traits>
#include <utility>
#include <glog/logging.h>
#include <folly/ConstexprMath.h>
#include <folly/String.h>
#include <folly/memory/Arena.h>
#include <folly/portability/GMock.h>
#include <folly/portability/GTest.h>
Go to the source code of this file.
Classes | |
struct | CountedAllocatorStats |
class | CountedAllocator< T > |
struct | ExpectingAlloc< T > |
struct | OverAlignedType |
Functions | |
TEST (allocateBytes, simple) | |
TEST (aligned_malloc, examples) | |
TEST (make_unique, compatible_with_std_make_unique) | |
TEST (to_weak_ptr, example) | |
TEST (SysAllocator, equality) | |
TEST (SysAllocator, allocate_unique) | |
TEST (SysAllocator, vector) | |
TEST (SysAllocator, bad_alloc) | |
TEST (AlignedSysAllocator, equality_fixed) | |
TEST (AlignedSysAllocator, allocate_unique_fixed) | |
TEST (AlignedSysAllocator, vector_fixed) | |
TEST (AlignedSysAllocator, bad_alloc_fixed) | |
TEST (AlignedSysAllocator, equality_default) | |
TEST (AlignedSysAllocator, allocate_unique_default) | |
TEST (AlignedSysAllocator, vector_default) | |
TEST (AlignedSysAllocator, bad_alloc_default) | |
TEST (AlignedSysAllocator, converting_constructor) | |
TEST (allocate_sys_buffer, compiles) | |
TEST (allocate_unique, ctor_failure) | |
TEST (AllocatorObjectLifecycleTraits, compiles) | |
TEST (allocateOverAligned, notActuallyOver) | |
TEST (allocateOverAligned, manualOverStdAlloc) | |
TEST (allocateOverAligned, manualOverCustomAlloc) | |
TEST (allocateOverAligned, defaultOverCustomAlloc) | |
Variables | |
static constexpr std::size_t | kTooBig |
TEST | ( | allocateBytes | , |
simple | |||
) |
Definition at line 38 of file MemoryTest.cpp.
References folly::allocateBytes(), folly::deallocateBytes(), and EXPECT_TRUE.
TEST | ( | aligned_malloc | , |
examples | |||
) |
Definition at line 44 of file MemoryTest.cpp.
References folly::aligned_free(), folly::aligned_malloc(), EXPECT_EQ, folly::kIsSanitize, and ptr.
TEST | ( | make_unique | , |
compatible_with_std_make_unique | |||
) |
Definition at line 59 of file MemoryTest.cpp.
References folly::to_shared_ptr().
TEST | ( | to_weak_ptr | , |
example | |||
) |
Definition at line 67 of file MemoryTest.cpp.
References EXPECT_EQ, folly::lock(), s, and folly::to_weak_ptr().
TEST | ( | SysAllocator | , |
equality | |||
) |
Definition at line 74 of file MemoryTest.cpp.
References a, b, EXPECT_FALSE, and EXPECT_TRUE.
TEST | ( | SysAllocator | , |
allocate_unique | |||
) |
Definition at line 81 of file MemoryTest.cpp.
References EXPECT_EQ, and ptr.
TEST | ( | SysAllocator | , |
vector | |||
) |
Definition at line 88 of file MemoryTest.cpp.
References testing::ElementsAreArray(), and EXPECT_THAT.
TEST | ( | SysAllocator | , |
bad_alloc | |||
) |
Definition at line 97 of file MemoryTest.cpp.
References EXPECT_THROW, folly::kIsSanitize, and kTooBig.
TEST | ( | AlignedSysAllocator | , |
equality_fixed | |||
) |
Definition at line 106 of file MemoryTest.cpp.
References a, b, EXPECT_FALSE, and EXPECT_TRUE.
TEST | ( | AlignedSysAllocator | , |
allocate_unique_fixed | |||
) |
Definition at line 113 of file MemoryTest.cpp.
References EXPECT_EQ, and ptr.
TEST | ( | AlignedSysAllocator | , |
vector_fixed | |||
) |
Definition at line 121 of file MemoryTest.cpp.
References testing::ElementsAreArray(), EXPECT_EQ, and EXPECT_THAT.
TEST | ( | AlignedSysAllocator | , |
bad_alloc_fixed | |||
) |
Definition at line 131 of file MemoryTest.cpp.
References EXPECT_THROW, folly::kIsSanitize, and kTooBig.
TEST | ( | AlignedSysAllocator | , |
equality_default | |||
) |
Definition at line 140 of file MemoryTest.cpp.
References a, b, c, EXPECT_FALSE, and EXPECT_TRUE.
TEST | ( | AlignedSysAllocator | , |
allocate_unique_default | |||
) |
Definition at line 149 of file MemoryTest.cpp.
References EXPECT_EQ, and ptr.
TEST | ( | AlignedSysAllocator | , |
vector_default | |||
) |
Definition at line 157 of file MemoryTest.cpp.
References testing::ElementsAreArray(), EXPECT_EQ, and EXPECT_THAT.
TEST | ( | AlignedSysAllocator | , |
bad_alloc_default | |||
) |
Definition at line 167 of file MemoryTest.cpp.
References EXPECT_THROW, folly::kIsSanitize, and kTooBig.
TEST | ( | AlignedSysAllocator | , |
converting_constructor | |||
) |
Definition at line 176 of file MemoryTest.cpp.
TEST | ( | allocate_sys_buffer | , |
compiles | |||
) |
Definition at line 183 of file MemoryTest.cpp.
References folly::allocate_sys_buffer().
TEST | ( | allocate_unique | , |
ctor_failure | |||
) |
Definition at line 206 of file MemoryTest.cpp.
References testing::Args(), CountedAllocatorStats::deallocates, destroy(), EXPECT_EQ, EXPECT_NE, EXPECT_THROW, and ptr.
TEST | ( | AllocatorObjectLifecycleTraits | , |
compiles | |||
) |
Definition at line 274 of file MemoryTest.cpp.
References string, and folly::value().
TEST | ( | allocateOverAligned | , |
notActuallyOver | |||
) |
Definition at line 371 of file MemoryTest.cpp.
References a, folly::allocationBytesForOverAligned(), and EXPECT_EQ.
TEST | ( | allocateOverAligned | , |
manualOverStdAlloc | |||
) |
Definition at line 381 of file MemoryTest.cpp.
References a, folly::aligned_free(), folly::allocationBytesForOverAligned(), and EXPECT_EQ.
TEST | ( | allocateOverAligned | , |
manualOverCustomAlloc | |||
) |
Definition at line 394 of file MemoryTest.cpp.
References a, folly::allocationBytesForOverAligned(), and EXPECT_EQ.
TEST | ( | allocateOverAligned | , |
defaultOverCustomAlloc | |||
) |
Definition at line 407 of file MemoryTest.cpp.
References a, folly::allocateOverAligned(), folly::allocationBytesForOverAligned(), folly::deallocateOverAligned(), and EXPECT_EQ.
|
static |
Definition at line 34 of file MemoryTest.cpp.
Referenced by TEST().