proxygen
|
#include <numeric>
#include <boost/thread/barrier.hpp>
#include <folly/Random.h>
#include <folly/futures/Future.h>
#include <folly/portability/GTest.h>
#include <folly/small_vector.h>
Go to the source code of this file.
Classes | |
struct | NotDefaultConstructible |
Typedefs | |
typedef FutureException | eggs_t |
Functions | |
TEST (Collect, collectAll) | |
TEST (Collect, collect) | |
TEST (Collect, collectNotDefaultConstructible) | |
TEST (Collect, collectAny) | |
TEST (Collect, collectAnyWithoutException) | |
TEST (Collect, alreadyCompleted) | |
TEST (Collect, parallel) | |
TEST (Collect, parallelWithError) | |
TEST (Collect, allParallel) | |
TEST (Collect, allParallelWithError) | |
TEST (Collect, collectN) | |
TEST (Collect, collectNParallel) | |
TEST (Collect, smallVector) | |
Ensure that we can compile collectAll/Any with folly::small_vector. More... | |
TEST (Collect, collectAllVariadic) | |
TEST (Collect, collectAllVariadicReferences) | |
TEST (Collect, collectAllVariadicWithException) | |
TEST (Collect, collectVariadic) | |
TEST (Collect, collectVariadicWithException) | |
TEST (Collect, collectAllNone) | |
TEST (Collect, noDefaultConstructor) | |
Variables | |
static eggs_t | eggs ("eggs") |
auto | rng = std::mt19937(folly::randomNumberSeed()) |
typedef FutureException eggs_t |
Definition at line 28 of file CollectTest.cpp.
TEST | ( | Collect | , |
collectAll | |||
) |
Definition at line 33 of file CollectTest.cpp.
References folly::collectAll(), folly::collectAllSemiFuture(), eggs, EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, f, rng, folly::pushmi::detail::t, and folly::value().
TEST | ( | Collect | , |
collect | |||
) |
Definition at line 114 of file CollectTest.cpp.
References folly::collect(), eggs, EXPECT_EQ, EXPECT_FALSE, EXPECT_THROW, EXPECT_TRUE, i, and rng.
TEST | ( | Collect | , |
collectNotDefaultConstructible | |||
) |
Definition at line 251 of file CollectTest.cpp.
References folly::collect(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, i, rng, and val.
TEST | ( | Collect | , |
collectAny | |||
) |
Definition at line 277 of file CollectTest.cpp.
References folly::collectAny(), eggs, EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, f, and i.
TEST | ( | Collect | , |
collectAnyWithoutException | |||
) |
Definition at line 345 of file CollectTest.cpp.
References folly::collectAnyWithoutException(), eggs, folly::pushmi::executor, EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, i, folly::InlineExecutor::instance(), folly::gen::move, and v.
TEST | ( | Collect | , |
alreadyCompleted | |||
) |
Definition at line 437 of file CollectTest.cpp.
References folly::collectAllSemiFuture(), folly::collectAny(), EXPECT_EQ, i, and folly::makeFuture().
TEST | ( | Collect | , |
parallel | |||
) |
Definition at line 459 of file CollectTest.cpp.
References folly::collect(), EXPECT_EQ, EXPECT_TRUE, f, and i.
TEST | ( | Collect | , |
parallelWithError | |||
) |
Definition at line 488 of file CollectTest.cpp.
References folly::collect(), eggs, EXPECT_THROW, EXPECT_TRUE, f, and i.
TEST | ( | Collect | , |
allParallel | |||
) |
Definition at line 519 of file CollectTest.cpp.
References folly::collectAll(), EXPECT_EQ, EXPECT_TRUE, f, and i.
TEST | ( | Collect | , |
allParallelWithError | |||
) |
Definition at line 549 of file CollectTest.cpp.
References folly::collectAll(), eggs, EXPECT_EQ, EXPECT_THROW, EXPECT_TRUE, f, and i.
TEST | ( | Collect | , |
collectN | |||
) |
Definition at line 587 of file CollectTest.cpp.
References folly::collectN(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, flag, and folly::InlineExecutor::instance().
TEST | ( | Collect | , |
collectNParallel | |||
) |
Definition at line 615 of file CollectTest.cpp.
References folly::collectN(), EXPECT_EQ, EXPECT_TRUE, flag, i, and folly::InlineExecutor::instance().
TEST | ( | Collect | , |
smallVector | |||
) |
Ensure that we can compile collectAll/Any with folly::small_vector.
Definition at line 654 of file CollectTest.cpp.
References folly::collectAll(), folly::collectAny(), i, folly::makeFuture(), folly::small_vector< Value, RequestedMaxInline, PolicyA, PolicyB, PolicyC >::push_back(), and folly::value().
TEST | ( | Collect | , |
collectAllVariadic | |||
) |
Definition at line 682 of file CollectTest.cpp.
References folly::collectAllSemiFuture(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, flag, folly::Promise< T >::getFuture(), folly::gen::move, folly::Promise< T >::setValue(), and folly::value().
TEST | ( | Collect | , |
collectAllVariadicReferences | |||
) |
Definition at line 703 of file CollectTest.cpp.
References folly::collectAllSemiFuture(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, flag, folly::Promise< T >::getFuture(), folly::Promise< T >::setValue(), and folly::value().
TEST | ( | Collect | , |
collectAllVariadicWithException | |||
) |
Definition at line 723 of file CollectTest.cpp.
References folly::collectAllSemiFuture(), eggs, EXPECT_EQ, EXPECT_FALSE, EXPECT_THROW, EXPECT_TRUE, flag, folly::Promise< T >::getFuture(), folly::gen::move, folly::Promise< T >::setException(), folly::Promise< T >::setValue(), and folly::value().
TEST | ( | Collect | , |
collectVariadic | |||
) |
Definition at line 744 of file CollectTest.cpp.
References folly::collect(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, flag, folly::Promise< T >::getFuture(), folly::gen::move, and folly::Promise< T >::setValue().
TEST | ( | Collect | , |
collectVariadicWithException | |||
) |
Definition at line 761 of file CollectTest.cpp.
References folly::collect(), eggs, EXPECT_FALSE, EXPECT_THROW, EXPECT_TRUE, f, folly::Promise< T >::getFuture(), folly::gen::move, folly::Promise< T >::setException(), and folly::Promise< T >::setValue().
TEST | ( | Collect | , |
collectAllNone | |||
) |
Definition at line 775 of file CollectTest.cpp.
References folly::collectAll(), EXPECT_TRUE, and f.
TEST | ( | Collect | , |
noDefaultConstructor | |||
) |
Definition at line 781 of file CollectTest.cpp.
References folly::collect(), f, folly::makeFuture(), and folly::gen::move.
auto rng = std::mt19937(folly::randomNumberSeed()) |
Definition at line 31 of file CollectTest.cpp.
Referenced by accuracy_test(), BENCHMARK(), concurrentOps(), concurrentPopforSharedBuffer(), concurrentPush(), concurrentSizeTest(), DSchedMixedTest(), folly::sync_tests::getRNG(), proxygen::parse(), proxygen::parseUnidirectional(), folly::SSLContext::passwordCollector(), producer_consumer_test(), folly::Random::rand32(), folly::Random::rand64(), folly::Random::randDouble01(), detail::randomBytes(), folly::io::test::RandomDataHolder::RandomDataHolder(), folly::futures::detail::retryingPolicyCappedJitteredExponentialBackoff(), folly::futures::retryingPolicyCappedJitteredExponentialBackoff(), folly::gen::sample(), folly::Random::secureRandDouble(), singleThreadTest(), folly::test::TEST(), TEST(), TEST_F(), and throughtput_test().