double_stringification.cpp (435B)
1 #define DOCTEST_CONFIG_DOUBLE_STRINGIFY 2 #include <doctest_fwd.h> 3 4 DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN 5 #include <string> 6 DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END 7 8 namespace App { 9 struct Foo { }; 10 static std::string toString(Foo*) { return "Foo"; } 11 } 12 13 TEST_CASE("toString std::string ret type") { 14 App::Foo foo; 15 CHECK(&foo != nullptr); 16 CHECK_NE(&foo, nullptr); 17 CHECK(&foo); 18 }