Skip to content

Commit

Permalink
Simplify expression in getBlocks validation
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Lebedev <[email protected]>
  • Loading branch information
lebdron committed Dec 18, 2017
1 parent 770923d commit 38bee29
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/module/irohad/ametsuchi/ametsuchi_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,9 @@ TEST_F(AmetsuchiTest, SampleTest) {
// Block store tests
validateCalls(
blocks->getBlocks(1, 2),
[ x = 0, hashes = {block1hash, block2hash} ](auto eachBlock) mutable {
EXPECT_EQ(*(hashes.begin() + x++), eachBlock.hash);
[ i = 0, hashes = {block1hash, block2hash} ](auto eachBlock) mutable {
EXPECT_EQ(*(hashes.begin() + i), eachBlock.hash);
++i;
},
2);

Expand Down Expand Up @@ -432,9 +433,10 @@ TEST_F(AmetsuchiTest, queryGetAccountAssetTransactionsTest) {

// Block store tests
validateCalls(blocks->getBlocks(1, 3),
[ x = 0, hashes = {block1hash, block2hash, block3hash} ](
[ i = 0, hashes = {block1hash, block2hash, block3hash} ](
auto eachBlock) mutable {
EXPECT_EQ(*(hashes.begin() + x++), eachBlock.hash);
EXPECT_EQ(*(hashes.begin() + i), eachBlock.hash);
++i;
},
3);

Expand Down

0 comments on commit 38bee29

Please sign in to comment.