mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-02 05:15:39 +02:00
Remove testing of CATCH_CONFIG_FALLBACK_STRINGIFIER from SelfTest
This removes a potential ODR violation and the configuration option is tested in its own separate binary anyway.
This commit is contained in:
@@ -3,16 +3,6 @@
|
||||
* for various types
|
||||
*/
|
||||
|
||||
// Replace fallback stringifier for this TU
|
||||
// We should avoid ODR violations because these specific types aren't
|
||||
// present in different TUs
|
||||
#include <string>
|
||||
template <typename T>
|
||||
std::string fallbackStringifier(T const&) {
|
||||
return "{ !!! }";
|
||||
}
|
||||
|
||||
#define CATCH_CONFIG_FALLBACK_STRINGIFIER fallbackStringifier
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
|
||||
@@ -85,7 +75,7 @@ TEST_CASE( "stringify( has_maker_and_operator )", "[toString]" ) {
|
||||
|
||||
TEST_CASE("stringify( has_neither )", "[toString]") {
|
||||
has_neither item;
|
||||
REQUIRE( ::Catch::Detail::stringify(item) == "{ !!! }" );
|
||||
REQUIRE( ::Catch::Detail::stringify(item) == "{?}" );
|
||||
}
|
||||
|
||||
// Call the templated operator
|
||||
@@ -189,5 +179,5 @@ TEST_CASE("stringify ranges", "[toString]") {
|
||||
REQUIRE(::Catch::Detail::stringify(streamable_range{}) == "op<<(streamable_range)");
|
||||
REQUIRE(::Catch::Detail::stringify(stringmaker_range{}) == "stringmaker(streamable_range)");
|
||||
REQUIRE(::Catch::Detail::stringify(just_range{}) == "{ 1, 2, 3, 4 }");
|
||||
REQUIRE(::Catch::Detail::stringify(disabled_range{}) == "{ !!! }");
|
||||
REQUIRE(::Catch::Detail::stringify(disabled_range{}) == "{?}");
|
||||
}
|
||||
|
Reference in New Issue
Block a user