proxygen
|
#include <thread>
#include <folly/experimental/observer/SimpleObservable.h>
#include <folly/portability/GTest.h>
#include <folly/synchronization/Baton.h>
Go to the source code of this file.
Functions | |
TEST (Observer, Observable) | |
TEST (Observer, MakeObserver) | |
TEST (Observer, MakeObserverDiamond) | |
TEST (Observer, CreateException) | |
TEST (Observer, NullValue) | |
TEST (Observer, Cycle) | |
TEST (Observer, Stress) | |
TEST (Observer, TLObserver) | |
TEST (Observer, SubscribeCallback) | |
TEST (Observer, SetCallback) | |
int | makeObserverRecursion (int n) |
TEST (Observer, NestedMakeObserver) | |
int makeObserverRecursion | ( | int | n | ) |
Definition at line 354 of file ObserverTest.cpp.
References folly::observer::makeObserver().
Referenced by TEST().
TEST | ( | Observer | , |
Observable | |||
) |
Definition at line 25 of file ObserverTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, folly::observer::SimpleObservable< T >::getObserver(), folly::observer::makeObserver(), folly::Baton< MayBlock, Atom >::post(), folly::Baton< MayBlock, Atom >::reset(), folly::observer::SimpleObservable< T >::setValue(), and folly::Baton< MayBlock, Atom >::try_wait_for().
TEST | ( | Observer | , |
MakeObserver | |||
) |
Definition at line 46 of file ObserverTest.cpp.
References child, EXPECT_EQ, EXPECT_TRUE, folly::observer::SimpleObservable< T >::getObserver(), folly::observer::makeObserver(), folly::Baton< MayBlock, Atom >::post(), folly::Baton< MayBlock, Atom >::reset(), folly::observer::SimpleObservable< T >::setValue(), and folly::Baton< MayBlock, Atom >::try_wait_for().
TEST | ( | Observer | , |
MakeObserverDiamond | |||
) |
Definition at line 69 of file ObserverTest.cpp.
References child, EXPECT_EQ, EXPECT_TRUE, folly::observer::SimpleObservable< T >::getObserver(), folly::observer::makeObserver(), and folly::observer::SimpleObservable< T >::setValue().
TEST | ( | Observer | , |
CreateException | |||
) |
Definition at line 99 of file ObserverTest.cpp.
References EXPECT_THROW, and folly::observer::makeObserver().
TEST | ( | Observer | , |
NullValue | |||
) |
Definition at line 112 of file ObserverTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, folly::observer::SimpleObservable< T >::getObserver(), folly::observer::makeObserver(), folly::observer::SimpleObservable< T >::setValue(), and folly::value().
TEST | ( | Observer | , |
Cycle | |||
) |
Definition at line 149 of file ObserverTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, folly::observer::SimpleObservable< T >::getObserver(), i, folly::observer::makeObserver(), folly::observer::SimpleObservable< T >::setValue(), and folly::value().
TEST | ( | Observer | , |
Stress | |||
) |
Definition at line 207 of file ObserverTest.cpp.
References child, EXPECT_EQ, EXPECT_LE, EXPECT_LT, folly::observer::SimpleObservable< T >::getObserver(), i, folly::observer::makeObserver(), folly::observer::SimpleObservable< T >::setValue(), folly::value(), values(), and folly::fibers::yield().
TEST | ( | Observer | , |
TLObserver | |||
) |
Definition at line 251 of file ObserverTest.cpp.
References EXPECT_EQ, k, folly::observer::makeTLObserver(), and folly::value().
TEST | ( | Observer | , |
SubscribeCallback | |||
) |
Definition at line 263 of file ObserverTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, folly::gen::move, and subscribe().
TEST | ( | Observer | , |
SetCallback | |||
) |
Definition at line 322 of file ObserverTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, folly::observer::SimpleObservable< T >::getObserver(), folly::Baton< MayBlock, Atom >::post(), folly::Baton< MayBlock, Atom >::reset(), folly::observer::SimpleObservable< T >::setValue(), folly::Baton< MayBlock, Atom >::timed_wait(), and folly::Baton< MayBlock, Atom >::wait().
TEST | ( | Observer | , |
NestedMakeObserver | |||
) |