proxygen
|
#include <folly/futures/Future.h>
#include <folly/futures/Promise.h>
#include <folly/portability/GTest.h>
#include <folly/synchronization/Baton.h>
Go to the source code of this file.
Functions | |
TEST (Interrupt, raise) | |
TEST (Interrupt, cancel) | |
TEST (Interrupt, handleThenInterrupt) | |
TEST (Interrupt, interruptThenHandle) | |
TEST (Interrupt, interruptAfterFulfilNoop) | |
TEST (Interrupt, secondInterruptNoop) | |
TEST (Interrupt, futureWithinTimedOut) | |
TEST (Interrupt, semiFutureWithinTimedOut) | |
TEST | ( | Interrupt | , |
raise | |||
) |
Definition at line 24 of file InterruptTest.cpp.
References EXPECT_THROW, folly::Promise< T >::getFuture(), folly::Promise< T >::setInterruptHandler(), and folly::exception_wrapper::throw_exception().
TEST | ( | Interrupt | , |
cancel | |||
) |
Definition at line 33 of file InterruptTest.cpp.
References EXPECT_THROW, folly::Promise< T >::getFuture(), folly::Promise< T >::setInterruptHandler(), and folly::exception_wrapper::throw_exception().
TEST | ( | Interrupt | , |
handleThenInterrupt | |||
) |
Definition at line 41 of file InterruptTest.cpp.
References EXPECT_TRUE, flag, folly::Promise< T >::getFuture(), and folly::Promise< T >::setInterruptHandler().
TEST | ( | Interrupt | , |
interruptThenHandle | |||
) |
Definition at line 49 of file InterruptTest.cpp.
References EXPECT_TRUE, flag, folly::Promise< T >::getFuture(), and folly::Promise< T >::setInterruptHandler().
TEST | ( | Interrupt | , |
interruptAfterFulfilNoop | |||
) |
Definition at line 57 of file InterruptTest.cpp.
References EXPECT_FALSE, flag, folly::Promise< T >::getFuture(), folly::Promise< T >::setInterruptHandler(), and folly::Promise< T >::setValue().
TEST | ( | Interrupt | , |
secondInterruptNoop | |||
) |
Definition at line 66 of file InterruptTest.cpp.
References count, EXPECT_EQ, f, folly::Promise< T >::getFuture(), and folly::Promise< T >::setInterruptHandler().
TEST | ( | Interrupt | , |
futureWithinTimedOut | |||
) |
Definition at line 76 of file InterruptTest.cpp.
References EXPECT_TRUE, folly::Promise< T >::getFuture(), folly::Baton< MayBlock, Atom >::post(), folly::Promise< T >::setInterruptHandler(), and folly::Baton< MayBlock, Atom >::try_wait_for().
TEST | ( | Interrupt | , |
semiFutureWithinTimedOut | |||
) |
Definition at line 85 of file InterruptTest.cpp.
References EXPECT_TRUE, folly::Promise< T >::getSemiFuture(), folly::Baton< MayBlock, Atom >::post(), folly::Promise< T >::setInterruptHandler(), and folly::Baton< MayBlock, Atom >::try_wait_for().