[clang-tools-extra] 932a2b8 - [clangd] Fix VS2019 build bots too
Kadir Cetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 30 05:01:21 PDT 2020
Author: Kadir Cetinkaya
Date: 2020-04-30T14:01:09+02:00
New Revision: 932a2b82641393df9b18eac3337491fdc64fe328
URL: https://github.com/llvm/llvm-project/commit/932a2b82641393df9b18eac3337491fdc64fe328
DIFF: https://github.com/llvm/llvm-project/commit/932a2b82641393df9b18eac3337491fdc64fe328.diff
LOG: [clangd] Fix VS2019 build bots too
Added:
Modified:
clang-tools-extra/clangd/unittests/FileIndexTests.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/unittests/FileIndexTests.cpp b/clang-tools-extra/clangd/unittests/FileIndexTests.cpp
index c0763cf0525e..9a8d0807d527 100644
--- a/clang-tools-extra/clangd/unittests/FileIndexTests.cpp
+++ b/clang-tools-extra/clangd/unittests/FileIndexTests.cpp
@@ -573,36 +573,33 @@ TEST(FileShardedIndexTest, Sharding) {
UnorderedElementsAre(AHeaderUri, BHeaderUri, BSourceUri));
{
- auto Shard = ShardedIndex.getShard(AHeaderUri).getValue();
- EXPECT_THAT(Shard.Symbols.getValue(), UnorderedElementsAre(QName("1")));
- EXPECT_THAT(Shard.Refs.getValue(), IsEmpty());
- EXPECT_THAT(
- Shard.Relations.getValue(),
- UnorderedElementsAre(Relation{Sym1.ID, RelationKind::BaseOf, Sym2.ID}));
- ASSERT_THAT(Shard.Sources.getValue().keys(),
- UnorderedElementsAre(AHeaderUri));
+ auto Shard = *ShardedIndex.getShard(AHeaderUri);
+ EXPECT_THAT(*Shard.Symbols, UnorderedElementsAre(QName("1")));
+ EXPECT_THAT(*Shard.Refs, IsEmpty());
+ EXPECT_THAT(*Shard.Relations, UnorderedElementsAre(Relation{
+ Sym1.ID, RelationKind::BaseOf, Sym2.ID}));
+ ASSERT_THAT(Shard.Sources->keys(), UnorderedElementsAre(AHeaderUri));
EXPECT_THAT(Shard.Sources->lookup(AHeaderUri).DirectIncludes, IsEmpty());
EXPECT_TRUE(Shard.Cmd.hasValue());
}
{
- auto Shard = ShardedIndex.getShard(BHeaderUri).getValue();
- EXPECT_THAT(Shard.Symbols.getValue(), UnorderedElementsAre(QName("2")));
- EXPECT_THAT(Shard.Refs.getValue(), IsEmpty());
- EXPECT_THAT(
- Shard.Relations.getValue(),
- UnorderedElementsAre(Relation{Sym2.ID, RelationKind::BaseOf, Sym1.ID}));
- ASSERT_THAT(Shard.Sources.getValue().keys(),
+ auto Shard = *ShardedIndex.getShard(BHeaderUri);
+ EXPECT_THAT(*Shard.Symbols, UnorderedElementsAre(QName("2")));
+ EXPECT_THAT(*Shard.Refs, IsEmpty());
+ EXPECT_THAT(*Shard.Relations, UnorderedElementsAre(Relation{
+ Sym2.ID, RelationKind::BaseOf, Sym1.ID}));
+ ASSERT_THAT(Shard.Sources->keys(),
UnorderedElementsAre(BHeaderUri, AHeaderUri));
EXPECT_THAT(Shard.Sources->lookup(BHeaderUri).DirectIncludes,
UnorderedElementsAre(AHeaderUri));
EXPECT_TRUE(Shard.Cmd.hasValue());
}
{
- auto Shard = ShardedIndex.getShard(BSourceUri).getValue();
- EXPECT_THAT(Shard.Symbols.getValue(), UnorderedElementsAre(QName("2")));
- EXPECT_THAT(Shard.Refs.getValue(), UnorderedElementsAre(Pair(Sym1.ID, _)));
- EXPECT_THAT(Shard.Relations.getValue(), IsEmpty());
- ASSERT_THAT(Shard.Sources.getValue().keys(),
+ auto Shard = *ShardedIndex.getShard(BSourceUri);
+ EXPECT_THAT(*Shard.Symbols, UnorderedElementsAre(QName("2")));
+ EXPECT_THAT(*Shard.Refs, UnorderedElementsAre(Pair(Sym1.ID, _)));
+ EXPECT_THAT(*Shard.Relations, IsEmpty());
+ ASSERT_THAT(Shard.Sources->keys(),
UnorderedElementsAre(BSourceUri, BHeaderUri));
EXPECT_THAT(Shard.Sources->lookup(BSourceUri).DirectIncludes,
UnorderedElementsAre(BHeaderUri));
More information about the cfe-commits
mailing list