Makes the output understandable by VS when compiled by MSVC.

This commit is contained in:
shiqian 2008-07-23 20:32:11 +00:00
parent b758726396
commit 253d2bc576
4 changed files with 69 additions and 114 deletions

View File

@ -4,6 +4,7 @@
# here. Please keep the list sorted by first names. # here. Please keep the list sorted by first names.
Ajay Joshi <jaj@google.com> Ajay Joshi <jaj@google.com>
Balázs Dán <balazs.dan@gmail.com>
Bharat Mediratta <bharat@menalto.com> Bharat Mediratta <bharat@menalto.com>
Chandler Carruth <chandlerc@google.com> Chandler Carruth <chandlerc@google.com>
Chris Prince <cprince@google.com> Chris Prince <cprince@google.com>

View File

@ -2149,7 +2149,11 @@ static const char * TestPartResultTypeToString(TestPartResultType type) {
case TPRT_NONFATAL_FAILURE: case TPRT_NONFATAL_FAILURE:
case TPRT_FATAL_FAILURE: case TPRT_FATAL_FAILURE:
return "Failure"; #ifdef _MSC_VER
return "error: ";
#else
return "Failure\n";
#endif
} }
return "Unknown result type"; return "Unknown result type";
@ -2162,9 +2166,13 @@ static void PrintTestPartResult(
printf("%s", file_name == NULL ? "unknown file" : file_name); printf("%s", file_name == NULL ? "unknown file" : file_name);
if (test_part_result.line_number() >= 0) { 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()); 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()); printf("%s\n", test_part_result.message());
fflush(stdout); fflush(stdout);
} }

View File

@ -78,11 +78,12 @@ def RemoveLocations(output):
Returns: Returns:
output with all file location info (in the form of output with all file location info (in the form of
'DIRECTORY/FILE_NAME:LINE_NUMBER: ') replaced by 'DIRECTORY/FILE_NAME:LINE_NUMBER: 'or
'DIRECTORY\\FILE_NAME(LINE_NUMBER): ') replaced by
'FILE_NAME:#: '. 'FILE_NAME:#: '.
""" """
return re.sub(r'.*[/\\](.+)\:\d+\: ', r'\1:#: ', output) return re.sub(r'.*[/\\](.+)(\:\d+|\(\d+\))\: ', r'\1:#: ', output)
def RemoveStackTraces(output): def RemoveStackTraces(output):

View File

