Implements printing parameters of failed parameterized tests (issue 71).

This commit is contained in:
vladlosev
2010-05-18 21:13:48 +00:00
parent c828e17175
commit 1097b54dcf
7 changed files with 104 additions and 38 deletions

View File

@@ -7,7 +7,7 @@ Expected: true
gtest_output_test_.cc:#: Failure
Value of: 3
Expected: 2
[==========] Running 60 tests from 25 test cases.
[==========] Running 61 tests from 26 test cases.
[----------] Global test environment set-up.
FooEnvironment::SetUp() called.
BarEnvironment::SetUp() called.
@@ -411,7 +411,7 @@ Value of: TypeParam()
Actual: 0
Expected: 1
Expected failure
[ FAILED ] TypedTest/0.Failure
[ FAILED ] TypedTest/0.Failure, where TypeParam = int
[----------] 2 tests from Unsigned/TypedTestP/0, where TypeParam = unsigned char
[ RUN ] Unsigned/TypedTestP/0.Success
[ OK ] Unsigned/TypedTestP/0.Success
@@ -422,7 +422,7 @@ Value of: TypeParam()
Expected: 1U
Which is: 1
Expected failure
[ FAILED ] Unsigned/TypedTestP/0.Failure
[ FAILED ] Unsigned/TypedTestP/0.Failure, where TypeParam = unsigned char
[----------] 2 tests from Unsigned/TypedTestP/1, where TypeParam = unsigned int
[ RUN ] Unsigned/TypedTestP/1.Success
[ OK ] Unsigned/TypedTestP/1.Success
@@ -433,7 +433,7 @@ Value of: TypeParam()
Expected: 1U
Which is: 1
Expected failure
[ FAILED ] Unsigned/TypedTestP/1.Failure
[ FAILED ] Unsigned/TypedTestP/1.Failure, where TypeParam = unsigned int
[----------] 4 tests from ExpectFailureTest
[ RUN ] ExpectFailureTest.ExpectFatalFailure
(expecting 1 failure)
@@ -564,6 +564,13 @@ gtest_output_test_.cc:#: Failure
Failed
Expected non-fatal failure.
[ FAILED ] ScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread
[----------] 1 test from PrintingFailingParams/FailingParamTest
[ RUN ] PrintingFailingParams/FailingParamTest.Fails/0
gtest_output_test_.cc:#: Failure
Value of: GetParam()
Actual: 2
Expected: 1
[ FAILED ] PrintingFailingParams/FailingParamTest.Fails/0, where GetParam() = 2
[----------] Global test environment tear-down
BarEnvironment::TearDown() called.
gtest_output_test_.cc:#: Failure
@@ -573,9 +580,9 @@ FooEnvironment::TearDown() called.
gtest_output_test_.cc:#: Failure
Failed
Expected fatal failure.
[==========] 60 tests from 25 test cases ran.
[==========] 61 tests from 26 test cases ran.
[ PASSED ] 21 tests.
[ FAILED ] 39 tests, listed below:
[ FAILED ] 40 tests, listed below:
[ FAILED ] FatalFailureTest.FatalFailureInSubroutine
[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine
[ FAILED ] FatalFailureTest.NonfatalFailureInSubroutine
@@ -615,8 +622,9 @@ Expected fatal failure.
[ FAILED ] ExpectFailureWithThreadsTest.ExpectFatalFailure
[ FAILED ] ExpectFailureWithThreadsTest.ExpectNonFatalFailure
[ FAILED ] ScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread
[ FAILED ] PrintingFailingParams/FailingParamTest.Fails/0, where GetParam() = 2
39 FAILED TESTS
40 FAILED TESTS
 YOU HAVE 1 DISABLED TEST
Note: Google Test filter = FatalFailureTest.*:LoggingTest.*