#include "absl/functional/function_ref.h"
#include <functional>
#include <memory>
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "absl/container/internal/test_instance_tracker.h"
#include "absl/functional/any_invocable.h"
#include "absl/memory/memory.h"
namespace absl {
ABSL_NAMESPACE_BEGIN
namespace {
void RunFun(FunctionRef<void()> f) { … }
TEST(FunctionRefTest, Lambda) { … }
int Function() { … }
TEST(FunctionRefTest, Function1) { … }
TEST(FunctionRefTest, Function2) { … }
TEST(FunctionRefTest, ConstFunction) { … }
int NoExceptFunction() noexcept { … }
TEST(FunctionRefTest, NoExceptFunction) { … }
TEST(FunctionRefTest, ForwardsArgs) { … }
TEST(FunctionRef, ReturnMoveOnly) { … }
TEST(FunctionRef, ManyArgs) { … }
TEST(FunctionRef, VoidResultFromNonVoidFunctor) { … }
TEST(FunctionRef, CastFromDerived) { … }
TEST(FunctionRef, VoidResultFromNonVoidFuncton) { … }
TEST(FunctionRef, MemberPtr) { … }
TEST(FunctionRef, MemberFun) { … }
TEST(FunctionRef, MemberFunRefqualified) { … }
#if !defined(_WIN32) && defined(GTEST_HAS_DEATH_TEST)
TEST(FunctionRef, MemberFunRefqualifiedNull) { … }
TEST(FunctionRef, NullMemberPtrAssertFails) { … }
TEST(FunctionRef, NullStdFunctionAssertPasses) { … }
TEST(FunctionRef, NullStdFunctionAssertFails) { … }
TEST(FunctionRef, NullAnyInvocableAssertPasses) { … }
TEST(FunctionRef, NullAnyInvocableAssertFails) { … }
#endif
TEST(FunctionRef, CopiesAndMovesPerPassByValue) { … }
TEST(FunctionRef, CopiesAndMovesPerPassByRef) { … }
TEST(FunctionRef, CopiesAndMovesPerPassByValueCallByMove) { … }
TEST(FunctionRef, CopiesAndMovesPerPassByValueToRef) { … }
TEST(FunctionRef, PassByValueTypes) { … }
TEST(FunctionRef, ReferenceToIncompleteType) { … }
}
ABSL_NAMESPACE_END
}