Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
6324796b
Commit
6324796b
authored
Aug 01, 2018
by
Gennadiy Civil
Browse files
googletest-output-test changes
parent
e69a1a83
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
119 additions
and
118 deletions
+119
-118
googletest/test/BUILD.bazel
googletest/test/BUILD.bazel
+7
-6
googletest/test/googletest-output-test-golden-lin.txt
googletest/test/googletest-output-test-golden-lin.txt
+102
-102
googletest/test/googletest-output-test.py
googletest/test/googletest-output-test.py
+10
-10
googletest/test/googletest-output-test_.cc
googletest/test/googletest-output-test_.cc
+0
-0
No files found.
googletest/test/BUILD.bazel
View file @
6324796b
...
@@ -174,23 +174,24 @@ py_test(
...
@@ -174,23 +174,24 @@ py_test(
)
)
cc_binary
(
cc_binary
(
name
=
"gtest
_
output
_
test_"
,
name
=
"g
oogle
test
-
output
-
test_"
,
testonly
=
1
,
testonly
=
1
,
srcs
=
[
"gtest
_
output
_
test_.cc"
],
srcs
=
[
"g
oogle
test
-
output
-
test_.cc"
],
deps
=
[
"//:gtest"
],
deps
=
[
"//:gtest"
],
)
)
py_test
(
py_test
(
name
=
"gtest
_
output
_
test"
,
name
=
"g
oogle
test
-
output
-
test"
,
size
=
"small"
,
size
=
"small"
,
srcs
=
[
"gtest
_
output
_
test.py"
],
srcs
=
[
"g
oogle
test
-
output
-
test.py"
],
args
=
select
({
args
=
select
({
":has_absl"
:
[],
":has_absl"
:
[],
"//conditions:default"
:
[
"--no_stacktrace_support"
],
"//conditions:default"
:
[
"--no_stacktrace_support"
],
}),
}),
data
=
[
data
=
[
"gtest
_
output
_
test
_
golden
_
lin.txt"
,
"g
oogle
test
-
output
-
test
-
golden
-
lin.txt"
,
":gtest
_
output
_
test_"
,
":g
oogle
test
-
output
-
test_"
,
],
],
deps
=
[
":gtest_test_utils"
],
deps
=
[
":gtest_test_utils"
],
)
)
...
...
googletest/test/gtest
_
output
_
test
_
golden
_
lin.txt
→
googletest/test/g
oogle
test
-
output
-
test
-
golden
-
lin.txt
View file @
6324796b
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
g
oogle
test
-
output
-
test_.cc:#: Failure
Value of: false
Value of: false
Actual: false
Actual: false
Expected: true
Expected: true
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected equality of these values:
Expected equality of these values:
2
2
3
3
...
@@ -38,7 +38,7 @@ BarEnvironment::SetUp() called.
...
@@ -38,7 +38,7 @@ BarEnvironment::SetUp() called.
[0;32m[ OK ] [mPassingTest.PassingTest2
[0;32m[ OK ] [mPassingTest.PassingTest2
[0;32m[----------] [m2 tests from NonfatalFailureTest
[0;32m[----------] [m2 tests from NonfatalFailureTest
[0;32m[ RUN ] [mNonfatalFailureTest.EscapesStringOperands
[0;32m[ RUN ] [mNonfatalFailureTest.EscapesStringOperands
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected equality of these values:
Expected equality of these values:
kGoldenString
kGoldenString
Which is: "\"Line"
Which is: "\"Line"
...
@@ -46,7 +46,7 @@ Expected equality of these values:
...
@@ -46,7 +46,7 @@ Expected equality of these values:
Which is: "actual \"string\""
Which is: "actual \"string\""
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected equality of these values:
Expected equality of these values:
golden
golden
Which is: "\"Line"
Which is: "\"Line"
...
@@ -56,7 +56,7 @@ Stack trace: (omitted)
...
@@ -56,7 +56,7 @@ Stack trace: (omitted)
[0;31m[ FAILED ] [mNonfatalFailureTest.EscapesStringOperands
[0;31m[ FAILED ] [mNonfatalFailureTest.EscapesStringOperands
[0;32m[ RUN ] [mNonfatalFailureTest.DiffForLongStrings
[0;32m[ RUN ] [mNonfatalFailureTest.DiffForLongStrings
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected equality of these values:
Expected equality of these values:
golden_str
golden_str
Which is: "\"Line\0 1\"\nLine 2"
Which is: "\"Line\0 1\"\nLine 2"
...
@@ -72,7 +72,7 @@ Stack trace: (omitted)
...
@@ -72,7 +72,7 @@ Stack trace: (omitted)
[0;32m[----------] [m3 tests from FatalFailureTest
[0;32m[----------] [m3 tests from FatalFailureTest
[0;32m[ RUN ] [mFatalFailureTest.FatalFailureInSubroutine
[0;32m[ RUN ] [mFatalFailureTest.FatalFailureInSubroutine
(expecting a failure that x should be 1)
(expecting a failure that x should be 1)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected equality of these values:
Expected equality of these values:
1
1
x
x
...
@@ -82,7 +82,7 @@ Stack trace: (omitted)
...
@@ -82,7 +82,7 @@ Stack trace: (omitted)
[0;31m[ FAILED ] [mFatalFailureTest.FatalFailureInSubroutine
[0;31m[ FAILED ] [mFatalFailureTest.FatalFailureInSubroutine
[0;32m[ RUN ] [mFatalFailureTest.FatalFailureInNestedSubroutine
[0;32m[ RUN ] [mFatalFailureTest.FatalFailureInNestedSubroutine
(expecting a failure that x should be 1)
(expecting a failure that x should be 1)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected equality of these values:
Expected equality of these values:
1
1
x
x
...
@@ -92,7 +92,7 @@ Stack trace: (omitted)
...
@@ -92,7 +92,7 @@ Stack trace: (omitted)
[0;31m[ FAILED ] [mFatalFailureTest.FatalFailureInNestedSubroutine
[0;31m[ FAILED ] [mFatalFailureTest.FatalFailureInNestedSubroutine
[0;32m[ RUN ] [mFatalFailureTest.NonfatalFailureInSubroutine
[0;32m[ RUN ] [mFatalFailureTest.NonfatalFailureInSubroutine
(expecting a failure on false)
(expecting a failure on false)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Value of: false
Value of: false
Actual: false
Actual: false
Expected: true
Expected: true
...
@@ -104,45 +104,45 @@ Stack trace: (omitted)
...
@@ -104,45 +104,45 @@ Stack trace: (omitted)
(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
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected: (3) >= (a[i]), actual: 3 vs 9
Expected: (3) >= (a[i]), actual: 3 vs 9
Stack trace: (omitted)
Stack trace: (omitted)
i == 2
i == 2
i == 3
i == 3
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected: (3) >= (a[i]), actual: 3 vs 6
Expected: (3) >= (a[i]), actual: 3 vs 6
Stack trace: (omitted)
Stack trace: (omitted)
[0;31m[ FAILED ] [mLoggingTest.InterleavingLoggingAndAssertions
[0;31m[ FAILED ] [mLoggingTest.InterleavingLoggingAndAssertions
[0;32m[----------] [m7 tests from SCOPED_TRACETest
[0;32m[----------] [m7 tests from SCOPED_TRACETest
[0;32m[ RUN ] [mSCOPED_TRACETest.AcceptedValues
[0;32m[ RUN ] [mSCOPED_TRACETest.AcceptedValues
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Just checking that all these values work fine.
Just checking that all these values work fine.
Google Test trace:
Google Test trace:
gtest
_
output
_
test_.cc:#: (null)
g
oogle
test
-
output
-
test_.cc:#: (null)
gtest
_
output
_
test_.cc:#: 1337
g
oogle
test
-
output
-
test_.cc:#: 1337
gtest
_
output
_
test_.cc:#: std::string
g
oogle
test
-
output
-
test_.cc:#: std::string
gtest
_
output
_
test_.cc:#: literal string
g
oogle
test
-
output
-
test_.cc:#: literal string
Stack trace: (omitted)
Stack trace: (omitted)
[0;31m[ FAILED ] [mSCOPED_TRACETest.AcceptedValues
[0;31m[ FAILED ] [mSCOPED_TRACETest.AcceptedValues
[0;32m[ RUN ] [mSCOPED_TRACETest.ObeysScopes
[0;32m[ RUN ] [mSCOPED_TRACETest.ObeysScopes
(expected to fail)
(expected to fail)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
This failure is expected, and shouldn't have a trace.
This failure is expected, and shouldn't have a trace.
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
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
g
oogle
test
-
output
-
test_.cc:#: Expected trace
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
This failure is expected, and shouldn't have a trace.
This failure is expected, and shouldn't have a trace.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -150,131 +150,131 @@ Stack trace: (omitted)
...
@@ -150,131 +150,131 @@ Stack trace: (omitted)
[0;31m[ FAILED ] [mSCOPED_TRACETest.ObeysScopes
[0;31m[ FAILED ] [mSCOPED_TRACETest.ObeysScopes
[0;32m[ RUN ] [mSCOPED_TRACETest.WorksInLoop
[0;32m[ RUN ] [mSCOPED_TRACETest.WorksInLoop
(expected to fail)
(expected to fail)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected equality of these values:
Expected equality of these values:
2
2
n
n
Which is: 1
Which is: 1
Google Test trace:
Google Test trace:
gtest
_
output
_
test_.cc:#: i = 1
g
oogle
test
-
output
-
test_.cc:#: i = 1
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected equality of these values:
Expected equality of these values:
1
1
n
n
Which is: 2
Which is: 2
Google Test trace:
Google Test trace:
gtest
_
output
_
test_.cc:#: i = 2
g
oogle
test
-
output
-
test_.cc:#: i = 2
Stack trace: (omitted)
Stack trace: (omitted)
[0;31m[ FAILED ] [mSCOPED_TRACETest.WorksInLoop
[0;31m[ FAILED ] [mSCOPED_TRACETest.WorksInLoop
[0;32m[ RUN ] [mSCOPED_TRACETest.WorksInSubroutine
[0;32m[ RUN ] [mSCOPED_TRACETest.WorksInSubroutine
(expected to fail)
(expected to fail)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected equality of these values:
Expected equality of these values:
2
2
n
n
Which is: 1
Which is: 1
Google Test trace:
Google Test trace:
gtest
_
output
_
test_.cc:#: n = 1
g
oogle
test
-
output
-
test_.cc:#: n = 1
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected equality of these values:
Expected equality of these values:
1
1
n
n
Which is: 2
Which is: 2
Google Test trace:
Google Test trace:
gtest
_
output
_
test_.cc:#: n = 2
g
oogle
test
-
output
-
test_.cc:#: n = 2
Stack trace: (omitted)
Stack trace: (omitted)
[0;31m[ FAILED ] [mSCOPED_TRACETest.WorksInSubroutine
[0;31m[ FAILED ] [mSCOPED_TRACETest.WorksInSubroutine
[0;32m[ RUN ] [mSCOPED_TRACETest.CanBeNested
[0;32m[ RUN ] [mSCOPED_TRACETest.CanBeNested
(expected to fail)
(expected to fail)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected equality of these values:
Expected equality of these values:
1
1
n
n
Which is: 2
Which is: 2
Google Test trace:
Google Test trace:
gtest
_
output
_
test_.cc:#: n = 2
g
oogle
test
-
output
-
test_.cc:#: n = 2
gtest
_
output
_
test_.cc:#:
g
oogle
test
-
output
-
test_.cc:#:
Stack trace: (omitted)
Stack trace: (omitted)
[0;31m[ FAILED ] [mSCOPED_TRACETest.CanBeNested
[0;31m[ FAILED ] [mSCOPED_TRACETest.CanBeNested
[0;32m[ RUN ] [mSCOPED_TRACETest.CanBeRepeated
[0;32m[ RUN ] [mSCOPED_TRACETest.CanBeRepeated
(expected to fail)
(expected to fail)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
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
g
oogle
test
-
output
-
test_.cc:#: A
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
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
g
oogle
test
-
output
-
test_.cc:#: B
gtest
_
output
_
test_.cc:#: A
g
oogle
test
-
output
-
test_.cc:#: A
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
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
g
oogle
test
-
output
-
test_.cc:#: C
gtest
_
output
_
test_.cc:#: B
g
oogle
test
-
output
-
test_.cc:#: B
gtest
_
output
_
test_.cc:#: A
g
oogle
test
-
output
-
test_.cc:#: A
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
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
g
oogle
test
-
output
-
test_.cc:#: D
gtest
_
output
_
test_.cc:#: B
g
oogle
test
-
output
-
test_.cc:#: B
gtest
_
output
_
test_.cc:#: A
g
oogle
test
-
output
-
test_.cc:#: A
Stack trace: (omitted)
Stack trace: (omitted)
[0;31m[ FAILED ] [mSCOPED_TRACETest.CanBeRepeated
[0;31m[ FAILED ] [mSCOPED_TRACETest.CanBeRepeated
[0;32m[ RUN ] [mSCOPED_TRACETest.WorksConcurrently
[0;32m[ RUN ] [mSCOPED_TRACETest.WorksConcurrently
(expecting 6 failures)
(expecting 6 failures)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #1 (in thread B, only trace B alive).
Expected failure #1 (in thread B, only trace B alive).
Google Test trace:
Google Test trace:
gtest
_
output
_
test_.cc:#: Trace B
g
oogle
test
-
output
-
test_.cc:#: Trace B
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #2 (in thread A, trace A & B both alive).
Expected failure #2 (in thread A, trace A & B both alive).
Google Test trace:
Google Test trace:
gtest
_
output
_
test_.cc:#: Trace A
g
oogle
test
-
output
-
test_.cc:#: Trace A
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #3 (in thread B, trace A & B both alive).
Expected failure #3 (in thread B, trace A & B both alive).
Google Test trace:
Google Test trace:
gtest
_
output
_
test_.cc:#: Trace B
g
oogle
test
-
output
-
test_.cc:#: Trace B
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #4 (in thread B, only trace A alive).
Expected failure #4 (in thread B, only trace A alive).
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #5 (in thread A, only trace A alive).
Expected failure #5 (in thread A, only trace A alive).
Google Test trace:
Google Test trace:
gtest
_
output
_
test_.cc:#: Trace A
g
oogle
test
-
output
-
test_.cc:#: Trace A
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #6 (in thread A, no trace alive).
Expected failure #6 (in thread A, no trace alive).
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -282,7 +282,7 @@ Stack trace: (omitted)
...
@@ -282,7 +282,7 @@ Stack trace: (omitted)
[0;31m[ FAILED ] [mSCOPED_TRACETest.WorksConcurrently
[0;31m[ FAILED ] [mSCOPED_TRACETest.WorksConcurrently
[0;32m[----------] [m1 test from ScopedTraceTest
[0;32m[----------] [m1 test from ScopedTraceTest
[0;32m[ RUN ] [mScopedTraceTest.WithExplicitFileAndLine
[0;32m[ RUN ] [mScopedTraceTest.WithExplicitFileAndLine
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Check that the trace is attached to a particular location.
Check that the trace is attached to a particular location.
Google Test trace:
Google Test trace:
...
@@ -293,27 +293,27 @@ Stack trace: (omitted)
...
@@ -293,27 +293,27 @@ Stack trace: (omitted)
[0;32m[----------] [m1 test from NonFatalFailureInFixtureConstructorTest
[0;32m[----------] [m1 test from NonFatalFailureInFixtureConstructorTest
[0;32m[ RUN ] [mNonFatalFailureInFixtureConstructorTest.FailureInConstructor
[0;32m[ RUN ] [mNonFatalFailureInFixtureConstructorTest.FailureInConstructor
(expecting 5 failures)
(expecting 5 failures)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #1, in the test fixture c'tor.
Expected failure #1, in the test fixture c'tor.
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #2, in SetUp().
Expected failure #2, in SetUp().
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #3, in the test body.
Expected failure #3, in the test body.
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #4, in TearDown.
Expected failure #4, in TearDown.
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #5, in the test fixture d'tor.
Expected failure #5, in the test fixture d'tor.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -322,12 +322,12 @@ Stack trace: (omitted)
...
@@ -322,12 +322,12 @@ Stack trace: (omitted)
[0;32m[----------] [m1 test from FatalFailureInFixtureConstructorTest
[0;32m[----------] [m1 test from FatalFailureInFixtureConstructorTest
[0;32m[ RUN ] [mFatalFailureInFixtureConstructorTest.FailureInConstructor
[0;32m[ RUN ] [mFatalFailureInFixtureConstructorTest.FailureInConstructor
(expecting 2 failures)
(expecting 2 failures)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #1, in the test fixture c'tor.
Expected failure #1, in the test fixture c'tor.
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #2, in the test fixture d'tor.
Expected failure #2, in the test fixture d'tor.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -336,22 +336,22 @@ Stack trace: (omitted)
...
@@ -336,22 +336,22 @@ Stack trace: (omitted)
[0;32m[----------] [m1 test from NonFatalFailureInSetUpTest
[0;32m[----------] [m1 test from NonFatalFailureInSetUpTest
[0;32m[ RUN ] [mNonFatalFailureInSetUpTest.FailureInSetUp
[0;32m[ RUN ] [mNonFatalFailureInSetUpTest.FailureInSetUp
(expecting 4 failures)
(expecting 4 failures)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #1, in SetUp().
Expected failure #1, in SetUp().
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #2, in the test function.
Expected failure #2, in the test function.
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #3, in TearDown().
Expected failure #3, in TearDown().
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #4, in the test fixture d'tor.
Expected failure #4, in the test fixture d'tor.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -360,17 +360,17 @@ Stack trace: (omitted)
...
@@ -360,17 +360,17 @@ Stack trace: (omitted)
[0;32m[----------] [m1 test from FatalFailureInSetUpTest
[0;32m[----------] [m1 test from FatalFailureInSetUpTest
[0;32m[ RUN ] [mFatalFailureInSetUpTest.FailureInSetUp
[0;32m[ RUN ] [mFatalFailureInSetUpTest.FailureInSetUp
(expecting 3 failures)
(expecting 3 failures)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #1, in SetUp().
Expected failure #1, in SetUp().
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #2, in TearDown().
Expected failure #2, in TearDown().
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected failure #3, in the test fixture d'tor.
Expected failure #3, in the test fixture d'tor.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -483,13 +483,13 @@ Stack trace: (omitted)
...
@@ -483,13 +483,13 @@ Stack trace: (omitted)
gtest.cc:#: Failure
gtest.cc:#: Failure
Expected: 1 non-fatal failure
Expected: 1 non-fatal failure
Actual: 2 failures
Actual: 2 failures
gtest
_
output
_
test_.cc:#: Non-fatal failure:
g
oogle
test
-
output
-
test_.cc:#: Non-fatal failure:
Failed
Failed
Expected non-fatal failure 1.
Expected non-fatal failure 1.
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Non-fatal failure:
g
oogle
test
-
output
-
test_.cc:#: Non-fatal failure:
Failed
Failed
Expected non-fatal failure 2.
Expected non-fatal failure 2.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -503,7 +503,7 @@ Stack trace: (omitted)
...
@@ -503,7 +503,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
gtest.cc:#: Failure
Expected: 1 non-fatal failure
Expected: 1 non-fatal failure
Actual:
Actual:
gtest
_
output
_
test_.cc:#: Fatal failure:
g
oogle
test
-
output
-
test_.cc:#: Fatal failure:
Failed
Failed
Expected fatal failure.
Expected fatal failure.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -548,13 +548,13 @@ Stack trace: (omitted)
...
@@ -548,13 +548,13 @@ Stack trace: (omitted)
gtest.cc:#: Failure
gtest.cc:#: Failure
Expected: 1 fatal failure
Expected: 1 fatal failure
Actual: 2 failures
Actual: 2 failures
gtest
_
output
_
test_.cc:#: Fatal failure:
g
oogle
test
-
output
-
test_.cc:#: Fatal failure:
Failed
Failed
Expected fatal failure.
Expected fatal failure.
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Fatal failure:
g
oogle
test
-
output
-
test_.cc:#: Fatal failure:
Failed
Failed
Expected fatal failure.
Expected fatal failure.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -568,7 +568,7 @@ Stack trace: (omitted)
...
@@ -568,7 +568,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
gtest.cc:#: Failure
Expected: 1 fatal failure
Expected: 1 fatal failure
Actual:
Actual:
gtest
_
output
_
test_.cc:#: Non-fatal failure:
g
oogle
test
-
output
-
test_.cc:#: Non-fatal failure:
Failed
Failed
Expected non-fatal failure.
Expected non-fatal failure.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -597,7 +597,7 @@ Stack trace: (omitted)
...
@@ -597,7 +597,7 @@ Stack trace: (omitted)
[0;32m[ RUN ] [mTypedTest/0.Success
[0;32m[ RUN ] [mTypedTest/0.Success
[0;32m[ OK ] [mTypedTest/0.Success
[0;32m[ OK ] [mTypedTest/0.Success
[0;32m[ RUN ] [mTypedTest/0.Failure
[0;32m[ RUN ] [mTypedTest/0.Failure
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected equality of these values:
Expected equality of these values:
1
1
TypeParam()
TypeParam()
...
@@ -610,7 +610,7 @@ Stack trace: (omitted)
...
@@ -610,7 +610,7 @@ Stack trace: (omitted)
[0;32m[ RUN ] [mUnsigned/TypedTestP/0.Success
[0;32m[ RUN ] [mUnsigned/TypedTestP/0.Success
[0;32m[ OK ] [mUnsigned/TypedTestP/0.Success
[0;32m[ OK ] [mUnsigned/TypedTestP/0.Success
[0;32m[ RUN ] [mUnsigned/TypedTestP/0.Failure
[0;32m[ RUN ] [mUnsigned/TypedTestP/0.Failure
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected equality of these values:
Expected equality of these values:
1U
1U
Which is: 1
Which is: 1
...
@@ -624,7 +624,7 @@ Stack trace: (omitted)
...
@@ -624,7 +624,7 @@ Stack trace: (omitted)
[0;32m[ RUN ] [mUnsigned/TypedTestP/1.Success
[0;32m[ RUN ] [mUnsigned/TypedTestP/1.Success
[0;32m[ OK ] [mUnsigned/TypedTestP/1.Success
[0;32m[ OK ] [mUnsigned/TypedTestP/1.Success
[0;32m[ RUN ] [mUnsigned/TypedTestP/1.Failure
[0;32m[ RUN ] [mUnsigned/TypedTestP/1.Failure
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected equality of these values:
Expected equality of these values:
1U
1U
Which is: 1
Which is: 1
...
@@ -640,7 +640,7 @@ Stack trace: (omitted)
...
@@ -640,7 +640,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
gtest.cc:#: Failure
Expected: 1 fatal failure
Expected: 1 fatal failure
Actual:
Actual:
gtest
_
output
_
test_.cc:#: Success:
g
oogle
test
-
output
-
test_.cc:#: Success:
Succeeded
Succeeded
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -651,7 +651,7 @@ Stack trace: (omitted)
...
@@ -651,7 +651,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
gtest.cc:#: Failure
Expected: 1 fatal failure
Expected: 1 fatal failure
Actual:
Actual:
gtest
_
output
_
test_.cc:#: Non-fatal failure:
g
oogle
test
-
output
-
test_.cc:#: Non-fatal failure:
Failed
Failed
Expected non-fatal failure.
Expected non-fatal failure.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -663,7 +663,7 @@ Stack trace: (omitted)
...
@@ -663,7 +663,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
gtest.cc:#: Failure
Expected: 1 fatal failure containing "Some other fatal failure expected."
Expected: 1 fatal failure containing "Some other fatal failure expected."
Actual:
Actual:
gtest
_
output
_
test_.cc:#: Fatal failure:
g
oogle
test
-
output
-
test_.cc:#: Fatal failure:
Failed
Failed
Expected fatal failure.
Expected fatal failure.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -677,7 +677,7 @@ Stack trace: (omitted)
...
@@ -677,7 +677,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
gtest.cc:#: Failure
Expected: 1 non-fatal failure
Expected: 1 non-fatal failure
Actual:
Actual:
gtest
_
output
_
test_.cc:#: Success:
g
oogle
test
-
output
-
test_.cc:#: Success:
Succeeded
Succeeded
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -688,7 +688,7 @@ Stack trace: (omitted)
...
@@ -688,7 +688,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
gtest.cc:#: Failure
Expected: 1 non-fatal failure
Expected: 1 non-fatal failure
Actual:
Actual:
gtest
_
output
_
test_.cc:#: Fatal failure:
g
oogle
test
-
output
-
test_.cc:#: Fatal failure:
Failed
Failed
Expected fatal failure.
Expected fatal failure.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -700,7 +700,7 @@ Stack trace: (omitted)
...
@@ -700,7 +700,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
gtest.cc:#: Failure
Expected: 1 non-fatal failure containing "Some other non-fatal failure."
Expected: 1 non-fatal failure containing "Some other non-fatal failure."
Actual:
Actual:
gtest
_
output
_
test_.cc:#: Non-fatal failure:
g
oogle
test
-
output
-
test_.cc:#: Non-fatal failure:
Failed
Failed
Expected non-fatal failure.
Expected non-fatal failure.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -714,7 +714,7 @@ Stack trace: (omitted)
...
@@ -714,7 +714,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
gtest.cc:#: Failure
Expected: 1 fatal failure
Expected: 1 fatal failure
Actual:
Actual:
gtest
_
output
_
test_.cc:#: Success:
g
oogle
test
-
output
-
test_.cc:#: Success:
Succeeded
Succeeded
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -725,7 +725,7 @@ Stack trace: (omitted)
...
@@ -725,7 +725,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
gtest.cc:#: Failure
Expected: 1 fatal failure
Expected: 1 fatal failure
Actual:
Actual:
gtest
_
output
_
test_.cc:#: Non-fatal failure:
g
oogle
test
-
output
-
test_.cc:#: Non-fatal failure:
Failed
Failed
Expected non-fatal failure.
Expected non-fatal failure.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -737,7 +737,7 @@ Stack trace: (omitted)
...
@@ -737,7 +737,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
gtest.cc:#: Failure
Expected: 1 fatal failure containing "Some other fatal failure expected."
Expected: 1 fatal failure containing "Some other fatal failure expected."
Actual:
Actual:
gtest
_
output
_
test_.cc:#: Fatal failure:
g
oogle
test
-
output
-
test_.cc:#: Fatal failure:
Failed
Failed
Expected fatal failure.
Expected fatal failure.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -751,7 +751,7 @@ Stack trace: (omitted)
...
@@ -751,7 +751,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
gtest.cc:#: Failure
Expected: 1 non-fatal failure
Expected: 1 non-fatal failure
Actual:
Actual:
gtest
_
output
_
test_.cc:#: Success:
g
oogle
test
-
output
-
test_.cc:#: Success:
Succeeded
Succeeded
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -762,7 +762,7 @@ Stack trace: (omitted)
...
@@ -762,7 +762,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
gtest.cc:#: Failure
Expected: 1 non-fatal failure
Expected: 1 non-fatal failure
Actual:
Actual:
gtest
_
output
_
test_.cc:#: Fatal failure:
g
oogle
test
-
output
-
test_.cc:#: Fatal failure:
Failed
Failed
Expected fatal failure.
Expected fatal failure.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -774,7 +774,7 @@ Stack trace: (omitted)
...
@@ -774,7 +774,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
gtest.cc:#: Failure
Expected: 1 non-fatal failure containing "Some other non-fatal failure."
Expected: 1 non-fatal failure containing "Some other non-fatal failure."
Actual:
Actual:
gtest
_
output
_
test_.cc:#: Non-fatal failure:
g
oogle
test
-
output
-
test_.cc:#: Non-fatal failure:
Failed
Failed
Expected non-fatal failure.
Expected non-fatal failure.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -786,7 +786,7 @@ Stack trace: (omitted)
...
@@ -786,7 +786,7 @@ Stack trace: (omitted)
[0;32m[----------] [m2 tests from ExpectFailureWithThreadsTest
[0;32m[----------] [m2 tests from ExpectFailureWithThreadsTest
[0;32m[ RUN ] [mExpectFailureWithThreadsTest.ExpectFatalFailure
[0;32m[ RUN ] [mExpectFailureWithThreadsTest.ExpectFatalFailure
(expecting 2 failures)
(expecting 2 failures)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected fatal failure.
Expected fatal failure.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -799,7 +799,7 @@ Stack trace: (omitted)
...
@@ -799,7 +799,7 @@ Stack trace: (omitted)
[0;31m[ FAILED ] [mExpectFailureWithThreadsTest.ExpectFatalFailure
[0;31m[ FAILED ] [mExpectFailureWithThreadsTest.ExpectFatalFailure
[0;32m[ RUN ] [mExpectFailureWithThreadsTest.ExpectNonFatalFailure
[0;32m[ RUN ] [mExpectFailureWithThreadsTest.ExpectNonFatalFailure
(expecting 2 failures)
(expecting 2 failures)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected non-fatal failure.
Expected non-fatal failure.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -813,12 +813,12 @@ Stack trace: (omitted)
...
@@ -813,12 +813,12 @@ Stack trace: (omitted)
[0;32m[----------] [m1 test from ScopedFakeTestPartResultReporterTest
[0;32m[----------] [m1 test from ScopedFakeTestPartResultReporterTest
[0;32m[ RUN ] [mScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread
[0;32m[ RUN ] [mScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread
(expecting 2 failures)
(expecting 2 failures)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected fatal failure.
Expected fatal failure.
Stack trace: (omitted)
Stack trace: (omitted)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected non-fatal failure.
Expected non-fatal failure.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -826,7 +826,7 @@ Stack trace: (omitted)
...
@@ -826,7 +826,7 @@ Stack trace: (omitted)
[0;31m[ FAILED ] [mScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread
[0;31m[ FAILED ] [mScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread
[0;32m[----------] [m1 test from PrintingFailingParams/FailingParamTest
[0;32m[----------] [m1 test from PrintingFailingParams/FailingParamTest
[0;32m[ RUN ] [mPrintingFailingParams/FailingParamTest.Fails/0
[0;32m[ RUN ] [mPrintingFailingParams/FailingParamTest.Fails/0
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected equality of these values:
Expected equality of these values:
1
1
GetParam()
GetParam()
...
@@ -838,7 +838,7 @@ Stack trace: (omitted)
...
@@ -838,7 +838,7 @@ Stack trace: (omitted)
[0;32m[ RUN ] [mPrintingStrings/ParamTest.Success/a
[0;32m[ RUN ] [mPrintingStrings/ParamTest.Success/a
[0;32m[ OK ] [mPrintingStrings/ParamTest.Success/a
[0;32m[ OK ] [mPrintingStrings/ParamTest.Success/a
[0;32m[ RUN ] [mPrintingStrings/ParamTest.Failure/a
[0;32m[ RUN ] [mPrintingStrings/ParamTest.Failure/a
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected equality of these values:
Expected equality of these values:
"b"
"b"
GetParam()
GetParam()
...
@@ -849,13 +849,13 @@ Stack trace: (omitted)
...
@@ -849,13 +849,13 @@ Stack trace: (omitted)
[0;31m[ FAILED ] [mPrintingStrings/ParamTest.Failure/a, where GetParam() = "a"
[0;31m[ FAILED ] [mPrintingStrings/ParamTest.Failure/a, where GetParam() = "a"
[0;32m[----------] [mGlobal test environment tear-down
[0;32m[----------] [mGlobal test environment tear-down
BarEnvironment::TearDown() called.
BarEnvironment::TearDown() called.
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected non-fatal failure.
Expected non-fatal failure.
Stack trace: (omitted)
Stack trace: (omitted)
FooEnvironment::TearDown() called.
FooEnvironment::TearDown() called.
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Failed
Failed
Expected fatal failure.
Expected fatal failure.
Stack trace: (omitted)
Stack trace: (omitted)
...
@@ -919,7 +919,7 @@ Stack trace: (omitted)
...
@@ -919,7 +919,7 @@ Stack trace: (omitted)
[----------] 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
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected equality of these values:
Expected equality of these values:
1
1
x
x
...
@@ -929,7 +929,7 @@ Stack trace: (omitted)
...
@@ -929,7 +929,7 @@ Stack trace: (omitted)
[ FAILED ] FatalFailureTest.FatalFailureInSubroutine (? ms)
[ FAILED ] FatalFailureTest.FatalFailureInSubroutine (? ms)
[ 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
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected equality of these values:
Expected equality of these values:
1
1
x
x
...
@@ -939,7 +939,7 @@ Stack trace: (omitted)
...
@@ -939,7 +939,7 @@ Stack trace: (omitted)
[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine (? ms)
[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine (? ms)
[ RUN ] FatalFailureTest.NonfatalFailureInSubroutine
[ RUN ] FatalFailureTest.NonfatalFailureInSubroutine
(expecting a failure on false)
(expecting a failure on false)
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Value of: false
Value of: false
Actual: false
Actual: false
Expected: true
Expected: true
...
@@ -953,13 +953,13 @@ Stack trace: (omitted)
...
@@ -953,13 +953,13 @@ Stack trace: (omitted)
(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
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected: (3) >= (a[i]), actual: 3 vs 9
Expected: (3) >= (a[i]), actual: 3 vs 9
Stack trace: (omitted)
Stack trace: (omitted)
i == 2
i == 2
i == 3
i == 3
gtest
_
output
_
test_.cc:#: Failure
g
oogle
test
-
output
-
test_.cc:#: Failure
Expected: (3) >= (a[i]), actual: 3 vs 6
Expected: (3) >= (a[i]), actual: 3 vs 6
Stack trace: (omitted)
Stack trace: (omitted)
...
...
googletest/test/gtest
_
output
_
test.py
→
googletest/test/g
oogle
test
-
output
-
test.py
View file @
6324796b
...
@@ -33,10 +33,10 @@
...
@@ -33,10 +33,10 @@
SYNOPSIS
SYNOPSIS
gtest_output_test.py --build_dir=BUILD/DIR --gengolden
g
oogle
test_output_test.py --build_dir=BUILD/DIR --gengolden
# where BUILD/DIR contains the built gtest
_
output
_
test_ file.
# where BUILD/DIR contains the built g
oogle
test
-
output
-
test_ file.
gtest_output_test.py --gengolden
g
oogle
test_output_test.py --gengolden
gtest_output_test.py
g
oogle
test_output_test.py
"""
"""
__author__
=
'wan@google.com (Zhanyong Wan)'
__author__
=
'wan@google.com (Zhanyong Wan)'
...
@@ -59,9 +59,9 @@ IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
...
@@ -59,9 +59,9 @@ IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
IS_WINDOWS
=
os
.
name
==
'nt'
IS_WINDOWS
=
os
.
name
==
'nt'
# TODO(vladl@google.com): remove the _lin suffix.
# TODO(vladl@google.com): remove the _lin suffix.
GOLDEN_NAME
=
'gtest
_
output
_
test
_
golden
_
lin.txt'
GOLDEN_NAME
=
'g
oogle
test
-
output
-
test
-
golden
-
lin.txt'
PROGRAM_PATH
=
gtest_test_utils
.
GetTestExecutablePath
(
'gtest
_
output
_
test_'
)
PROGRAM_PATH
=
gtest_test_utils
.
GetTestExecutablePath
(
'g
oogle
test
-
output
-
test_'
)
# At least one command we exercise must not have the
# At least one command we exercise must not have the
# 'internal_skip_environment_and_ad_hoc_tests' argument.
# 'internal_skip_environment_and_ad_hoc_tests' argument.
...
@@ -104,7 +104,7 @@ def RemoveLocations(test_output):
...
@@ -104,7 +104,7 @@ def RemoveLocations(test_output):
'FILE_NAME:#: '.
'FILE_NAME:#: '.
"""
"""
return
re
.
sub
(
r
'.*[/\\]((gtest
_
output
_
test_|gtest).cc)(\:\d+|\(\d+\))\: '
,
return
re
.
sub
(
r
'.*[/\\]((g
oogle
test
-
output
-
test_|gtest).cc)(\:\d+|\(\d+\))\: '
,
r
'\1:#: '
,
test_output
)
r
'\1:#: '
,
test_output
)
...
@@ -195,7 +195,7 @@ def RemoveMatchingTests(test_output, pattern):
...
@@ -195,7 +195,7 @@ def RemoveMatchingTests(test_output, pattern):
def
NormalizeOutput
(
output
):
def
NormalizeOutput
(
output
):
"""Normalizes output (the output of gtest
_
output
_
test_.exe)."""
"""Normalizes output (the output of g
oogle
test
-
output
-
test_.exe)."""
output
=
ToUnixLineEnding
(
output
)
output
=
ToUnixLineEnding
(
output
)
output
=
RemoveLocations
(
output
)
output
=
RemoveLocations
(
output
)
...
@@ -316,11 +316,11 @@ class GTestOutputTest(gtest_test_utils.TestCase):
...
@@ -316,11 +316,11 @@ class GTestOutputTest(gtest_test_utils.TestCase):
if
os
.
getenv
(
'DEBUG_GTEST_OUTPUT_TEST'
):
if
os
.
getenv
(
'DEBUG_GTEST_OUTPUT_TEST'
):
open
(
os
.
path
.
join
(
open
(
os
.
path
.
join
(
gtest_test_utils
.
GetSourceDir
(),
gtest_test_utils
.
GetSourceDir
(),
'_gtest
_
output
_
test_normalized_actual.txt'
),
'wb'
).
write
(
'_g
oogle
test
-
output
-
test_normalized_actual.txt'
),
'wb'
).
write
(
normalized_actual
)
normalized_actual
)
open
(
os
.
path
.
join
(
open
(
os
.
path
.
join
(
gtest_test_utils
.
GetSourceDir
(),
gtest_test_utils
.
GetSourceDir
(),
'_gtest
_
output
_
test_normalized_golden.txt'
),
'wb'
).
write
(
'_g
oogle
test
-
output
-
test_normalized_golden.txt'
),
'wb'
).
write
(
normalized_golden
)
normalized_golden
)
self
.
assertEqual
(
normalized_golden
,
normalized_actual
)
self
.
assertEqual
(
normalized_golden
,
normalized_actual
)
...
...
googletest/test/gtest
_
output
_
test_.cc
→
googletest/test/g
oogle
test
-
output
-
test_.cc
View file @
6324796b
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment