llvm/clang-tools-extra/clangd/unittests/DexTests.cpp

//===-- DexTests.cpp  ---------------------------------*- C++ -*-----------===//
//
// 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 "TestFS.h"
#include "TestIndex.h"
#include "index/Index.h"
#include "index/SymbolID.h"
#include "index/dex/Dex.h"
#include "index/dex/Iterator.h"
#include "index/dex/Token.h"
#include "index/dex/Trigram.h"
#include "llvm/Support/ScopedPrinter.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <string>
#include <vector>

AnyOf;
ElementsAre;
IsEmpty;
UnorderedElementsAre;

namespace clang {
namespace clangd {
namespace dex {
namespace {

//===----------------------------------------------------------------------===//
// Query iterator tests.
//===----------------------------------------------------------------------===//

std::vector<DocID> consumeIDs(Iterator &It) {}

TEST(DexIterators, DocumentIterator) {}

TEST(DexIterators, AndTwoLists) {}

TEST(DexIterators, AndThreeLists) {}

TEST(DexIterators, AndEmpty) {}

TEST(DexIterators, OrTwoLists) {}

TEST(DexIterators, OrThreeLists) {}

// FIXME(kbobyrev): The testcase below is similar to what is expected in real
// queries. It should be updated once new iterators (such as boosting, limiting,
// etc iterators) appear. However, it is not exhaustive and it would be
// beneficial to implement automatic generation (e.g. fuzzing) of query trees
// for more comprehensive testing.
TEST(DexIterators, QueryTree) {}

TEST(DexIterators, StringRepresentation) {}

TEST(DexIterators, Limit) {}

TEST(DexIterators, True) {}

TEST(DexIterators, Boost) {}

TEST(DexIterators, Optimizations) {}

//===----------------------------------------------------------------------===//
// Search token tests.
//===----------------------------------------------------------------------===//

::testing::Matcher<std::vector<Token>>
tokensAre(std::initializer_list<std::string> Strings, Token::Kind Kind) {}

::testing::Matcher<std::vector<Token>>
trigramsAre(std::initializer_list<std::string> Trigrams) {}

std::vector<Token> identifierTrigramTokens(llvm::StringRef S) {}

TEST(DexTrigrams, IdentifierTrigrams) {}

TEST(DexTrigrams, QueryTrigrams) {}

TEST(DexSearchTokens, SymbolPath) {}

//===----------------------------------------------------------------------===//
// Index tests.
//===----------------------------------------------------------------------===//

TEST(Dex, Lookup) {}

TEST(Dex, FuzzyFind) {}

TEST(DexTest, DexLimitedNumMatches) {}

TEST(DexTest, FuzzyMatch) {}

TEST(DexTest, ShortQuery) {}

TEST(DexTest, MatchQualifiedNamesWithoutSpecificScope) {}

TEST(DexTest, MatchQualifiedNamesWithGlobalScope) {}

TEST(DexTest, MatchQualifiedNamesWithOneScope) {}

TEST(DexTest, MatchQualifiedNamesWithMultipleScopes) {}

TEST(DexTest, NoMatchNestedScopes) {}

TEST(DexTest, WildcardScope) {}

TEST(DexTest, IgnoreCases) {}

TEST(DexTest, UnknownPostingList) {}

TEST(DexTest, Lookup) {}

TEST(DexTest, SymbolIndexOptionsFilter) {}

TEST(DexTest, ProximityPathsBoosting) {}

TEST(DexTests, Refs) {}

TEST(DexTests, Relations) {}

TEST(DexIndex, IndexedFiles) {}

TEST(DexTest, PreferredTypesBoosting) {}

TEST(DexTest, TemplateSpecialization) {}

} // namespace
} // namespace dex
} // namespace clangd
} // namespace clang