summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp')
-rw-r--r--clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp b/clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
index 0401aeb1923..79e081bd678 100644
--- a/clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
+++ b/clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
@@ -211,7 +211,7 @@ TEST_F(BackgroundIndexTest, ShardStorageTest) {
OverlayCDB CDB(/*Base=*/nullptr);
BackgroundIndex Idx(Context::empty(), FS, CDB,
[&](llvm::StringRef) { return &MSS; });
- CDB.setCompileCommand(testPath("root/A.cc"), Cmd);
+ CDB.setCompileCommand(testPath("root"), Cmd);
ASSERT_TRUE(Idx.blockUntilIdleForTest());
}
EXPECT_EQ(CacheHits, 2U); // Check both A.cc and A.h loaded from cache.
@@ -335,7 +335,7 @@ TEST_F(BackgroundIndexTest, ShardStorageLoad) {
OverlayCDB CDB(/*Base=*/nullptr);
BackgroundIndex Idx(Context::empty(), FS, CDB,
[&](llvm::StringRef) { return &MSS; });
- CDB.setCompileCommand(testPath("root/A.cc"), Cmd);
+ CDB.setCompileCommand(testPath("root"), Cmd);
ASSERT_TRUE(Idx.blockUntilIdleForTest());
}
EXPECT_EQ(CacheHits, 2U); // Check both A.cc and A.h loaded from cache.
@@ -353,7 +353,7 @@ TEST_F(BackgroundIndexTest, ShardStorageLoad) {
OverlayCDB CDB(/*Base=*/nullptr);
BackgroundIndex Idx(Context::empty(), FS, CDB,
[&](llvm::StringRef) { return &MSS; });
- CDB.setCompileCommand(testPath("root/A.cc"), Cmd);
+ CDB.setCompileCommand(testPath("root"), Cmd);
ASSERT_TRUE(Idx.blockUntilIdleForTest());
}
EXPECT_EQ(CacheHits, 2U); // Check both A.cc and A.h loaded from cache.
@@ -621,8 +621,8 @@ TEST_F(BackgroundIndexRebuilderTest, IndexingTUs) {
TEST_F(BackgroundIndexRebuilderTest, LoadingShards) {
Rebuilder.startLoading();
- Rebuilder.loadedShard(10);
- Rebuilder.loadedShard(20);
+ Rebuilder.loadedTU();
+ Rebuilder.loadedTU();
EXPECT_TRUE(checkRebuild([&] { Rebuilder.doneLoading(); }));
// No rebuild for no shards.
@@ -631,11 +631,11 @@ TEST_F(BackgroundIndexRebuilderTest, LoadingShards) {
// Loads can overlap.
Rebuilder.startLoading();
- Rebuilder.loadedShard(1);
+ Rebuilder.loadedTU();
Rebuilder.startLoading();
- Rebuilder.loadedShard(1);
+ Rebuilder.loadedTU();
EXPECT_FALSE(checkRebuild([&] { Rebuilder.doneLoading(); }));
- Rebuilder.loadedShard(1);
+ Rebuilder.loadedTU();
EXPECT_TRUE(checkRebuild([&] { Rebuilder.doneLoading(); }));
// No rebuilding for indexed files while loading.
OpenPOWER on IntegriCloud