Unverified Commit e887b03e authored by Gennadiy Civil's avatar Gennadiy Civil Committed by GitHub
Browse files

Merge pull request #1696 from gennadiycivil/master

Code transforms changes, renames. 
parents e5e2ef7c 2a7077fa
......@@ -99,7 +99,7 @@ TEST(OutputFileHelpersTest, GetCurrentExecutableName) {
const std::string exe_str = GetCurrentExecutableName().string();
#if GTEST_OS_WINDOWS
const bool success =
_strcmpi("gtest-options_test", exe_str.c_str()) == 0 ||
_strcmpi("googletest-options-test", exe_str.c_str()) == 0 ||
_strcmpi("gtest-options-ex_test", exe_str.c_str()) == 0 ||
_strcmpi("gtest_all_test", exe_str.c_str()) == 0 ||
_strcmpi("gtest_dll_test", exe_str.c_str()) == 0;
......@@ -109,7 +109,7 @@ TEST(OutputFileHelpersTest, GetCurrentExecutableName) {
// TODO(wan@google.com): remove the hard-coded "lt-" prefix when
// Chandler Carruth's libtool replacement is ready.
const bool success =
exe_str == "gtest-options_test" ||
exe_str == "googletest-options-test" ||
exe_str == "gtest_all_test" ||
exe_str == "lt-gtest_all_test" ||
exe_str == "gtest_dll_test";
......
The non-test part of the code is expected to have 2 failures.
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Value of: false
Actual: false
Expected: true
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
2
3
......@@ -38,7 +38,7 @@ BarEnvironment::SetUp() called.
[ OK ] PassingTest.PassingTest2
[----------] 2 tests from NonfatalFailureTest
[ RUN ] NonfatalFailureTest.EscapesStringOperands
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
kGoldenString
Which is: "\"Line"
......@@ -46,7 +46,7 @@ Expected equality of these values:
Which is: "actual \"string\""
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
golden
Which is: "\"Line"
......@@ -56,7 +56,7 @@ Stack trace: (omitted)
[ FAILED ] NonfatalFailureTest.EscapesStringOperands
[ RUN ] NonfatalFailureTest.DiffForLongStrings
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
golden_str
Which is: "\"Line\0 1\"\nLine 2"
......@@ -72,7 +72,7 @@ Stack trace: (omitted)
[----------] 3 tests from FatalFailureTest
[ RUN ] FatalFailureTest.FatalFailureInSubroutine
(expecting a failure that x should be 1)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
1
x
......@@ -82,7 +82,7 @@ Stack trace: (omitted)
[ FAILED ] FatalFailureTest.FatalFailureInSubroutine
[ RUN ] FatalFailureTest.FatalFailureInNestedSubroutine
(expecting a failure that x should be 1)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
1
x
......@@ -92,7 +92,7 @@ Stack trace: (omitted)
[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine
[ RUN ] FatalFailureTest.NonfatalFailureInSubroutine
(expecting a failure on false)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Value of: false
Actual: false
Expected: true
......@@ -104,45 +104,45 @@ Stack trace: (omitted)
(expecting 2 failures on (3) >= (a[i]))
i == 0
i == 1
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected: (3) >= (a[i]), actual: 3 vs 9
Stack trace: (omitted)
i == 2
i == 3
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected: (3) >= (a[i]), actual: 3 vs 6
Stack trace: (omitted)
[ FAILED ] LoggingTest.InterleavingLoggingAndAssertions
[----------] 7 tests from SCOPED_TRACETest
[ RUN ] SCOPED_TRACETest.AcceptedValues
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Just checking that all these values work fine.
Google Test trace:
gtest_output_test_.cc:#: (null)
gtest_output_test_.cc:#: 1337
gtest_output_test_.cc:#: std::string
gtest_output_test_.cc:#: literal string
googletest-output-test_.cc:#: (null)
googletest-output-test_.cc:#: 1337
googletest-output-test_.cc:#: std::string
googletest-output-test_.cc:#: literal string
Stack trace: (omitted)
[ FAILED ] SCOPED_TRACETest.AcceptedValues
[ RUN ] SCOPED_TRACETest.ObeysScopes
(expected to fail)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
This failure is expected, and shouldn't have a trace.
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
This failure is expected, and should have a trace.
Google Test trace:
gtest_output_test_.cc:#: Expected trace
googletest-output-test_.cc:#: Expected trace
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
This failure is expected, and shouldn't have a trace.
Stack trace: (omitted)
......@@ -150,131 +150,131 @@ Stack trace: (omitted)
[ FAILED ] SCOPED_TRACETest.ObeysScopes
[ RUN ] SCOPED_TRACETest.WorksInLoop
(expected to fail)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
2
n
Which is: 1
Google Test trace:
gtest_output_test_.cc:#: i = 1
googletest-output-test_.cc:#: i = 1
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
1
n
Which is: 2
Google Test trace:
gtest_output_test_.cc:#: i = 2
googletest-output-test_.cc:#: i = 2
Stack trace: (omitted)
[ FAILED ] SCOPED_TRACETest.WorksInLoop
[ RUN ] SCOPED_TRACETest.WorksInSubroutine
(expected to fail)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
2
n
Which is: 1
Google Test trace:
gtest_output_test_.cc:#: n = 1
googletest-output-test_.cc:#: n = 1
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
1
n
Which is: 2
Google Test trace:
gtest_output_test_.cc:#: n = 2
googletest-output-test_.cc:#: n = 2
Stack trace: (omitted)
[ FAILED ] SCOPED_TRACETest.WorksInSubroutine
[ RUN ] SCOPED_TRACETest.CanBeNested
(expected to fail)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
1
n
Which is: 2
Google Test trace:
gtest_output_test_.cc:#: n = 2
gtest_output_test_.cc:#:
googletest-output-test_.cc:#: n = 2
googletest-output-test_.cc:#:
Stack trace: (omitted)
[ FAILED ] SCOPED_TRACETest.CanBeNested
[ RUN ] SCOPED_TRACETest.CanBeRepeated
(expected to fail)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
This failure is expected, and should contain trace point A.
Google Test trace:
gtest_output_test_.cc:#: A
googletest-output-test_.cc:#: A
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-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
googletest-output-test_.cc:#: B
googletest-output-test_.cc:#: A
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-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
googletest-output-test_.cc:#: C
googletest-output-test_.cc:#: B
googletest-output-test_.cc:#: A
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-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
googletest-output-test_.cc:#: D
googletest-output-test_.cc:#: B
googletest-output-test_.cc:#: A
Stack trace: (omitted)
[ FAILED ] SCOPED_TRACETest.CanBeRepeated
[ RUN ] SCOPED_TRACETest.WorksConcurrently
(expecting 6 failures)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected failure #1 (in thread B, only trace B alive).
Google Test trace:
gtest_output_test_.cc:#: Trace B
googletest-output-test_.cc:#: Trace B
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-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
googletest-output-test_.cc:#: Trace A
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-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
googletest-output-test_.cc:#: Trace B
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected failure #4 (in thread B, only trace A alive).
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected failure #5 (in thread A, only trace A alive).
Google Test trace:
gtest_output_test_.cc:#: Trace A
googletest-output-test_.cc:#: Trace A
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected failure #6 (in thread A, no trace alive).
Stack trace: (omitted)
......@@ -282,7 +282,7 @@ Stack trace: (omitted)
[ FAILED ] SCOPED_TRACETest.WorksConcurrently
[----------] 1 test from ScopedTraceTest
[ RUN ] ScopedTraceTest.WithExplicitFileAndLine
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Check that the trace is attached to a particular location.
Google Test trace:
......@@ -293,27 +293,27 @@ Stack trace: (omitted)
[----------] 1 test from NonFatalFailureInFixtureConstructorTest
[ RUN ] NonFatalFailureInFixtureConstructorTest.FailureInConstructor
(expecting 5 failures)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected failure #1, in the test fixture c'tor.
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected failure #2, in SetUp().
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected failure #3, in the test body.
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected failure #4, in TearDown.
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected failure #5, in the test fixture d'tor.
Stack trace: (omitted)
......@@ -322,12 +322,12 @@ Stack trace: (omitted)
[----------] 1 test from FatalFailureInFixtureConstructorTest
[ RUN ] FatalFailureInFixtureConstructorTest.FailureInConstructor
(expecting 2 failures)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected failure #1, in the test fixture c'tor.
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected failure #2, in the test fixture d'tor.
Stack trace: (omitted)
......@@ -336,22 +336,22 @@ Stack trace: (omitted)
[----------] 1 test from NonFatalFailureInSetUpTest
[ RUN ] NonFatalFailureInSetUpTest.FailureInSetUp
(expecting 4 failures)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected failure #1, in SetUp().
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected failure #2, in the test function.
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected failure #3, in TearDown().
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected failure #4, in the test fixture d'tor.
Stack trace: (omitted)
......@@ -360,17 +360,17 @@ Stack trace: (omitted)
[----------] 1 test from FatalFailureInSetUpTest
[ RUN ] FatalFailureInSetUpTest.FailureInSetUp
(expecting 3 failures)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected failure #1, in SetUp().
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected failure #2, in TearDown().
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected failure #3, in the test fixture d'tor.
Stack trace: (omitted)
......@@ -483,13 +483,13 @@ Stack trace: (omitted)
gtest.cc:#: Failure
Expected: 1 non-fatal failure
Actual: 2 failures
gtest_output_test_.cc:#: Non-fatal failure:
googletest-output-test_.cc:#: Non-fatal failure:
Failed
Expected non-fatal failure 1.
Stack trace: (omitted)
gtest_output_test_.cc:#: Non-fatal failure:
googletest-output-test_.cc:#: Non-fatal failure:
Failed
Expected non-fatal failure 2.
Stack trace: (omitted)
......@@ -503,7 +503,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
Expected: 1 non-fatal failure
Actual:
gtest_output_test_.cc:#: Fatal failure:
googletest-output-test_.cc:#: Fatal failure:
Failed
Expected fatal failure.
Stack trace: (omitted)
......@@ -548,13 +548,13 @@ Stack trace: (omitted)
gtest.cc:#: Failure
Expected: 1 fatal failure
Actual: 2 failures
gtest_output_test_.cc:#: Fatal failure:
googletest-output-test_.cc:#: Fatal failure:
Failed
Expected fatal failure.
Stack trace: (omitted)
gtest_output_test_.cc:#: Fatal failure:
googletest-output-test_.cc:#: Fatal failure:
Failed
Expected fatal failure.
Stack trace: (omitted)
......@@ -568,7 +568,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
Expected: 1 fatal failure
Actual:
gtest_output_test_.cc:#: Non-fatal failure:
googletest-output-test_.cc:#: Non-fatal failure:
Failed
Expected non-fatal failure.
Stack trace: (omitted)
......@@ -597,7 +597,7 @@ Stack trace: (omitted)
[ RUN ] TypedTest/0.Success
[ OK ] TypedTest/0.Success
[ RUN ] TypedTest/0.Failure
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
1
TypeParam()
......@@ -610,7 +610,7 @@ Stack trace: (omitted)
[ RUN ] Unsigned/TypedTestP/0.Success
[ OK ] Unsigned/TypedTestP/0.Success
[ RUN ] Unsigned/TypedTestP/0.Failure
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
1U
Which is: 1
......@@ -624,7 +624,7 @@ Stack trace: (omitted)
[ RUN ] Unsigned/TypedTestP/1.Success
[ OK ] Unsigned/TypedTestP/1.Success
[ RUN ] Unsigned/TypedTestP/1.Failure
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
1U
Which is: 1
......@@ -640,7 +640,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
Expected: 1 fatal failure
Actual:
gtest_output_test_.cc:#: Success:
googletest-output-test_.cc:#: Success:
Succeeded
Stack trace: (omitted)
......@@ -651,7 +651,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
Expected: 1 fatal failure
Actual:
gtest_output_test_.cc:#: Non-fatal failure:
googletest-output-test_.cc:#: Non-fatal failure:
Failed
Expected non-fatal failure.
Stack trace: (omitted)
......@@ -663,7 +663,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
Expected: 1 fatal failure containing "Some other fatal failure expected."
Actual:
gtest_output_test_.cc:#: Fatal failure:
googletest-output-test_.cc:#: Fatal failure:
Failed
Expected fatal failure.
Stack trace: (omitted)
......@@ -677,7 +677,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
Expected: 1 non-fatal failure
Actual:
gtest_output_test_.cc:#: Success:
googletest-output-test_.cc:#: Success:
Succeeded
Stack trace: (omitted)
......@@ -688,7 +688,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
Expected: 1 non-fatal failure
Actual:
gtest_output_test_.cc:#: Fatal failure:
googletest-output-test_.cc:#: Fatal failure:
Failed
Expected fatal failure.
Stack trace: (omitted)
......@@ -700,7 +700,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
Expected: 1 non-fatal failure containing "Some other non-fatal failure."
Actual:
gtest_output_test_.cc:#: Non-fatal failure:
googletest-output-test_.cc:#: Non-fatal failure:
Failed
Expected non-fatal failure.
Stack trace: (omitted)
......@@ -714,7 +714,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
Expected: 1 fatal failure
Actual:
gtest_output_test_.cc:#: Success:
googletest-output-test_.cc:#: Success:
Succeeded
Stack trace: (omitted)
......@@ -725,7 +725,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
Expected: 1 fatal failure
Actual:
gtest_output_test_.cc:#: Non-fatal failure:
googletest-output-test_.cc:#: Non-fatal failure:
Failed
Expected non-fatal failure.
Stack trace: (omitted)
......@@ -737,7 +737,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
Expected: 1 fatal failure containing "Some other fatal failure expected."
Actual:
gtest_output_test_.cc:#: Fatal failure:
googletest-output-test_.cc:#: Fatal failure:
Failed
Expected fatal failure.
Stack trace: (omitted)
......@@ -751,7 +751,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
Expected: 1 non-fatal failure
Actual:
gtest_output_test_.cc:#: Success:
googletest-output-test_.cc:#: Success:
Succeeded
Stack trace: (omitted)
......@@ -762,7 +762,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
Expected: 1 non-fatal failure
Actual:
gtest_output_test_.cc:#: Fatal failure:
googletest-output-test_.cc:#: Fatal failure:
Failed
Expected fatal failure.
Stack trace: (omitted)
......@@ -774,7 +774,7 @@ Stack trace: (omitted)
gtest.cc:#: Failure
Expected: 1 non-fatal failure containing "Some other non-fatal failure."
Actual:
gtest_output_test_.cc:#: Non-fatal failure:
googletest-output-test_.cc:#: Non-fatal failure:
Failed
Expected non-fatal failure.
Stack trace: (omitted)
......@@ -786,7 +786,7 @@ Stack trace: (omitted)
[----------] 2 tests from ExpectFailureWithThreadsTest
[ RUN ] ExpectFailureWithThreadsTest.ExpectFatalFailure
(expecting 2 failures)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected fatal failure.
Stack trace: (omitted)
......@@ -799,7 +799,7 @@ Stack trace: (omitted)
[ FAILED ] ExpectFailureWithThreadsTest.ExpectFatalFailure
[ RUN ] ExpectFailureWithThreadsTest.ExpectNonFatalFailure
(expecting 2 failures)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected non-fatal failure.
Stack trace: (omitted)
......@@ -813,12 +813,12 @@ Stack trace: (omitted)
[----------] 1 test from ScopedFakeTestPartResultReporterTest
[ RUN ] ScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread
(expecting 2 failures)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected fatal failure.
Stack trace: (omitted)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected non-fatal failure.
Stack trace: (omitted)
......@@ -826,7 +826,7 @@ Stack trace: (omitted)
[ FAILED ] ScopedFakeTestPartResultReporterTest.InterceptOnlyCurrentThread
[----------] 1 test from PrintingFailingParams/FailingParamTest
[ RUN ] PrintingFailingParams/FailingParamTest.Fails/0
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
1
GetParam()
......@@ -838,7 +838,7 @@ Stack trace: (omitted)
[ RUN ] PrintingStrings/ParamTest.Success/a
[ OK ] PrintingStrings/ParamTest.Success/a
[ RUN ] PrintingStrings/ParamTest.Failure/a
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
"b"
GetParam()
......@@ -849,13 +849,13 @@ Stack trace: (omitted)
[ FAILED ] PrintingStrings/ParamTest.Failure/a, where GetParam() = "a"
[----------] Global test environment tear-down
BarEnvironment::TearDown() called.
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected non-fatal failure.
Stack trace: (omitted)
FooEnvironment::TearDown() called.
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Failed
Expected fatal failure.
Stack trace: (omitted)
......@@ -919,7 +919,7 @@ Stack trace: (omitted)
[----------] 3 tests from FatalFailureTest
[ RUN ] FatalFailureTest.FatalFailureInSubroutine
(expecting a failure that x should be 1)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
1
x
......@@ -929,7 +929,7 @@ Stack trace: (omitted)
[ FAILED ] FatalFailureTest.FatalFailureInSubroutine (? ms)
[ RUN ] FatalFailureTest.FatalFailureInNestedSubroutine
(expecting a failure that x should be 1)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected equality of these values:
1
x
......@@ -939,7 +939,7 @@ Stack trace: (omitted)
[ FAILED ] FatalFailureTest.FatalFailureInNestedSubroutine (? ms)
[ RUN ] FatalFailureTest.NonfatalFailureInSubroutine
(expecting a failure on false)
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Value of: false
Actual: false
Expected: true
......@@ -953,13 +953,13 @@ Stack trace: (omitted)
(expecting 2 failures on (3) >= (a[i]))
i == 0
i == 1
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected: (3) >= (a[i]), actual: 3 vs 9
Stack trace: (omitted)
i == 2
i == 3
gtest_output_test_.cc:#: Failure
googletest-output-test_.cc:#: Failure
Expected: (3) >= (a[i]), actual: 3 vs 6
Stack trace: (omitted)
......
......@@ -33,10 +33,10 @@
SYNOPSIS
gtest_output_test.py --build_dir=BUILD/DIR --gengolden
# where BUILD/DIR contains the built gtest_output_test_ file.
gtest_output_test.py --gengolden
gtest_output_test.py
googletest_output_test.py --build_dir=BUILD/DIR --gengolden
# where BUILD/DIR contains the built googletest-output-test_ file.
googletest_output_test.py --gengolden
googletest_output_test.py
"""
__author__ = 'wan@google.com (Zhanyong Wan)'
......@@ -59,9 +59,9 @@ IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
IS_WINDOWS = os.name == 'nt'
# TODO(vladl@google.com): remove the _lin suffix.
GOLDEN_NAME = 'gtest_output_test_golden_lin.txt'
GOLDEN_NAME = 'googletest-output-test-golden-lin.txt'
PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('gtest_output_test_')
PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('googletest-output-test_')
# At least one command we exercise must not have the
# 'internal_skip_environment_and_ad_hoc_tests' argument.
......@@ -104,7 +104,7 @@ def RemoveLocations(test_output):
'FILE_NAME:#: '.
"""
return re.sub(r'.*[/\\]((gtest_output_test_|gtest).cc)(\:\d+|\(\d+\))\: ',
return re.sub(r'.*[/\\]((googletest-output-test_|gtest).cc)(\:\d+|\(\d+\))\: ',
r'\1:#: ', test_output)
......@@ -195,7 +195,7 @@ def RemoveMatchingTests(test_output, pattern):
def NormalizeOutput(output):
"""Normalizes output (the output of gtest_output_test_.exe)."""
"""Normalizes output (the output of googletest-output-test_.exe)."""
output = ToUnixLineEnding(output)
output = RemoveLocations(output)
......@@ -316,11 +316,11 @@ class GTestOutputTest(gtest_test_utils.TestCase):
if os.getenv('DEBUG_GTEST_OUTPUT_TEST'):
open(os.path.join(
gtest_test_utils.GetSourceDir(),
'_gtest_output_test_normalized_actual.txt'), 'wb').write(
'_googletest-output-test_normalized_actual.txt'), 'wb').write(
normalized_actual)
open(os.path.join(
gtest_test_utils.GetSourceDir(),
'_gtest_output_test_normalized_golden.txt'), 'wb').write(
'_googletest-output-test_normalized_golden.txt'), 'wb').write(
normalized_golden)
self.assertEqual(normalized_golden, normalized_actual)
......
......@@ -29,7 +29,7 @@
//
// The purpose of this file is to generate Google Test output under
// various conditions. The output will then be verified by
// gtest_output_test.py to ensure that Google Test generates the
// googletest-output-test.py to ensure that Google Test generates the
// desired messages. Therefore, most tests in this file are MEANT TO
// FAIL.
//
......
#!/usr/bin/env python
#
# Copyright 2015 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""Verifies that Google Test warns the user when not initialized properly."""
__author__ = 'jmadill@google.com (Jamie Madill)'
import os
IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
if IS_LINUX:
import gtest_test_utils
else:
import gtest_test_utils
binary_name = 'googletest-param-test-invalid-name1-test_'
COMMAND = gtest_test_utils.GetTestExecutablePath(binary_name)
def Assert(condition):
if not condition:
raise AssertionError
def TestExitCodeAndOutput(command):
"""Runs the given command and verifies its exit code and output."""
err = ('Parameterized test name \'"InvalidWithQuotes"\' is invalid')
p = gtest_test_utils.Subprocess(command)
Assert(p.terminated_by_signal)
# Verify the output message contains appropriate output
Assert(err in p.output)
class GTestParamTestInvalidName1Test(gtest_test_utils.TestCase):
def testExitCodeAndOutput(self):
TestExitCodeAndOutput(COMMAND)
if __name__ == '__main__':
gtest_test_utils.Main()
// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: jmadill@google.com (Jamie Madill)
#include "gtest/gtest.h"
namespace {
class DummyTest : public ::testing::TestWithParam<const char *> {};
TEST_P(DummyTest, Dummy) {
}
INSTANTIATE_TEST_CASE_P(InvalidTestName,
DummyTest,
::testing::Values("InvalidWithQuotes"),
::testing::PrintToStringParamName());
} // namespace
int main(int argc, char *argv[]) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
#!/usr/bin/env python
#
# Copyright 2015 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""Verifies that Google Test warns the user when not initialized properly."""
__author__ = 'jmadill@google.com (Jamie Madill)'
import os
IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
if IS_LINUX:
import gtest_test_utils
else:
import gtest_test_utils
binary_name = 'googletest-param-test-invalid-name2-test_'
COMMAND = gtest_test_utils.GetTestExecutablePath(binary_name)
def Assert(condition):
if not condition:
raise AssertionError
def TestExitCodeAndOutput(command):
"""Runs the given command and verifies its exit code and output."""
err = ('Duplicate parameterized test name \'a\'')
p = gtest_test_utils.Subprocess(command)
Assert(p.terminated_by_signal)
# Check for appropriate output
Assert(err in p.output)
class GTestParamTestInvalidName2Test(gtest_test_utils.TestCase):
def testExitCodeAndOutput(self):
TestExitCodeAndOutput(COMMAND)
if __name__ == '__main__':
gtest_test_utils.Main()
// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: jmadill@google.com (Jamie Madill)
#include "gtest/gtest.h"
namespace {
class DummyTest : public ::testing::TestWithParam<const char *> {};
std::string StringParamTestSuffix(
const testing::TestParamInfo<const char*>& info) {
return std::string(info.param);
}
TEST_P(DummyTest, Dummy) {
}
INSTANTIATE_TEST_CASE_P(DuplicateTestNames,
DummyTest,
::testing::Values("a", "b", "a", "c"),
StringParamTestSuffix);
} // namespace
int main(int argc, char *argv[]) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
......@@ -43,7 +43,7 @@
# include <vector>
# include "src/gtest-internal-inl.h" // for UnitTestOptions
# include "test/gtest-param-test_test.h"
# include "test/googletest-param-test-test.h"
using ::std::vector;
using ::std::sort;
......
......@@ -33,18 +33,18 @@
// Google Test work.
#include "gtest/gtest.h"
#include "gtest-param-test_test.h"
#include "googletest-param-test-test.h"
using ::testing::Values;
using ::testing::internal::ParamGenerator;
// Tests that generators defined in a different translation unit
// are functional. The test using extern_gen is defined
// in gtest-param-test_test.cc.
// in googletest-param-test-test.cc.
ParamGenerator<int> extern_gen = Values(33);
// Tests that a parameterized test case can be defined in one translation unit
// and instantiated in another. The test is defined in gtest-param-test_test.cc
// and instantiated in another. The test is defined in googletest-param-test-test.cc
// and ExternalInstantiationTest fixture class is defined in
// gtest-param-test_test.h.
INSTANTIATE_TEST_CASE_P(MultiplesOf33,
......@@ -53,7 +53,7 @@ INSTANTIATE_TEST_CASE_P(MultiplesOf33,
// Tests that a parameterized test case can be instantiated
// in multiple translation units. Another instantiation is defined
// in gtest-param-test_test.cc and InstantiationInMultipleTranslaionUnitsTest
// in googletest-param-test-test.cc and InstantiationInMultipleTranslaionUnitsTest
// fixture is defined in gtest-param-test_test.h
INSTANTIATE_TEST_CASE_P(Sequence2,
InstantiationInMultipleTranslaionUnitsTest,
......
......@@ -346,11 +346,11 @@ TEST(GtestCheckDeathTest, DiesWithCorrectOutputOnFailure) {
const bool a_false_condition = false;
const char regex[] =
#ifdef _MSC_VER
"gtest-port_test\\.cc\\(\\d+\\):"
"googletest-port-test\\.cc\\(\\d+\\):"
#elif GTEST_USES_POSIX_RE
"gtest-port_test\\.cc:[0-9]+"
"googletest-port-test\\.cc:[0-9]+"
#else
"gtest-port_test\\.cc:\\d+"
"googletest-port-test\\.cc:\\d+"
#endif // _MSC_VER
".*a_false_condition.*Extra info.*";
......
......@@ -35,8 +35,8 @@ __author__ = 'wan@google.com (Zhanyong Wan)'
import os
import gtest_test_utils
# Command to run the gtest_shuffle_test_ program.
COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_shuffle_test_')
# Command to run the googletest-shuffle-test_ program.
COMMAND = gtest_test_utils.GetTestExecutablePath('googletest-shuffle-test_')
# The environment variables for test sharding.
TOTAL_SHARDS_ENV_VAR = 'GTEST_TOTAL_SHARDS'
......@@ -89,7 +89,7 @@ def GetTestsForAllIterations(extra_env, args):
Args:
extra_env: a map from environment variables to their values
args: command line flags to pass to gtest_shuffle_test_
args: command line flags to pass to googletest-shuffle-test_
Returns:
A list where the i-th element is the list of tests run in the i-th
......
// Copyright 2008, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Author: vladl@google.com (Vlad Losev)
//
// Tests for Google Test itself. This verifies that the basic constructs of
// Google Test work.
#include "gtest/gtest.h"
#include "googletest-param-test-test.h"
using ::testing::Values;
using ::testing::internal::ParamGenerator;
// Tests that generators defined in a different translation unit
// are functional. The test using extern_gen_2 is defined
// in googletest-param-test-test.cc.
ParamGenerator<int> extern_gen_2 = Values(33);
// Tests that a parameterized test case can be defined in one translation unit
// and instantiated in another. The test is defined in googletest-param-test-test.cc
// and ExternalInstantiationTest fixture class is defined in
// gtest-param-test_test.h.
INSTANTIATE_TEST_CASE_P(MultiplesOf33,
ExternalInstantiationTest,
Values(33, 66));
// Tests that a parameterized test case can be instantiated
// in multiple translation units. Another instantiation is defined
// in googletest-param-test-test.cc and InstantiationInMultipleTranslaionUnitsTest
// fixture is defined in gtest-param-test_test.h
INSTANTIATE_TEST_CASE_P(Sequence2,
InstantiationInMultipleTranslaionUnitsTest,
Values(42*3, 42*4, 42*5));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment