proxygen
|
#include <array>
#include <cstdarg>
#include <folly/Function.h>
#include <folly/Memory.h>
#include <folly/portability/GTest.h>
Go to the source code of this file.
Classes | |
struct | MemberFunc |
class | CopyMoveTracker |
struct | CopyMoveTracker::ConstructorTag |
struct | VariadicTemplateSum |
struct | VariadicArgumentsSum |
Functions | |
TEST (Function, InvokeFunctor) | |
TEST (Function, InvokeReference) | |
TEST (Function, Emptiness_T) | |
template<bool UseSwapMethod> | |
void | swap_test () |
TEST (Function, SwapMethod) | |
TEST (Function, SwapFunction) | |
TEST (Function, Bind) | |
TEST (Function, NonCopyableLambda) | |
TEST (Function, OverloadedFunctor) | |
TEST (Function, Lambda) | |
TEST (Function, DataMember) | |
TEST (Function, MemberFunction) | |
TEST (Function, CaptureCopyMoveCount) | |
TEST (Function, ParameterCopyMoveCount) | |
TEST (Function, VariadicTemplate) | |
TEST (Function, VariadicArguments) | |
template<typename T > | |
void | for_each (T const &range, Function< void(typename T::value_type const &) const > const &func) |
TEST (Function, SafeCaptureByReference) | |
TEST (Function, IgnoreReturnValue) | |
TEST (Function, ReturnConvertible) | |
TEST (Function, ConvertReturnType) | |
TEST (Function, asStdFunction_void) | |
TEST (Function, asStdFunction_void_const) | |
TEST (Function, asStdFunction_return) | |
TEST (Function, asStdFunction_return_const) | |
TEST (Function, asStdFunction_args) | |
TEST (Function, asStdFunction_args_const) | |
TEST (Function, asSharedProxy_void) | |
TEST (Function, asSharedProxy_void_const) | |
TEST (Function, asSharedProxy_return) | |
TEST (Function, asSharedProxy_return_const) | |
TEST (Function, asSharedProxy_args) | |
TEST (Function, asSharedProxy_args_const) | |
TEST (Function, NoAllocatedMemoryAfterMove) | |
TEST (Function, ConstCastEmbedded) | |
TEST (Function, EmptyAfterConstCast) | |
TEST (Function, SelfStdSwap) | |
TEST (Function, SelfMove) | |
TEST (Function, SelfMove2) | |
TEST (Function, DeducableArguments) | |
TEST (Function, CtorWithCopy) | |
TEST (Function, Bug_T23346238) | |
void for_each | ( | T const & | range, |
Function< void(typename T::value_type const &) const > const & | func | ||
) |
Definition at line 747 of file FunctionTest.cpp.
Referenced by BENCHMARK(), proxygen::HTTP2PriorityQueue::Node::flattenSubtree(), testing::internal::ForEach(), main(), testing::internal::UnitTestImpl::RunAllTests(), runFairness(), testing::internal::TearDownEnvironment(), TEST(), testing::internal::GTestFlagSaver::~GTestFlagSaver(), and folly::test::ManualSchedule::~ManualSchedule().
void swap_test | ( | ) |
Definition at line 270 of file FunctionTest.cpp.
References EXPECT_EQ, folly::f14::swap(), and folly::Function< FunctionType >::swap().
TEST | ( | Function | , |
InvokeFunctor | |||
) |
Definition at line 200 of file FunctionTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, folly::Function< FunctionType >::hasAllocatedMemory(), and folly::gen::move.
TEST | ( | Function | , |
InvokeReference | |||
) |
TEST | ( | Function | , |
Emptiness_T | |||
) |
Definition at line 232 of file FunctionTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_NE, EXPECT_THROW, EXPECT_TRUE, f, g(), h, and i.
TEST | ( | Function | , |
SwapMethod | |||
) |
Definition at line 317 of file FunctionTest.cpp.
TEST | ( | Function | , |
SwapFunction | |||
) |
Definition at line 320 of file FunctionTest.cpp.
TEST | ( | Function | , |
Bind | |||
) |
Definition at line 327 of file FunctionTest.cpp.
References folly::netops::bind(), EXPECT_EQ, EXPECT_THROW, f, and folly::gen::move.
TEST | ( | Function | , |
NonCopyableLambda | |||
) |
Definition at line 340 of file FunctionTest.cpp.
References folly::netops::bind(), data, EXPECT_EQ, EXPECT_TRUE, folly::Function< FunctionType >::hasAllocatedMemory(), and folly::gen::move.
TEST | ( | Function | , |
OverloadedFunctor | |||
) |
Definition at line 367 of file FunctionTest.cpp.
References folly::constCastFunction(), EXPECT_EQ, EXPECT_THROW, folly::gen::move, and x.
TEST | ( | Function | , |
Lambda | |||
) |
Definition at line 466 of file FunctionTest.cpp.
References folly::constCastFunction(), EXPECT_EQ, EXPECT_THROW, folly::gen::move, number, and x.
TEST | ( | Function | , |
DataMember | |||
) |
Definition at line 512 of file FunctionTest.cpp.
References EXPECT_EQ, and MemberFunc::x.
TEST | ( | Function | , |
MemberFunction | |||
) |
Definition at line 527 of file FunctionTest.cpp.
References EXPECT_EQ, MemberFunc::getX(), MemberFunc::setX(), and MemberFunc::x.
TEST | ( | Function | , |
CaptureCopyMoveCount | |||
) |
Definition at line 597 of file FunctionTest.cpp.
References EXPECT_EQ, EXPECT_LE, and folly::gen::move.
TEST | ( | Function | , |
ParameterCopyMoveCount | |||
) |
Definition at line 631 of file FunctionTest.cpp.
References c, EXPECT_EQ, EXPECT_LE, and folly::gen::move.
TEST | ( | Function | , |
VariadicTemplate | |||
) |
Definition at line 703 of file FunctionTest.cpp.
References EXPECT_EQ.
TEST | ( | Function | , |
VariadicArguments | |||
) |
Definition at line 726 of file FunctionTest.cpp.
References EXPECT_EQ.
TEST | ( | Function | , |
SafeCaptureByReference | |||
) |
Definition at line 755 of file FunctionTest.cpp.
References EXPECT_EQ, sum(), and x.
TEST | ( | Function | , |
IgnoreReturnValue | |||
) |
Definition at line 775 of file FunctionTest.cpp.
References EXPECT_EQ, f, g(), folly::gen::move, and x.
TEST | ( | Function | , |
ReturnConvertible | |||
) |
Definition at line 796 of file FunctionTest.cpp.
TEST | ( | Function | , |
ConvertReturnType | |||
) |
Definition at line 837 of file FunctionTest.cpp.
References EXPECT_EQ, folly::gen::move, and x.
TEST | ( | Function | , |
asStdFunction_void | |||
) |
Definition at line 896 of file FunctionTest.cpp.
References EXPECT_EQ, f, i, folly::gen::move, and value.
TEST | ( | Function | , |
asStdFunction_void_const | |||
) |
Definition at line 907 of file FunctionTest.cpp.
References EXPECT_EQ, f, i, folly::gen::move, and value.
TEST | ( | Function | , |
asStdFunction_return | |||
) |
Definition at line 918 of file FunctionTest.cpp.
References EXPECT_EQ, f, i, folly::gen::move, and value.
TEST | ( | Function | , |
asStdFunction_return_const | |||
) |
Definition at line 932 of file FunctionTest.cpp.
References EXPECT_EQ, f, i, folly::gen::move, and value.
TEST | ( | Function | , |
asStdFunction_args | |||
) |
Definition at line 946 of file FunctionTest.cpp.
References EXPECT_EQ, f, i, folly::gen::move, value, and x.
TEST | ( | Function | , |
asStdFunction_args_const | |||
) |
Definition at line 960 of file FunctionTest.cpp.
References EXPECT_EQ, f, i, folly::gen::move, value, and x.
TEST | ( | Function | , |
asSharedProxy_void | |||
) |
TEST | ( | Function | , |
asSharedProxy_void_const | |||
) |
Definition at line 988 of file FunctionTest.cpp.
References EXPECT_EQ, f, i, and folly::gen::move.
TEST | ( | Function | , |
asSharedProxy_return | |||
) |
Definition at line 999 of file FunctionTest.cpp.
References EXPECT_EQ, f, i, and folly::gen::move.
TEST | ( | Function | , |
asSharedProxy_return_const | |||
) |
Definition at line 1010 of file FunctionTest.cpp.
References EXPECT_EQ, f, i, and folly::gen::move.
TEST | ( | Function | , |
asSharedProxy_args | |||
) |
Definition at line 1022 of file FunctionTest.cpp.
References EXPECT_EQ, f, i, folly::gen::move, and x.
TEST | ( | Function | , |
asSharedProxy_args_const | |||
) |
Definition at line 1036 of file FunctionTest.cpp.
References EXPECT_EQ, f, i, folly::gen::move, and x.
TEST | ( | Function | , |
NoAllocatedMemoryAfterMove | |||
) |
Definition at line 1048 of file FunctionTest.cpp.
References EXPECT_FALSE, EXPECT_TRUE, testing::gmock_matchers_test::foo, folly::Function< FunctionType >::hasAllocatedMemory(), and folly::gen::move.
TEST | ( | Function | , |
ConstCastEmbedded | |||
) |
Definition at line 1059 of file FunctionTest.cpp.
References EXPECT_FALSE, folly::Function< FunctionType >::hasAllocatedMemory(), folly::gen::move, and x.
TEST | ( | Function | , |
EmptyAfterConstCast | |||
) |
Definition at line 1070 of file FunctionTest.cpp.
References folly::constCastFunction(), EXPECT_FALSE, and folly::gen::move.
TEST | ( | Function | , |
SelfStdSwap | |||
) |
Definition at line 1078 of file FunctionTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, f, folly::f14::swap(), folly::swap(), and folly::Function< FunctionType >::swap().
TEST | ( | Function | , |
SelfMove | |||
) |
Definition at line 1091 of file FunctionTest.cpp.
References EXPECT_EQ, EXPECT_TRUE, f, g(), and folly::gen::move.
TEST | ( | Function | , |
SelfMove2 | |||
) |
Definition at line 1101 of file FunctionTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, f, g(), folly::gen::move, folly::pushmi::__adl::noexcept(), ptr, and ptr_.
TEST | ( | Function | , |
DeducableArguments | |||
) |
TEST | ( | Function | , |
CtorWithCopy | |||
) |
Definition at line 1135 of file FunctionTest.cpp.
References EXPECT_FALSE, EXPECT_TRUE, folly::pushmi::__adl::noexcept(), and X.
TEST | ( | Function | , |
Bug_T23346238 | |||
) |
Definition at line 1154 of file FunctionTest.cpp.