Returns the current application's name, removing directory path if that is present.
| 627 | // Returns the current application's name, removing directory path if that |
| 628 | // is present. |
| 629 | FilePath GetCurrentExecutableName() { |
| 630 | FilePath result; |
| 631 | |
| 632 | #if GTEST_OS_WINDOWS || GTEST_OS_OS2 |
| 633 | result.Set(FilePath(GetArgvs()[0]).RemoveExtension("exe")); |
| 634 | #else |
| 635 | result.Set(FilePath(GetArgvs()[0])); |
| 636 | #endif // GTEST_OS_WINDOWS |
| 637 | |
| 638 | return result.RemoveDirectoryName(); |
| 639 | } |
| 640 | #endif // GTEST_HAS_FILE_SYSTEM |
| 641 | |
| 642 | // Functions for processing the gtest_output flag. |
no test coverage detected