#include "GlobalCompilationDatabase.h"
#include "CompileCommands.h"
#include "Config.h"
#include "TestFS.h"
#include "support/Path.h"
#include "support/ThreadsafeFS.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Path.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <chrono>
#include <fstream>
#include <optional>
#include <string>
namespace clang {
namespace clangd {
namespace {
AllOf;
Contains;
ElementsAre;
EndsWith;
HasSubstr;
IsEmpty;
Not;
UnorderedElementsAre;
TEST(GlobalCompilationDatabaseTest, FallbackCommand) { … }
static tooling::CompileCommand cmd(llvm::StringRef File, llvm::StringRef Arg) { … }
class OverlayCDBTest : public ::testing::Test { … };
TEST_F(OverlayCDBTest, GetCompileCommand) { … }
TEST_F(OverlayCDBTest, GetFallbackCommand) { … }
TEST_F(OverlayCDBTest, NoBase) { … }
TEST_F(OverlayCDBTest, Watch) { … }
TEST_F(OverlayCDBTest, Adjustments) { … }
TEST_F(OverlayCDBTest, ExpandedResponseFiles) { … }
TEST(GlobalCompilationDatabaseTest, DiscoveryWithNestedCDBs) { … }
TEST(GlobalCompilationDatabaseTest, BuildDir) { … }
TEST(GlobalCompilationDatabaseTest, CompileFlagsDirectory) { … }
MATCHER_P(hasArg, Flag, "") { … }
TEST(GlobalCompilationDatabaseTest, Config) { … }
TEST(GlobalCompilationDatabaseTest, NonCanonicalFilenames) { … }
TEST_F(OverlayCDBTest, GetProjectInfo) { … }
TEST(GlobalCompilationDatabaseTest, InferenceWithResponseFile) { … }
}
class DirectoryBasedGlobalCompilationDatabaseCacheTest
: public ::testing::Test { … };
MATCHER_P2(hasFlag, Flag, Path, "") { … }
auto hasFlag(llvm::StringRef Flag) { … }
TEST_F(DirectoryBasedGlobalCompilationDatabaseCacheTest, Cacheable) { … }
}
}