The non-test part of the code is expected to have 2 failures.
gtest_output_test_.cc:#: Failure
Value of: false
Actual: false
Expected: true
gtest_output_test_.cc:#: Failure
Value of: 3
Expected: 2
[0;32m[==========] [mRunning 63 tests from 28 test cases.
[0;32m[----------] [mGlobal test environment set-up.
FooEnvironment::SetUp() called.
BarEnvironment::SetUp() called.
[0;32m[----------] [m1 test from ADeathTest
[0;32m[ RUN ] [mADeathTest.ShouldRunFirst
[0;32m[ OK ] [mADeathTest.ShouldRunFirst
[0;32m[----------] [m1 test from ATypedDeathTest/0, where TypeParam = int
[0;32m[ RUN ] [mATypedDeathTest/0.ShouldRunFirst
[0;32m[ OK ] [mATypedDeathTest/0.ShouldRunFirst
[0;32m[----------] [m1 test from ATypedDeathTest/1, where TypeParam = double
[0;32m[ RUN ] [mATypedDeathTest/1.ShouldRunFirst
[0;32m[ OK ] [mATypedDeathTest/1.ShouldRunFirst
[0;32m[----------] [m1 test from My/ATypeParamDeathTest/0, where TypeParam = int
[0;32m[ RUN ] [mMy/ATypeParamDeathTest/0.ShouldRunFirst
[0;32m[ OK ] [mMy/ATypeParamDeathTest/0.ShouldRunFirst
[0;32m[----------] [m1 test from My/ATypeParamDeathTest/1, where TypeParam = double
[0;32m[ RUN ] [mMy/ATypeParamDeathTest/1.ShouldRunFirst
[0;32m[ OK ] [mMy/ATypeParamDeathTest/1.ShouldRunFirst
[0;32m[----------] [m2 tests from PassingTest
[0;32m[ RUN ] [mPassingTest.PassingTest1
[0;32m[ OK ] [mPassingTest.PassingTest1
[0;32m[ RUN ] [mPassingTest.PassingTest2
[0;32m[ OK ] [mPassingTest.PassingTest2
[0;32m[----------] [m1 test from NonfatalFailureTest
[0;32m[ RUN ] [mNonfatalFailureTest.EscapesStringOperands
gtest_output_test_.cc:#: Failure
Value of: actual
Actual: "actual \"string\""
Expected: kGoldenString
Which is: "\"Line"
gtest_output_test_.cc:#: Failure
Value of: actual
Actual: "actual \"string\""
Expected: golden
Which is: "\"Line"
[0;31m[ FAILED ] [mNonfatalFailureTest.EscapesStringOperands
[0;32m[----------] [m3 tests from FatalFailureTest
[0;32m[ RUN ] [mFatalFailureTest.FatalFailureInSubroutine
(expecting a failure that x should be 1)
gtest_output_test_.cc:#: Failure
Value of: x
Actual: 2
Expected: 1
[0;31m[ FAILED ] [mFatalFailureTest.FatalFailureInSubroutine
[0;32m[ RUN ] [mFatalFailureTest.FatalFailureInNestedSubroutine
(expecting a failure that x should be 1)
gtest_output_test_.cc:#: Failure
Value of: x
Actual: 2
Expected: 1
[0;31m[ FAILED ] [mFatalFailureTest.FatalFailureInNestedSubroutine
[0;32m[ RUN ] [mFatalFailureTest.NonfatalFailureInSubroutine
(expecting a failure on false)
gtest_output_test_.cc:#: Failure
Value of: false
Actual: false
Expected: true
[0;31m[ FAILED ] [mFatalFailureTest.NonfatalFailureInSubroutine
[0;32m[----------] [m1 test from LoggingTest
[0;32m[ RUN ] [mLoggingTest.InterleavingLoggingAndAssertions
(expecting 2 failures on (3) >= (a[i]))
i == 0
i == 1
gtest_output_test_.cc:#: Failure
Expected: (3) >= (a[i]), actual: 3 vs 9
i == 2
i == 3
gtest_output_test_.cc:#: Failure
Expected: (3) >= (a[i]), actual: 3 vs 6
[0;31m[ FAILED ] [mLoggingTest.InterleavingLoggingAndAssertions
[0;32m[----------] [m6 tests from SCOPED_TRACETest
[0;32m[ RUN ] [mSCOPED_TRACETest.ObeysScopes
(expected to fail)
gtest_output_test_.cc:#: Failure
Failed
This failure is expected, and shouldn't have a trace.
gtest_output_test_.cc:#: Failure
Failed
This failure is expected, and should have a trace.
Google Test trace:
gtest_output_test_.cc:#: Expected trace
gtest_output_test_.cc:#: Failure
Failed
This failure is expected, and shouldn't have a trace.
[0;31m[ FAILED ] [mSCOPED_TRACETest.ObeysScopes
[0;32m[ RUN ] [mSCOPED_TRACETest.WorksInLoop
(expected to fail)
gtest_output_test_.cc:#: Failure
Value of: n
Actual: 1
Expected: 2
Google Test trace:
gtest_output_test_.cc:#: i = 1
gtest_output_test_.cc:#: Failure
Value of: n
Actual: 2
Expected: 1
Google Test trace:
gtest_output_test_.cc:#: i = 2
[0;31m[ FAILED ] [mSCOPED_TRACETest.WorksInLoop
[0;32m[ RUN ] [mSCOPED_TRACETest.WorksInSubroutine
(expected to fail)
gtest_output_test_.cc:#: Failure
Value of: n
Actual: 1
Expected: 2
Google Test trace:
gtest_output_test_.cc:#: n = 1
gtest_output_test_.cc:#: Failure
Value of: n
Actual: 2
Expected: 1
Google Test trace:
gtest_output_test_.cc:#: n = 2
[0;31m[ FAILED ] [mSCOPED_TRACETest.WorksInSubroutine
[0;32m[ RUN ] [mSCOPED_TRACETest.CanBeNested
(expected to fail)
gtest_output_test_.cc:#: Failure
Value of: n
Actual: 2
Expected: 1
Google Test trace:
gtest_output_test_.cc:#: n = 2
gtest_output_test_.cc:#:
[0;31m[ FAILED ] [mSCOPED_TRACETest.CanBeNested
[0;32m[ RUN ] [mSCOPED_TRACETest.CanBeRepeated
(expected to fail)
gtest_output_test_.cc:#: Failure
Failed
This failure is expected, and should contain trace point A.
Google Test trace:
gtest_output_test_.cc:#: A
gtest_output_test_.cc:#: Failure
Failed
This failure is expected, and should contain trace point A and B.
Google Test trace:
gtest_output_test_.cc:#: B
gtest_output_test_.cc:#: A
gtest_output_test_.cc:#: Failure
Failed
This failure is expected, and should contain trace point A, B, and C.
Google Test trace:
gtest_output_test_.cc:#: C
gtest_output_test_.cc:#: B
gtest_output_test_.cc:#: A
gtest_output_test_.cc:#: Failure
Failed
This failure is expected, and should contain trace point A, B, and D.
Google Test trace:
gtest_output_test_.cc:#: D
gtest_output_test_.cc:#: B
gtest_output_test_.cc:#: A
[0;31m[ FAILED ] [mSCOPED_TRACETest.CanBeRepeated
[0;32m[ RUN ] [mSCOPED_TRACETest.WorksConcurrently
(expecting 6 failures)
gtest_output_test_.cc:#: Failure
Failed
Expected failure #1 (in thread B, only trace B alive).
Google Test trace:
gtest_output_test_.cc:#: Trace B
gtest_output_test_.cc:#: Failure
Failed
Expected failure #2 (in thread A, trace A & B both alive).
Google Test trace:
gtest_output_test_.cc:#: Trace A
gtest_output_test_.cc:#: Failure
Failed
Expected failure #3 (in thread B, trace A & B both alive).
Google Test trace:
gtest_output_test_.cc:#: Trace B
gtest_output_test_.cc:#: Failure
Failed
Expected failure #4 (in thread B, only trace A alive).
gtest_output_test_.cc:#: Failure
Failed
Expected failure #5 (in thread A, only trace A alive).
Google Test trace:
gtest_output_test_.cc:#: Trace A
gtest_output_test_.cc:#: Failure
Failed
Expected failure #6 (in thread A, no trace alive).
[0;31m[ FAILED ] [mSCOPED_TRACETest.WorksConcurrently
[0;32m[----------] [m1 test from NonFatalFailureInFixtureConstructorTest
[0;32m[ RUN ] [mNonFatalFailureInFixtureConstructorTest.FailureInConstructor
(expecting 5 failures)
gtest_output_test_.cc:#: Failure
Failed
Expected failure #1, in the test fixture c'tor.
gtest_output_test_.cc:#: Failure
Failed
Expected failure #2, in SetUp().
gtest_output_test_.cc:#: Failure
Failed
Expected failure #3, in the test body.
gtest_output_test_.cc:#: Failure
Failed
Expected failure #4, in TearDown.
gtest_output_test_.cc:#: Failure
Failed
Expected failure #5, in the test fixture d'tor.
[0;31m[ FAILED ] [mNonFatalFailureInFixtureConstructorTest.FailureInConstructor
[0;32m[----------] [m1 test from FatalFailureInFixtureConstructorTest
[0;32m[ RUN ] [mFatalFailureInFixtureConstructorTest.FailureInConstructor
(expecting 2 failures)
gtest_output_test_.cc:#: Failure
Failed
Expected failure #1, in the test fixture c'tor.
gtest_output_test_.cc:#: Failure
Failed
Expected failure #2, in the test fixture d'tor.
[0;31m[ FAILED ] [mFatalFailureInFixtureConstructorTest.FailureInConstructor
[0;32m[----------] [m1 test from NonFatalFailureInSetUpTest
[0;32m[ RUN ] [mNonFatalFailureInSetUpTest.FailureInSetUp
(expecting 4 failures)
gtest_output_test_.cc:#: Failure
Failed
Expected failure #1, in SetUp().
gtest_output_test_.cc:#: Failure
Failed
Expected failure #2, in the test function.
gtest_output_test_.cc:#: Failure
Failed
Expected failure #3, in TearDown().
gtest_output_test_.cc:#: Failure
评论0