#include "llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h"
#include "llvm/ADT/FunctionExtras.h"
#include "llvm/Testing/Support/Error.h"
#include "gtest/gtest.h"
#include <future>
usingnamespacellvm;
usingnamespacellvm::orc;
usingnamespacellvm::orc::shared;
namespace {
constexpr const char *TestString = …;
}
TEST(WrapperFunctionUtilsTest, DefaultWrapperFunctionResult) { … }
TEST(WrapperFunctionUtilsTest, WrapperFunctionResultFromRange) { … }
TEST(WrapperFunctionUtilsTest, WrapperFunctionResultFromCString) { … }
TEST(WrapperFunctionUtilsTest, WrapperFunctionResultFromStdString) { … }
TEST(WrapperFunctionUtilsTest, WrapperFunctionResultFromOutOfBandError) { … }
TEST(WrapperFunctionUtilsTest, WrapperFunctionCCallCreateEmpty) { … }
static void voidNoop() { … }
class AddClass { … };
static WrapperFunctionResult voidNoopWrapper(const char *ArgData,
size_t ArgSize) { … }
static WrapperFunctionResult addWrapper(const char *ArgData, size_t ArgSize) { … }
static WrapperFunctionResult addMethodWrapper(const char *ArgData,
size_t ArgSize) { … }
TEST(WrapperFunctionUtilsTest, WrapperFunctionCallAndHandleVoid) { … }
TEST(WrapperFunctionUtilsTest, WrapperFunctionCallAndHandleRet) { … }
TEST(WrapperFunctionUtilsTest, WrapperFunctionMethodCallAndHandleRet) { … }
static void voidNoopAsync(unique_function<void(SPSEmpty)> SendResult) { … }
static WrapperFunctionResult voidNoopAsyncWrapper(const char *ArgData,
size_t ArgSize) { … }
static WrapperFunctionResult addAsyncWrapper(const char *ArgData,
size_t ArgSize) { … }
TEST(WrapperFunctionUtilsTest, WrapperFunctionCallAndHandleAsyncVoid) { … }
TEST(WrapperFunctionUtilsTest, WrapperFunctionCallAndHandleAsyncRet) { … }
static WrapperFunctionResult failingWrapper(const char *ArgData,
size_t ArgSize) { … }
void asyncFailingWrapperCaller(unique_function<void(WrapperFunctionResult)> F,
const char *ArgData, size_t ArgSize) { … }
TEST(WrapperFunctionUtilsTest, WrapperFunctionCallFailingAsync) { … }