File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -54,12 +54,16 @@ TEST_CASE("custom_error_logger")
54
54
const auto fileNameSv = std::string_view (s_loggerArgs.fileName );
55
55
REQUIRE (!fileNameSv.empty ());
56
56
REQUIRE (fileNameSv.find (" custom_error.cpp" ) != std::string::npos);
57
+ #ifdef _DEBUG
57
58
const auto functionNameSv = std::string_view (s_loggerArgs.functionName );
58
59
REQUIRE (!functionNameSv.empty ());
59
60
// Every compiler has a slightly different naming approach for this function, and even the same
60
61
// compiler can change its mind over time. Instead of matching the entire function name just
61
62
// match against the part we care about.
62
63
REQUIRE ((functionNameSv.find (" FailOnLine15" ) != std::string_view::npos));
64
+ #else
65
+ REQUIRE (s_loggerArgs.functionName == nullptr );
66
+ #endif // _DEBUG
63
67
64
68
REQUIRE (s_loggerArgs.returnAddress );
65
69
REQUIRE (s_loggerArgs.result == static_cast <int32_t >(0x80000018 )); // E_ILLEGAL_DELEGATE_ASSIGNMENT)
You can’t perform that action at this time.
0 commit comments