mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Some bits of tidy up
This commit is contained in:
@@ -36,8 +36,8 @@ int thisDoesntThrow() {
|
||||
|
||||
class CustomException {
|
||||
public:
|
||||
CustomException( const std::string& msg )
|
||||
: m_msg( msg )
|
||||
explicit CustomException( const std::string& msg )
|
||||
: m_msg( msg )
|
||||
{}
|
||||
|
||||
std::string getMessage() const {
|
||||
@@ -50,10 +50,10 @@ private:
|
||||
|
||||
class CustomStdException : public std::exception {
|
||||
public:
|
||||
CustomStdException( const std::string& msg )
|
||||
: m_msg( msg )
|
||||
explicit CustomStdException( const std::string& msg )
|
||||
: m_msg( msg )
|
||||
{}
|
||||
~CustomStdException() noexcept {}
|
||||
~CustomStdException() noexcept override {}
|
||||
|
||||
std::string getMessage() const {
|
||||
return m_msg;
|
||||
|
@@ -303,13 +303,13 @@ TEST_CASE( "toString on const wchar_t pointer returns the string contents", "[to
|
||||
}
|
||||
|
||||
TEST_CASE( "toString on wchar_t const pointer returns the string contents", "[toString]" ) {
|
||||
wchar_t * const s = const_cast<wchar_t* const>( L"wide load" );
|
||||
auto const s = const_cast<wchar_t* const>( L"wide load" );
|
||||
std::string result = ::Catch::Detail::stringify( s );
|
||||
CHECK( result == "\"wide load\"" );
|
||||
}
|
||||
|
||||
TEST_CASE( "toString on wchar_t returns the string contents", "[toString]" ) {
|
||||
wchar_t * s = const_cast<wchar_t*>( L"wide load" );
|
||||
auto s = const_cast<wchar_t*>( L"wide load" );
|
||||
std::string result = ::Catch::Detail::stringify( s );
|
||||
CHECK( result == "\"wide load\"" );
|
||||
}
|
||||
|
Reference in New Issue
Block a user