#include "Headers.h"
#include "RIFF.h"
#include "index/Serialization.h"
#include "support/Logger.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Support/Compression.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ScopedPrinter.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#ifdef LLVM_ON_UNIX
#include <sys/resource.h>
#endif
ElementsAre;
Pair;
UnorderedElementsAre;
UnorderedElementsAreArray;
namespace clang {
namespace clangd {
namespace {
const char *YAML = …;
MATCHER_P(id, I, "") { … }
MATCHER_P(qName, Name, "") { … }
MATCHER_P3(IncludeHeaderWithRefAndDirectives, IncludeHeader, References,
SupportedDirectives, "") { … }
auto readIndexFile(llvm::StringRef Text) { … }
TEST(SerializationTest, NoCrashOnEmptyYAML) { … }
TEST(SerializationTest, YAMLConversions) { … }
std::vector<std::string> yamlFromSymbols(const SymbolSlab &Slab) { … }
std::vector<std::string> yamlFromRefs(const RefSlab &Slab) { … }
std::vector<std::string> yamlFromRelations(const RelationSlab &Slab) { … }
TEST(SerializationTest, BinaryConversions) { … }
TEST(SerializationTest, SrcsTest) { … }
TEST(SerializationTest, CmdlTest) { … }
#if LLVM_ON_UNIX && defined(RLIMIT_AS) && !LLVM_ADDRESS_SANITIZER_BUILD && \
!LLVM_MEMORY_SANITIZER_BUILD && !LLVM_THREAD_SANITIZER_BUILD
class ScopedMemoryLimit { … };
#else
class ScopedMemoryLimit {
public:
ScopedMemoryLimit(unsigned Bytes) { log("rlimit unsupported"); }
};
#endif
TEST(SerializationTest, NoCrashOnBadArraySize) { … }
TEST(SerializationTest, NoCrashOnBadStringTableSize) { … }
}
}
}