Skip to content

Commit a362e71

Browse files
MaskRayahatanaka
authored andcommitted
[unittest] Use UnorderedElementsAre for StringMap keys
(cherry picked from commit 16c8709)
1 parent f1d5762 commit a362e71

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,9 @@ TEST_F(BackgroundIndexTest, UncompilableFiles) {
580580
CDB.setCompileCommand(testPath("build/../A.cc"), Cmd);
581581
ASSERT_TRUE(Idx.blockUntilIdleForTest());
582582

583-
EXPECT_THAT(Storage.keys(), ElementsAre(testPath("A.cc"), testPath("A.h"),
584-
testPath("B.h"), testPath("C.h")));
583+
EXPECT_THAT(Storage.keys(),
584+
UnorderedElementsAre(testPath("A.cc"), testPath("A.h"),
585+
testPath("B.h"), testPath("C.h")));
585586

586587
{
587588
auto Shard = MSS.loadShard(testPath("A.cc"));
@@ -635,7 +636,8 @@ TEST_F(BackgroundIndexTest, CmdLineHash) {
635636
CDB.setCompileCommand(testPath("build/../A.cc"), Cmd);
636637
ASSERT_TRUE(Idx.blockUntilIdleForTest());
637638

638-
EXPECT_THAT(Storage.keys(), ElementsAre(testPath("A.cc"), testPath("A.h")));
639+
EXPECT_THAT(Storage.keys(),
640+
UnorderedElementsAre(testPath("A.cc"), testPath("A.h")));
639641
// Make sure we only store the Cmd for main file.
640642
EXPECT_FALSE(MSS.loadShard(testPath("A.h"))->Cmd);
641643

0 commit comments

Comments
 (0)