Skip to content

Commit

Permalink
Use ElementsAre to collapse two checks into one
Browse files Browse the repository at this point in the history
  • Loading branch information
dneto0 committed Nov 25, 2015
1 parent a72e1fe commit f92e9cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/BinaryParse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ namespace {
using ::spvtest::Concatenate;
using ::spvtest::MakeInstruction;
using ::spvtest::MakeVector;
using ::testing::_;
using ::testing::AnyOf;
using ::testing::ElementsAre;
using ::testing::Eq;

// An easily-constructible and comparable object for the contents of an
Expand Down Expand Up @@ -441,8 +443,7 @@ TEST_F(BinaryParseTest, ExtendedInstruction) {
3, // result id
operands.data(),
uint16_t(operands.size())};
EXPECT_THAT(instructions().size(), Eq(2u));
EXPECT_THAT(instructions().at(1), ParsedInstruction(parsed_inst));
EXPECT_THAT(instructions(), ElementsAre(_, ParsedInstruction(parsed_inst)));
}

// TODO(dneto): Add tests for spvBinaryParse:
Expand Down

0 comments on commit f92e9cc

Please sign in to comment.