Skip to content

Commit

Permalink
test: Use ThrowsMessage instead of EXPECT_THROWS_MESSAGE
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Dec 19, 2021
1 parent 9fa021d commit 2aa6928
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/unittests/execute_call_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

using namespace fizzy;
using namespace fizzy::test;
using testing::ThrowsMessage;

TEST(execute_call, call)
{
Expand Down Expand Up @@ -770,8 +771,8 @@ TEST(execute_call, imported_table_modified_by_uninstantiable_module)
const auto table = fizzy::find_exported_table(*instance1, "tab");
ASSERT_TRUE(table.has_value());

EXPECT_THROW_MESSAGE(instantiate(parse(bin2), {}, {*table}), instantiate_error,
"start function failed to execute");
EXPECT_THAT([&] { instantiate(parse(bin2), {}, {*table}); },
ThrowsMessage<instantiate_error>("start function failed to execute"));

EXPECT_THAT(execute(*instance1, 0, {44, 2}), Result(42));
}
Expand Down

0 comments on commit 2aa6928

Please sign in to comment.