#include "llvm/ADT/FunctionExtras.h"
#include "CountCopyAndMove.h"
#include "gtest/gtest.h"
#include <memory>
#include <type_traits>
usingnamespacellvm;
namespace {
TEST(UniqueFunctionTest, Basic) { … }
TEST(UniqueFunctionTest, Captures) { … }
TEST(UniqueFunctionTest, MoveOnly) { … }
TEST(UniqueFunctionTest, CountForwardingCopies) { … }
TEST(UniqueFunctionTest, CountForwardingMoves) { … }
TEST(UniqueFunctionTest, Const) { … }
std::string returns(StringRef) { … }
std::string returns(unique_function<double()> F) { … }
std::string returns(unique_function<StringRef()> F) { … }
TEST(UniqueFunctionTest, SFINAE) { … }
class Incomplete;
template <typename T> class Templated { … };
TEST(UniqueFunctionTest, IncompleteTypes) { … }
Incomplete incompleteFunction();
const Incomplete incompleteFunctionConst();
TEST(UniqueFunctionTest, IncompleteCallableType) { … }
class Incomplete { … };
Incomplete incompleteFunction() { … }
const Incomplete incompleteFunctionConst() { … }
TEST(UniqueFunctionTest, InlineStorageWorks) { … }
TEST(UniqueFunctionTest, MovedFromStateIsDestroyedCorrectly) { … }
}