| 792 | DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wnull-dereference") |
| 793 | // depending on the current options this will remove the path of filenames |
| 794 | const 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 | } |
| 808 | DOCTEST_CLANG_SUPPRESS_WARNING_POP |
| 809 | DOCTEST_GCC_SUPPRESS_WARNING_POP |
| 810 |
no test coverage detected