//===-- ConfigProviderTests.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 "Config.h" #include "ConfigProvider.h" #include "ConfigTesting.h" #include "TestFS.h" #include "llvm/Support/Path.h" #include "llvm/Support/SourceMgr.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include <atomic> #include <chrono> namespace clang { namespace clangd { namespace config { namespace { ElementsAre; IsEmpty; // Provider that appends an arg to compile flags. // The arg is prefix<N>, where N is the times getFragments() was called. // It also yields a diagnostic each time it's called. class FakeProvider : public Provider { … }; std::vector<std::string> getAddedArgs(Config &C) { … } // The provider from combine() should invoke its providers in order, and not // cache their results. TEST(ProviderTest, Combine) { … } const char *AddFooWithErr = …; const char *AddFooWithTypoErr = …; const char *AddBarBaz = …; TEST(ProviderTest, FromYAMLFile) { … } TEST(ProviderTest, FromAncestorRelativeYAMLFiles) { … } TEST(ProviderTest, SourceInfo) { … } } // namespace } // namespace config } // namespace clangd } // namespace clang