Skip to content

Commit

Permalink
Expand coverage (nonstd-lite project issue 29, thanks to OpenCppCover…
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmoene committed Mar 8, 2019
1 parent 4ebc661 commit 298ee39
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/optional.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,19 @@ CASE( "optional: Throws bad_optional_access at disengaged access" )
#endif
}

CASE( "optional: Throws bad_optional_access with non-empty what()" )
{
try
{
optional<int> d;
int d = d.value();
}
catch( bad_optional_access const & e )
{
EXPECT( ! std::string( e.what() ).empty() );
}
}

// modifiers:

CASE( "optional: Allows to reset content" )
Expand Down

0 comments on commit 298ee39

Please sign in to comment.