|
proxygen
|
#include <atomic>#include <condition_variable>#include <mutex>#include <thread>#include <folly/Memory.h>#include <folly/experimental/ReadMostlySharedPtr.h>#include <folly/portability/GTest.h>#include <folly/synchronization/Baton.h>Go to the source code of this file.
Classes | |
| class | ReadMostlySharedPtrTest |
| class | TestObject |
| class | Coordinator |
| class | TestRefCount |
Functions | |
| TEST_F (ReadMostlySharedPtrTest, BasicStores) | |
| TEST_F (ReadMostlySharedPtrTest, BasicLoads) | |
| TEST_F (ReadMostlySharedPtrTest, LoadsFromThreads) | |
| TEST_F (ReadMostlySharedPtrTest, Ctor) | |
| TEST_F (ReadMostlySharedPtrTest, ClearingCache) | |
| TEST_F (ReadMostlySharedPtrTest, ReadMostlyMainPtrDeleter) | |
| TEST_F (ReadMostlySharedPtrTest, nullptr) | |
| TEST_F (ReadMostlySharedPtrTest, getStdShared) | |
Variables | |
| const unsigned int | TEST_TIMEOUT = 10 |
| size_t | useGlobalCalls = 0 |
| TEST_F | ( | ReadMostlySharedPtrTest | , |
| BasicStores | |||
| ) |
Definition at line 80 of file ReadMostlySharedPtrTest.cpp.
References EXPECT_EQ, ptr, and folly::ReadMostlyMainPtr< T, RefCount >::reset().
| TEST_F | ( | ReadMostlySharedPtrTest | , |
| BasicLoads | |||
| ) |
Definition at line 99 of file ReadMostlySharedPtrTest.cpp.
References EXPECT_EQ, folly::ReadMostlyMainPtr< T, RefCount >::get(), ptr, folly::ReadMostlyMainPtr< T, RefCount >::reset(), folly::ReadMostlySharedPtr< T, RefCount >::reset(), and x.
| TEST_F | ( | ReadMostlySharedPtrTest | , |
| LoadsFromThreads | |||
| ) |
Definition at line 134 of file ReadMostlySharedPtrTest.cpp.
References Coordinator::completed(), EXPECT_EQ, folly::ReadMostlyMainPtr< T, RefCount >::getShared(), ptr, Coordinator::requestAndWait(), folly::ReadMostlyMainPtr< T, RefCount >::reset(), and Coordinator::waitForRequest().
| TEST_F | ( | ReadMostlySharedPtrTest | , |
| Ctor | |||
| ) |
Definition at line 199 of file ReadMostlySharedPtrTest.cpp.
References EXPECT_EQ, folly::ReadMostlyMainPtr< T, RefCount >::getShared(), and ptr.
| TEST_F | ( | ReadMostlySharedPtrTest | , |
| ClearingCache | |||
| ) |
Definition at line 210 of file ReadMostlySharedPtrTest.cpp.
References c, Coordinator::completed(), EXPECT_EQ, folly::ReadMostlyMainPtr< T, RefCount >::getShared(), ptr, Coordinator::requestAndWait(), folly::ReadMostlyMainPtr< T, RefCount >::reset(), folly::pushmi::detail::t, and Coordinator::waitForRequest().
| TEST_F | ( | ReadMostlySharedPtrTest | , |
| ReadMostlyMainPtrDeleter | |||
| ) |
Definition at line 277 of file ReadMostlySharedPtrTest.cpp.
References folly::ReadMostlyMainPtrDeleter< RefCount >::add(), EXPECT_EQ, folly::gen::move, and useGlobalCalls.
| TEST_F | ( | ReadMostlySharedPtrTest | , |
| nullptr | |||
| ) |
Definition at line 299 of file ReadMostlySharedPtrTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_NE, EXPECT_TRUE, and ptr.
| TEST_F | ( | ReadMostlySharedPtrTest | , |
| getStdShared | |||
| ) |
Definition at line 336 of file ReadMostlySharedPtrTest.cpp.
References folly::ReadMostlyMainPtr< T, RefCount >::getShared(), folly::ReadMostlyMainPtr< T, RefCount >::getStdShared(), folly::ReadMostlyMainPtr< T, RefCount >::reset(), and SUCCEED.
| const unsigned int TEST_TIMEOUT = 10 |
Definition at line 34 of file ReadMostlySharedPtrTest.cpp.
Referenced by ReadMostlySharedPtrTest::ReadMostlySharedPtrTest().
| size_t useGlobalCalls = 0 |
Definition at line 240 of file ReadMostlySharedPtrTest.cpp.
Referenced by TEST_F(), and TestRefCount::useGlobal().