Skip to content

Commit ec01c39

Browse files
author
Dmitry Bushev
committed
Addressing kuhar's and jh7370's comments
1 parent 27d2197 commit ec01c39

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/unittests/Object/SymbolicFileTest.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "llvm/ADT/STLExtras.h"
1111
#include "llvm/Support/raw_ostream.h"
1212
#include "llvm/TargetParser/Host.h"
13-
13+
#include "gmock/gmock.h"
1414
#include "gtest/gtest.h"
1515
#include <sstream>
1616

@@ -44,7 +44,7 @@ TEST(Object, DataRefImplOstream) {
4444
struct ProxyContent {
4545
unsigned Index = 0;
4646
ProxyContent(unsigned Index) : Index(Index) {};
47-
void moveNext() { Index++; }
47+
void moveNext() { ++Index; }
4848

4949
bool operator==(const ProxyContent &Another) const {
5050
return Index == Another.Index;
@@ -57,7 +57,5 @@ TEST(Object, ContentIterator) {
5757
auto EvenSequence = llvm::make_filter_range(
5858
Sequence, [](auto &&PC) { return PC.Index % 2 == 0; });
5959

60-
for (auto &&[I, Value] : llvm::enumerate(EvenSequence)) {
61-
EXPECT_EQ(I * 2u, Value.Index);
62-
}
60+
EXPECT_THAT(EvenSequence, testing::ElementsAre(0u, 2u, 4u, 6u, 8u));
6361
}

0 commit comments

Comments
 (0)