@ -1,11 +1,9 @@
The non-test part of the code is expected to have 2 failures. The non-test part of the code is expected to have 2 failures.
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Value of: false
Value of: false
Actual: false Actual: false
Expected: true Expected: true
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Value of: 3
Value of: 3
Expected: 2 Expected: 2
[==========] Running 40 tests from 16 test cases. [==========] Running 40 tests from 16 test cases.
[----------] Global test environment set-up. [----------] Global test environment set-up.
@ -14,22 +12,19 @@ BarEnvironment::SetUp() called.
[----------] 3 tests from FatalFailureTest [----------] 3 tests from FatalFailureTest
[ RUN ] FatalFailureTest.FatalFailureInSubroutine [ RUN ] FatalFailureTest.FatalFailureInSubroutine
(expecting a failure that x should be 1) (expecting a failure that x should be 1)
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Value of: x
Value of: x
Actual: 2 Actual: 2
Expected: 1 Expected: 1
[ FAILED ] FatalFailureTest.FatalFailureInSubroutine [ FAILED ] FatalFailureTest.FatalFailureInSubroutine
[ RUN ] FatalFailureTest.FatalFailureInNestedSubroutine [ RUN ] FatalFailureTest.FatalFailureInNestedSubroutine
(expecting a failure that x should be 1) (expecting a failure that x should be 1)
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Value of: x
Value of: x
Actual: 2 Actual: 2
Expected: 1 Expected: 1
[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine [ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine
[ RUN ] FatalFailureTest.NonfatalFailureInSubroutine [ RUN ] FatalFailureTest.NonfatalFailureInSubroutine
(expecting a failure on false) (expecting a failure on false)
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Value of: false
Value of: false
Actual: false Actual: false
Expected: true Expected: true
[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine [ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine
@ -38,38 +33,31 @@ Expected: true
(expecting 2 failures on (3) >= (a[i])) (expecting 2 failures on (3) >= (a[i]))
i == 0 i == 0
i == 1 i == 1
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Expected: (3) >= (a[i]), actual: 3 vs 9
Expected: (3) >= (a[i]), actual: 3 vs 9
i == 2 i == 2
i == 3 i == 3
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Expected: (3) >= (a[i]), actual: 3 vs 6
Expected: (3) >= (a[i]), actual: 3 vs 6
[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions [ FAILED ] LoggingTest.InterleavingLoggingAndAssertions
[----------] 5 tests from SCOPED_TRACETest [----------] 5 tests from SCOPED_TRACETest
[ RUN ] SCOPED_TRACETest.ObeysScopes [ RUN ] SCOPED_TRACETest.ObeysScopes
(expected to fail) (expected to fail)
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
This failure is expected, and shouldn't have a trace. This failure is expected, and shouldn't have a trace.
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
This failure is expected, and should have a trace. This failure is expected, and should have a trace.
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: Expected trace gtest_output_test_.cc:#: Expected trace
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
This failure is expected, and shouldn't have a trace. This failure is expected, and shouldn't have a trace.
[ FAILED ] SCOPED_TRACETest.ObeysScopes [ FAILED ] SCOPED_TRACETest.ObeysScopes
[ RUN ] SCOPED_TRACETest.WorksInLoop [ RUN ] SCOPED_TRACETest.WorksInLoop
(expected to fail) (expected to fail)
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Value of: n
Value of: n
Actual: 1 Actual: 1
Expected: 2 Expected: 2
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: i = 1 gtest_output_test_.cc:#: i = 1
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Value of: n
Value of: n
Actual: 2 Actual: 2
Expected: 1 Expected: 1
Google Test trace: Google Test trace:
@ -77,14 +65,12 @@ gtest_output_test_.cc:#: i = 2
[ FAILED ] SCOPED_TRACETest.WorksInLoop [ FAILED ] SCOPED_TRACETest.WorksInLoop
[ RUN ] SCOPED_TRACETest.WorksInSubroutine [ RUN ] SCOPED_TRACETest.WorksInSubroutine
(expected to fail) (expected to fail)
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Value of: n
Value of: n
Actual: 1 Actual: 1
Expected: 2 Expected: 2
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: n = 1 gtest_output_test_.cc:#: n = 1
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Value of: n
Value of: n
Actual: 2 Actual: 2
Expected: 1 Expected: 1
Google Test trace: Google Test trace:
@ -92,8 +78,7 @@ gtest_output_test_.cc:#: n = 2
[ FAILED ] SCOPED_TRACETest.WorksInSubroutine [ FAILED ] SCOPED_TRACETest.WorksInSubroutine
[ RUN ] SCOPED_TRACETest.CanBeNested [ RUN ] SCOPED_TRACETest.CanBeNested
(expected to fail) (expected to fail)
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Value of: n
Value of: n
Actual: 2 Actual: 2
Expected: 1 Expected: 1
Google Test trace: Google Test trace:
@ -102,26 +87,22 @@ gtest_output_test_.cc:#:
[ FAILED ] SCOPED_TRACETest.CanBeNested [ FAILED ] SCOPED_TRACETest.CanBeNested
[ RUN ] SCOPED_TRACETest.CanBeRepeated [ RUN ] SCOPED_TRACETest.CanBeRepeated
(expected to fail) (expected to fail)
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
This failure is expected, and should contain trace point A. This failure is expected, and should contain trace point A.
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: A gtest_output_test_.cc:#: A
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
This failure is expected, and should contain trace point A and B. This failure is expected, and should contain trace point A and B.
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: B gtest_output_test_.cc:#: B
gtest_output_test_.cc:#: A gtest_output_test_.cc:#: A
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
This failure is expected, and should contain trace point A, B, and C. This failure is expected, and should contain trace point A, B, and C.
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: C gtest_output_test_.cc:#: C
gtest_output_test_.cc:#: B gtest_output_test_.cc:#: B
gtest_output_test_.cc:#: A gtest_output_test_.cc:#: A
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
This failure is expected, and should contain trace point A, B, and D. This failure is expected, and should contain trace point A, B, and D.
Google Test trace: Google Test trace:
gtest_output_test_.cc:#: D gtest_output_test_.cc:#: D
@ -131,88 +112,67 @@ gtest_output_test_.cc:#: A
[----------] 1 test from NonFatalFailureInFixtureConstructorTest [----------] 1 test from NonFatalFailureInFixtureConstructorTest
[ RUN ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor [ RUN ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor
(expecting 5 failures) (expecting 5 failures)
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
Expected failure #1, in the test fixture c'tor. Expected failure #1, in the test fixture c'tor.
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
Expected failure #2, in SetUp(). Expected failure #2, in SetUp().
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
Expected failure #3, in the test body. Expected failure #3, in the test body.
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
Expected failure #4, in TearDown. Expected failure #4, in TearDown.
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
Expected failure #5, in the test fixture d'tor. Expected failure #5, in the test fixture d'tor.
[ FAILED ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor [ FAILED ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor
[----------] 1 test from FatalFailureInFixtureConstructorTest [----------] 1 test from FatalFailureInFixtureConstructorTest
[ RUN ] FatalFailureInFixtureConstructorTest.FailureInConstructor [ RUN ] FatalFailureInFixtureConstructorTest.FailureInConstructor
(expecting 2 failures) (expecting 2 failures)
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
Expected failure #1, in the test fixture c'tor. Expected failure #1, in the test fixture c'tor.
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
Expected failure #2, in the test fixture d'tor. Expected failure #2, in the test fixture d'tor.
[ FAILED ] FatalFailureInFixtureConstructorTest.FailureInConstructor [ FAILED ] FatalFailureInFixtureConstructorTest.FailureInConstructor
[----------] 1 test from NonFatalFailureInSetUpTest [----------] 1 test from NonFatalFailureInSetUpTest
[ RUN ] NonFatalFailureInSetUpTest.FailureInSetUp [ RUN ] NonFatalFailureInSetUpTest.FailureInSetUp
(expecting 4 failures) (expecting 4 failures)
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
Expected failure #1, in SetUp(). Expected failure #1, in SetUp().
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
Expected failure #2, in the test function. Expected failure #2, in the test function.
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
Expected failure #3, in TearDown(). Expected failure #3, in TearDown().
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
Expected failure #4, in the test fixture d'tor. Expected failure #4, in the test fixture d'tor.
[ FAILED ] NonFatalFailureInSetUpTest.FailureInSetUp [ FAILED ] NonFatalFailureInSetUpTest.FailureInSetUp
[----------] 1 test from FatalFailureInSetUpTest [----------] 1 test from FatalFailureInSetUpTest
[ RUN ] FatalFailureInSetUpTest.FailureInSetUp [ RUN ] FatalFailureInSetUpTest.FailureInSetUp
(expecting 3 failures) (expecting 3 failures)
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
Expected failure #1, in SetUp(). Expected failure #1, in SetUp().
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
Expected failure #2, in TearDown(). Expected failure #2, in TearDown().
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
Expected failure #3, in the test fixture d'tor. Expected failure #3, in the test fixture d'tor.
[ FAILED ] FatalFailureInSetUpTest.FailureInSetUp [ FAILED ] FatalFailureInSetUpTest.FailureInSetUp
[----------] 1 test from ExceptionInFixtureCtorTest [----------] 1 test from ExceptionInFixtureCtorTest
[ RUN ] ExceptionInFixtureCtorTest.ExceptionInFixtureCtor [ RUN ] ExceptionInFixtureCtorTest.ExceptionInFixtureCtor
(expecting a failure on thrown exception in the test fixture's constructor) (expecting a failure on thrown exception in the test fixture's constructor)
unknown file: Failure unknown file: error: Exception thrown with code 0xc0000005 in the test fixture's constructor.
Exception thrown with code 0xc0000005 in the test fixture's constructor.
[----------] 1 test from ExceptionInSetUpTest [----------] 1 test from ExceptionInSetUpTest
[ RUN ] ExceptionInSetUpTest.ExceptionInSetUp [ RUN ] ExceptionInSetUpTest.ExceptionInSetUp
(expecting 3 failures) (expecting 3 failures)
unknown file: Failure unknown file: error: Exception thrown with code 0xc0000005 in SetUp().
Exception thrown with code 0xc0000005 in SetUp(). gtest_output_test_.cc:#: error: Failed
gtest_output_test_.cc:#: Failure
Failed
Expected failure #2, in TearDown(). Expected failure #2, in TearDown().
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
Expected failure #3, in the test fixture d'tor. Expected failure #3, in the test fixture d'tor.
[ FAILED ] ExceptionInSetUpTest.ExceptionInSetUp [ FAILED ] ExceptionInSetUpTest.ExceptionInSetUp
[----------] 1 test from ExceptionInTestFunctionTest [----------] 1 test from ExceptionInTestFunctionTest
[ RUN ] ExceptionInTestFunctionTest.SEH [ RUN ] ExceptionInTestFunctionTest.SEH
(expecting 3 failures) (expecting 3 failures)
unknown file: Failure unknown file: error: Exception thrown with code 0xc0000005 in the test body.
Exception thrown with code 0xc0000005 in the test body. gtest_output_test_.cc:#: error: Failed
gtest_output_test_.cc:#: Failure
Failed
Expected failure #2, in TearDown(). Expected failure #2, in TearDown().
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
Expected failure #3, in the test fixture d'tor. Expected failure #3, in the test fixture d'tor.
[ FAILED ] ExceptionInTestFunctionTest.SEH [ FAILED ] ExceptionInTestFunctionTest.SEH
[----------] 4 tests from MixedUpTestCaseTest [----------] 4 tests from MixedUpTestCaseTest
@ -221,8 +181,7 @@ Expected failure #3, in the test fixture d'tor.
[ RUN ] MixedUpTestCaseTest.SecondTestFromNamespaceFoo [ RUN ] MixedUpTestCaseTest.SecondTestFromNamespaceFoo
[ OK ] MixedUpTestCaseTest.SecondTestFromNamespaceFoo [ OK ] MixedUpTestCaseTest.SecondTestFromNamespaceFoo
[ RUN ] MixedUpTestCaseTest.ThisShouldFail [ RUN ] MixedUpTestCaseTest.ThisShouldFail
gtest.cc:#: Failure gtest.cc:#: error: Failed
Failed
All tests in the same test case must use the same test fixture All tests in the same test case must use the same test fixture
class. However, in test case MixedUpTestCaseTest, class. However, in test case MixedUpTestCaseTest,
you defined test FirstTestFromNamespaceFoo and test ThisShouldFail you defined test FirstTestFromNamespaceFoo and test ThisShouldFail
@ -232,8 +191,7 @@ units and have the same name. You should probably rename one
of the classes to put the tests into different test cases. of the classes to put the tests into different test cases.
[ FAILED ] MixedUpTestCaseTest.ThisShouldFail [ FAILED ] MixedUpTestCaseTest.ThisShouldFail
[ RUN ] MixedUpTestCaseTest.ThisShouldFailToo [ RUN ] MixedUpTestCaseTest.ThisShouldFailToo
gtest.cc:#: Failure gtest.cc:#: error: Failed
Failed
All tests in the same test case must use the same test fixture All tests in the same test case must use the same test fixture
class. However, in test case MixedUpTestCaseTest, class. However, in test case MixedUpTestCaseTest,
you defined test FirstTestFromNamespaceFoo and test ThisShouldFailToo you defined test FirstTestFromNamespaceFoo and test ThisShouldFailToo
@ -246,8 +204,7 @@ of the classes to put the tests into different test cases.
[ RUN ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail [ RUN ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail
[ OK ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail [ OK ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail
[ RUN ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail [ RUN ] MixedUpTestCaseWithSameTestNameTest.TheSecondTestWithThisNameShouldFail
gtest.cc:#: Failure gtest.cc:#: error: Failed
Failed
All tests in the same test case must use the same test fixture All tests in the same test case must use the same test fixture
class. However, in test case MixedUpTestCaseWithSameTestNameTest, class. However, in test case MixedUpTestCaseWithSameTestNameTest,
you defined test TheSecondTestWithThisNameShouldFail and test TheSecondTestWithThisNameShouldFail you defined test TheSecondTestWithThisNameShouldFail and test TheSecondTestWithThisNameShouldFail
@ -260,8 +217,7 @@ of the classes to put the tests into different test cases.
[ RUN ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTEST_F [ RUN ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTEST_F
[ OK ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTEST_F [ OK ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTEST_F
[ RUN ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail [ RUN ] TEST_F_before_TEST_in_same_test_case.DefinedUsingTESTAndShouldFail
gtest.cc:#: Failure gtest.cc:#: error: Failed
Failed
All tests in the same test case must use the same test fixture All tests in the same test case must use the same test fixture
class, so mixing TEST_F and TEST in the same test case is class, so mixing TEST_F and TEST in the same test case is
illegal. In test case TEST_F_before_TEST_in_same_test_case, illegal. In test case TEST_F_before_TEST_in_same_test_case,
@ -274,8 +230,7 @@ case.
[ RUN ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST [ RUN ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST
[ OK ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST [ OK ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST
[ RUN ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail [ RUN ] TEST_before_TEST_F_in_same_test_case.DefinedUsingTEST_FAndShouldFail
gtest.cc:#: Failure gtest.cc:#: error: Failed
Failed
All tests in the same test case must use the same test fixture All tests in the same test case must use the same test fixture
class, so mixing TEST_F and TEST in the same test case is class, so mixing TEST_F and TEST in the same test case is
illegal. In test case TEST_before_TEST_F_in_same_test_case, illegal. In test case TEST_before_TEST_F_in_same_test_case,
@ -293,14 +248,12 @@ case.
[ OK ] ExpectNonfatalFailureTest.SucceedsWhenThereIsOneNonfatalFailure [ OK ] ExpectNonfatalFailureTest.SucceedsWhenThereIsOneNonfatalFailure
[ RUN ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure [ RUN ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure
(expecting a failure) (expecting a failure)
gtest.cc:#: Failure gtest.cc:#: error: Expected: 1 non-fatal failure
Expected: 1 non-fatal failure
Actual: 0 failures Actual: 0 failures
[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure [ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsNoNonfatalFailure
[ RUN ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures [ RUN ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures
(expecting a failure) (expecting a failure)
gtest.cc:#: Failure gtest.cc:#: error: Expected: 1 non-fatal failure
Expected: 1 non-fatal failure
Actual: 2 failures Actual: 2 failures
gtest_output_test_.cc:#: Non-fatal failure: gtest_output_test_.cc:#: Non-fatal failure:
Failed Failed
@ -313,8 +266,7 @@ Expected non-fatal failure 2.
[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures [ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereAreTwoNonfatalFailures
[ RUN ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure [ RUN ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure
(expecting a failure) (expecting a failure)
gtest.cc:#: Failure gtest.cc:#: error: Expected: 1 non-fatal failure
Expected: 1 non-fatal failure
Actual: Actual:
gtest_output_test_.cc:#: Fatal failure: gtest_output_test_.cc:#: Fatal failure:
Failed Failed
@ -323,8 +275,7 @@ Expected fatal failure.
[ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure [ FAILED ] ExpectNonfatalFailureTest.FailsWhenThereIsOneFatalFailure
[ RUN ] ExpectNonfatalFailureTest.FailsWhenStatementReturns [ RUN ] ExpectNonfatalFailureTest.FailsWhenStatementReturns
(expecting a failure) (expecting a failure)
gtest.cc:#: Failure gtest.cc:#: error: Expected: 1 non-fatal failure
Expected: 1 non-fatal failure
Actual: 0 failures Actual: 0 failures
[ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementReturns [ FAILED ] ExpectNonfatalFailureTest.FailsWhenStatementReturns
[----------] 7 tests from ExpectFatalFailureTest [----------] 7 tests from ExpectFatalFailureTest
@ -336,14 +287,12 @@ Expected: 1 non-fatal failure
[ OK ] ExpectFatalFailureTest.SucceedsWhenThereIsOneFatalFailure [ OK ] ExpectFatalFailureTest.SucceedsWhenThereIsOneFatalFailure
[ RUN ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure [ RUN ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure
(expecting a failure) (expecting a failure)
gtest.cc:#: Failure gtest.cc:#: error: Expected: 1 fatal failure
Expected: 1 fatal failure
Actual: 0 failures Actual: 0 failures
[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure [ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsNoFatalFailure
[ RUN ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures [ RUN ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures
(expecting a failure) (expecting a failure)
gtest.cc:#: Failure gtest.cc:#: error: Expected: 1 fatal failure
Expected: 1 fatal failure
Actual: 2 failures Actual: 2 failures
gtest_output_test_.cc:#: Fatal failure: gtest_output_test_.cc:#: Fatal failure:
Failed Failed
@ -356,8 +305,7 @@ Expected fatal failure.
[ FAILED ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures [ FAILED ] ExpectFatalFailureTest.FailsWhenThereAreTwoFatalFailures
[ RUN ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure [ RUN ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure
(expecting a failure) (expecting a failure)
gtest.cc:#: Failure gtest.cc:#: error: Expected: 1 fatal failure
Expected: 1 fatal failure
Actual: Actual:
gtest_output_test_.cc:#: Non-fatal failure: gtest_output_test_.cc:#: Non-fatal failure:
Failed Failed
@ -366,18 +314,15 @@ Expected non-fatal failure.
[ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure [ FAILED ] ExpectFatalFailureTest.FailsWhenThereIsOneNonfatalFailure
[ RUN ] ExpectFatalFailureTest.FailsWhenStatementReturns [ RUN ] ExpectFatalFailureTest.FailsWhenStatementReturns
(expecting a failure) (expecting a failure)
gtest.cc:#: Failure gtest.cc:#: error: Expected: 1 fatal failure
Expected: 1 fatal failure
Actual: 0 failures Actual: 0 failures
[ FAILED ] ExpectFatalFailureTest.FailsWhenStatementReturns [ FAILED ] ExpectFatalFailureTest.FailsWhenStatementReturns
[----------] Global test environment tear-down [----------] Global test environment tear-down
BarEnvironment::TearDown() called. BarEnvironment::TearDown() called.
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
Expected non-fatal failure. Expected non-fatal failure.
FooEnvironment::TearDown() called. FooEnvironment::TearDown() called.
gtest_output_test_.cc:#: Failure gtest_output_test_.cc:#: error: Failed
Failed
Expected fatal failure. Expected fatal failure.
[==========] 40 tests from 16 test cases ran. [==========] 40 tests from 16 test cases ran.
[ PASSED ] 11 tests. [ PASSED ] 11 tests.