[clangd] Fix data race in GoToInclude.All test

This commit is contained in:
Kadir Cetinkaya 2020-11-19 08:47:25 +01:00
parent 6b1341eb5b
commit 7c2990b8af
No known key found for this signature in database
GPG Key ID: E39E36B8D2057ED6
1 changed files with 3 additions and 3 deletions

View File

@ -1259,8 +1259,8 @@ TEST(GoToInclude, All) {
Annotations HeaderAnnotations(HeaderContents);
FS.Files[FooH] = std::string(HeaderAnnotations.code());
Server.addDocument(FooH, HeaderAnnotations.code());
Server.addDocument(FooCpp, SourceAnnotations.code());
runAddDocument(Server, FooH, HeaderAnnotations.code());
runAddDocument(Server, FooCpp, SourceAnnotations.code());
// Test include in preamble.
auto Locations = runLocateSymbolAt(Server, FooCpp, SourceAnnotations.point());
@ -1307,7 +1307,7 @@ TEST(GoToInclude, All) {
auto FooM = testPath("foo.m");
FS.Files[FooM] = std::string(ObjC.code());
Server.addDocument(FooM, ObjC.code());
runAddDocument(Server, FooM, ObjC.code());
Locations = runLocateSymbolAt(Server, FooM, ObjC.point());
ASSERT_TRUE(bool(Locations)) << "locateSymbolAt returned an error";
EXPECT_THAT(*Locations, ElementsAre(Sym("foo.h", HeaderAnnotations.range(),