Files
clice/tests/unit/Index/FeatureIndex.cpp
ykiko 836d9dc988 Add basic test client (#156)
Co-authored-by: star9029 <hengxings783@gmail.com>
2025-07-21 17:55:10 +08:00

28 lines
651 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->interested_file());
//
// 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