clang-tools 17.0.0git
DumpSymbolTests.cpp
Go to the documentation of this file.
1//===-- DumpSymbolTests.cpp -------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "TweakTesting.h"
10#include "gmock/gmock.h"
11#include "gtest/gtest.h"
12#include <string>
13
14using ::testing::AllOf;
15using ::testing::HasSubstr;
16using ::testing::StartsWith;
17
18namespace clang {
19namespace clangd {
20namespace {
21
22TWEAK_TEST(DumpSymbol);
23
24TEST_F(DumpSymbolTest, Test) {
25 std::string ID = R"("id":"CA2EBE44A1D76D2A")";
26 std::string USR = R"("usr":"c:@F@foo#")";
27 EXPECT_THAT(apply("void f^oo();"),
28 AllOf(StartsWith("message:"), testing::HasSubstr(ID),
29 testing::HasSubstr(USR)));
30}
31
32} // namespace
33} // namespace clangd
34} // namespace clang
std::string USR
#define TWEAK_TEST(TweakID)
Definition: TweakTesting.h:107
TEST_F(BackgroundIndexTest, NoCrashOnErrorFile)
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//