Skip to content

Commit

Permalink
{test} Fix warnings about extraneous semicolons
Browse files Browse the repository at this point in the history
  • Loading branch information
asmaloney committed Jun 20, 2024
1 parent ebfd5d7 commit 1abd4e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/include/Helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

// GoogleTest's ASSERT_NO_THROW() doesn't let us show any info about the exceptions.
// This wrapper macro will output the e57::E57Exception context on failure.
// The static_assert is simply there to require a semicolon after the macro so it matches the
// E57_ASSERT_THROW() case.
#define E57_ASSERT_NO_THROW( code ) \
try \
{ \
Expand All @@ -12,7 +14,8 @@
catch ( e57::E57Exception & err ) \
{ \
FAIL() << err.errorStr() << ": " << err.context(); \
}
} \
static_assert( true, "" )

#define E57_ASSERT_THROW( code ) ASSERT_THROW( code, e57::E57Exception )

Expand Down

0 comments on commit 1abd4e9

Please sign in to comment.