diff --git a/src/catch2/internal/catch_console_colour.cpp b/src/catch2/internal/catch_console_colour.cpp index f519fb86..b3de32b5 100644 --- a/src/catch2/internal/catch_console_colour.cpp +++ b/src/catch2/internal/catch_console_colour.cpp @@ -88,7 +88,6 @@ namespace Catch { class NoColourImpl : public ColourImpl { public: NoColourImpl( IStream* stream ): ColourImpl( stream ) {} - static bool useColourOnPlatform() { return true; } private: void use( Colour::Code ) const override {} diff --git a/src/catch2/reporters/catch_reporter_tap.cpp b/src/catch2/reporters/catch_reporter_tap.cpp index 8ecf3928..6058f242 100644 --- a/src/catch2/reporters/catch_reporter_tap.cpp +++ b/src/catch2/reporters/catch_reporter_tap.cpp @@ -108,11 +108,6 @@ namespace Catch { } private: - void printSourceInfo() const { - stream << colourImpl->guardColour( tapDimColour ) - << result.getSourceInfo() << ':'; - } - void printResultType(StringRef passOrFail) const { if (!passOrFail.empty()) { stream << passOrFail << ' ' << counter << " -"; diff --git a/tests/SelfTest/UsageTests/Condition.tests.cpp b/tests/SelfTest/UsageTests/Condition.tests.cpp index 198b4cdb..2e3b624e 100644 --- a/tests/SelfTest/UsageTests/Condition.tests.cpp +++ b/tests/SelfTest/UsageTests/Condition.tests.cpp @@ -33,15 +33,6 @@ namespace { double double_pi = 3.1415926535; }; - struct TestDef { - TestDef& operator + (const std::string&) { - return *this; - } - TestDef& operator[](const std::string&) { - return *this; - } - }; - static const char* returnsConstNull() { return nullptr; } static char* returnsNull() { return nullptr; } @@ -53,9 +44,6 @@ namespace { // Equality tests TEST_CASE( "Equality checks that should succeed" ) { - TestDef td; - td + "hello" + "hello"; - TestData data; REQUIRE( data.int_seven == 7 ); diff --git a/tests/SelfTest/UsageTests/Exception.tests.cpp b/tests/SelfTest/UsageTests/Exception.tests.cpp index 9b6d2a58..e93cf919 100644 --- a/tests/SelfTest/UsageTests/Exception.tests.cpp +++ b/tests/SelfTest/UsageTests/Exception.tests.cpp @@ -39,7 +39,7 @@ namespace { explicit CustomException(const std::string& msg) : m_msg(msg) {} - std::string getMessage() const { + std::string const& getMessage() const { return m_msg; } @@ -51,9 +51,12 @@ namespace { public: explicit CustomStdException(const std::string& msg) : m_msg(msg) {} - ~CustomStdException() noexcept override {} + ~CustomStdException() noexcept override = default; - std::string getMessage() const { + CustomStdException( CustomStdException const& ) = default; + CustomStdException& operator=( CustomStdException const& ) = default; + + std::string const& getMessage() const { return m_msg; } @@ -137,7 +140,7 @@ TEST_CASE("Non-std exceptions can be translated", "[.][failing][!throws]" ) { } TEST_CASE("Custom std-exceptions can be custom translated", "[.][failing][!throws]" ) { - throw CustomException( "custom std exception" ); + throw CustomStdException( "custom std exception" ); } TEST_CASE( "Custom exceptions can be translated when testing for nothrow", "[.][failing][!throws]" ) {