MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / skipPathFromFilename

Function skipPathFromFilename

tests/framework/src/doctest.cpp:794–807  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

792DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wnull-dereference")
793// depending on the current options this will remove the path of filenames
794const char* skipPathFromFilename(const char* file) {
795#ifndef DOCTEST_CONFIG_DISABLE
796 if(getContextOptions()->no_path_in_filenames) {
797 auto back = std::strrchr(file, '\\');
798 auto forward = std::strrchr(file, '/');
799 if(back || forward) {
800 if(back > forward)
801 forward = back;
802 return forward + 1;
803 }
804 }
805#endif // DOCTEST_CONFIG_DISABLE
806 return file;
807}
808DOCTEST_CLANG_SUPPRESS_WARNING_POP
809DOCTEST_GCC_SUPPRESS_WARNING_POP
810

Callers 12

test_case_start_implMethod · 0.85
report_queryMethod · 0.85
test_run_startMethod · 0.85
subcase_startMethod · 0.85
log_assertMethod · 0.85
log_messageMethod · 0.85
test_run_endMethod · 0.85
test_case_startMethod · 0.85
test_case_reenterMethod · 0.85
log_assertMethod · 0.85
log_messageMethod · 0.85
file_line_to_streamMethod · 0.85

Calls 1

getContextOptionsFunction · 0.85

Tested by

no test coverage detected