| 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 |
|
| 14 |
using ::testing::AllOf; |
| 15 |
using ::testing::HasSubstr; |
| 16 |
using ::testing::StartsWith; |
| 17 |
|
| 18 |
namespace clang { |
| 19 |
namespace clangd { |
| 20 |
namespace { |
| 21 |
|
| 22 |
TWEAK_TEST(DumpSymbol); |
| 23 |
|
| 24 |
TEST_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 |