Files
clice/unittests/Index/FeatureIndex.cpp
2025-03-26 23:03:58 +08:00

28 lines
653 B
C++

#include "Test/CTest.h"
#include "Index/FeatureIndex.h"
namespace clice::testing {
namespace {
TEST(FeatureIndex, SemanticTokens) {
llvm::StringRef content = "int x = 1;";
Tester tester("main.cpp", content);
tester.compile();
/// auto index = index(*tester.info);
// auto& m = index.at(tester.info->getInterestedFile());
//
// auto tokens = m.semanticTokens();
//
// EXPECT_EQ(tokens.size(), 3);
// EXPECT_EQ(tokens[0].kind, SymbolKind::Keyword);
// EXPECT_EQ(tokens[1].kind, SymbolKind::Variable);
// EXPECT_EQ(tokens[2].kind, SymbolKind::Number);
}
} // namespace
} // namespace clice::testing