forked from qt-creator/qt-creator
Clang: More tests for symbol indexing
Change-Id: Ic0806fbf245c9b69f74eaa8e3d52cad90dafedbf Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -115,4 +115,17 @@ TEST_F(SymbolIndexing, DISABLED_TemplateFunction)
|
|||||||
IsLocation(filePathId(TESTDATA_DIR "/symbolindexing_main1.cpp"), 6, 5)));
|
IsLocation(filePathId(TESTDATA_DIR "/symbolindexing_main1.cpp"), 6, 5)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(SymbolIndexing, PathsAreUpdated)
|
||||||
|
{
|
||||||
|
indexing.indexer().updateProjectParts({projectPart1}, {});
|
||||||
|
|
||||||
|
indexing.indexer().pathsChanged({filePathId(main1Path)});
|
||||||
|
indexing.indexer().pathsChanged({filePathId(main1Path)});
|
||||||
|
auto locations = query.locationsAt(filePathId(TESTDATA_DIR "/symbolindexing_main1.cpp"), 6, 5);
|
||||||
|
ASSERT_THAT(locations,
|
||||||
|
ElementsAre(
|
||||||
|
IsLocation(filePathId(TESTDATA_DIR "/symbolindexing_main1.cpp"), 5, 9),
|
||||||
|
IsLocation(filePathId(TESTDATA_DIR "/symbolindexing_main1.cpp"), 6, 5)));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user