llvm/llvm/unittests/ExecutionEngine/Orc/WrapperFunctionUtilsTest.cpp

//===----- WrapperFunctionUtilsTest.cpp - Test Wrapper-Function utils -----===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#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 =;
} // end anonymous namespace

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) {}