diff options
Diffstat (limited to 'UnitTesting/GTMGoogleTestRunner.mm')
-rw-r--r-- | UnitTesting/GTMGoogleTestRunner.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/UnitTesting/GTMGoogleTestRunner.mm b/UnitTesting/GTMGoogleTestRunner.mm index 0bcb500..018f815 100644 --- a/UnitTesting/GTMGoogleTestRunner.mm +++ b/UnitTesting/GTMGoogleTestRunner.mm @@ -86,7 +86,8 @@ class GoogleTestPrinter : public EmptyTestEventListener { virtual void OnTestPartResult(const TestPartResult &test_part_result) { if (!test_part_result.passed()) { - NSString *file = @(test_part_result.file_name()); + const char *file_name = test_part_result.file_name(); + NSString *file = @(file_name ? file_name : "<file name unavailable>"); int line = test_part_result.line_number(); NSString *summary = @(test_part_result.summary()); |