llvm/clang-tools-extra/clangd/unittests/LSPBinderTests.cpp

//===-- LSPBinderTests.cpp ------------------------------------------------===//
//
// 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 "LSPBinder.h"
#include "llvm/Testing/Support/Error.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <optional>

namespace clang {
namespace clangd {
namespace {

ElementsAre;
HasSubstr;
IsEmpty;
UnorderedElementsAre;

// JSON-serializable type for testing.
struct Foo {};
bool fromJSON(const llvm::json::Value &V, Foo &F, llvm::json::Path P) {}
llvm::json::Value toJSON(const Foo &F) {}

// Creates a Callback that writes its received value into an
// std::optional<Expected>.
template <typename T>
llvm::unique_function<void(llvm::Expected<T>)>
capture(std::optional<llvm::Expected<T>> &Out) {}

struct OutgoingRecorder : public LSPBinder::RawOutgoing {};

TEST(LSPBinderTest, IncomingCalls) {}

TEST(LSPBinderTest, OutgoingCalls) {}

} // namespace
} // namespace clangd
} // namespace clang