diff options
author | shiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925> | 2008-07-23 20:32:11 (GMT) |
---|---|---|
committer | shiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925> | 2008-07-23 20:32:11 (GMT) |
commit | 253d2bc5760533c136f5b1b34b8c6f03d79fc538 (patch) | |
tree | 38d7aba99dbe9ca9cfb0b53924735c9d8054bba9 /src | |
parent | b75872639683cf572253f20863982324b113205e (diff) | |
download | googletest-253d2bc5760533c136f5b1b34b8c6f03d79fc538.zip googletest-253d2bc5760533c136f5b1b34b8c6f03d79fc538.tar.gz googletest-253d2bc5760533c136f5b1b34b8c6f03d79fc538.tar.bz2 |
Makes the output understandable by VS when compiled by MSVC.
Diffstat (limited to 'src')
-rw-r--r-- | src/gtest.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gtest.cc b/src/gtest.cc index 235ec5a..57ff15a 100644 --- a/src/gtest.cc +++ b/src/gtest.cc @@ -2149,7 +2149,11 @@ static const char * TestPartResultTypeToString(TestPartResultType type) { case TPRT_NONFATAL_FAILURE: case TPRT_FATAL_FAILURE: - return "Failure"; +#ifdef _MSC_VER + return "error: "; +#else + return "Failure\n"; +#endif } return "Unknown result type"; @@ -2162,9 +2166,13 @@ static void PrintTestPartResult( printf("%s", file_name == NULL ? "unknown file" : file_name); if (test_part_result.line_number() >= 0) { +#ifdef _MSC_VER + printf("(%d)", test_part_result.line_number()); +#else printf(":%d", test_part_result.line_number()); +#endif } - printf(": %s\n", TestPartResultTypeToString(test_part_result.type())); + printf(": %s", TestPartResultTypeToString(test_part_result.type())); printf("%s\n", test_part_result.message()); fflush(stdout); } |