Skip to content

Commit 300a85c

Browse files
committed
Use testing::ElementsAre instead of all_of
1 parent df0e75f commit 300a85c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/unittests/ADT/STLExtrasTest.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,12 +1595,11 @@ TEST(STLExtrasTest, Fill) {
15951595
std::vector<int> V1 = {1, 2, 3};
15961596
std::vector<int> V2;
15971597
int Val = 4;
1598-
auto IsSameAsVal = [&](int V) { return V == Val; };
15991598
fill(V1, Val);
1600-
EXPECT_TRUE(llvm::all_of(V1, IsSameAsVal));
1601-
V2.resize(5);
1599+
EXPECT_THAT(V1, ElementsAre(Val, Val, Val));
1600+
V2.resize(4);
16021601
fill(V2, Val);
1603-
EXPECT_TRUE(llvm::all_of(V2, IsSameAsVal));
1602+
EXPECT_THAT(V2, ElementsAre(Val, Val, Val, Val));
16041603
}
16051604

16061605
struct Foo;

0 commit comments

Comments
 (0)