summaryrefslogtreecommitdiffstats
path: root/googletest
diff options
context:
space:
mode:
Diffstat (limited to 'googletest')
-rw-r--r--googletest/CMakeLists.txt86
-rw-r--r--googletest/Makefile.am52
-rw-r--r--googletest/cmake/internal_utils.cmake2
-rw-r--r--googletest/docs/XcodeGuide.md8
-rw-r--r--googletest/docs/advanced.md16
-rw-r--r--googletest/docs/faq.md6
-rw-r--r--googletest/docs/primer.md6
-rw-r--r--googletest/include/gtest/internal/gtest-port.h6
-rwxr-xr-xgoogletest/scripts/upload.py8
-rw-r--r--googletest/src/gtest-port.cc2
-rw-r--r--googletest/test/BUILD.bazel257
-rwxr-xr-xgoogletest/test/googletest-break-on-failure-unittest.py (renamed from googletest/test/gtest_break_on_failure_unittest.py)8
-rw-r--r--googletest/test/googletest-break-on-failure-unittest_.cc (renamed from googletest/test/gtest_break_on_failure_unittest_.cc)0
-rwxr-xr-xgoogletest/test/googletest-catch-exceptions-test.py (renamed from googletest/test/gtest_catch_exceptions_test.py)12
-rw-r--r--googletest/test/googletest-catch-exceptions-test_.cc (renamed from googletest/test/gtest_catch_exceptions_test_.cc)2
-rwxr-xr-xgoogletest/test/googletest-color-test.py (renamed from googletest/test/gtest_color_test.py)4
-rw-r--r--googletest/test/googletest-color-test_.cc (renamed from googletest/test/gtest_color_test_.cc)0
-rw-r--r--googletest/test/googletest-death-test-test.cc (renamed from googletest/test/gtest-death-test_test.cc)2
-rw-r--r--googletest/test/googletest-death-test_ex_test.cc (renamed from googletest/test/gtest-death-test_ex_test.cc)2
-rwxr-xr-xgoogletest/test/googletest-env-var-test.py (renamed from googletest/test/gtest_env_var_test.py)4
-rw-r--r--googletest/test/googletest-env-var-test_.cc (renamed from googletest/test/gtest_env_var_test_.cc)2
-rw-r--r--googletest/test/googletest-filepath-test.cc (renamed from googletest/test/gtest-filepath_test.cc)0
-rwxr-xr-xgoogletest/test/googletest-filter-unittest.py (renamed from googletest/test/gtest_filter_unittest.py)12
-rw-r--r--googletest/test/googletest-filter-unittest_.cc (renamed from googletest/test/gtest_filter_unittest_.cc)0
-rw-r--r--googletest/test/googletest-json-outfiles-test.py (renamed from googletest/test/gtest_json_outfiles_test.py)0
-rw-r--r--googletest/test/googletest-json-output-unittest.py (renamed from googletest/test/gtest_json_output_unittest.py)9
-rw-r--r--googletest/test/googletest-linked-ptr-test.cc (renamed from googletest/test/gtest-linked_ptr_test.cc)0
-rwxr-xr-xgoogletest/test/googletest-list-tests-unittest.py (renamed from googletest/test/gtest_list_tests_unittest.py)14
-rw-r--r--googletest/test/googletest-list-tests-unittest_.cc (renamed from googletest/test/gtest_list_tests_unittest_.cc)0
-rw-r--r--googletest/test/googletest-listener-test.cc (renamed from googletest/test/gtest-listener_test.cc)0
-rw-r--r--googletest/test/googletest-message-test.cc (renamed from googletest/test/gtest-message_test.cc)0
-rw-r--r--googletest/test/googletest-options-test.cc (renamed from googletest/test/gtest-options_test.cc)4
-rw-r--r--googletest/test/googletest-output-test-golden-lin.txt (renamed from googletest/test/gtest_output_test_golden_lin.txt)204
-rwxr-xr-xgoogletest/test/googletest-output-test.py (renamed from googletest/test/gtest_output_test.py)20
-rw-r--r--googletest/test/googletest-output-test_.cc (renamed from googletest/test/gtest_output_test_.cc)2
-rw-r--r--googletest/test/googletest-param-test-invalid-name1-test.py72
-rw-r--r--googletest/test/googletest-param-test-invalid-name1-test_.cc51
-rw-r--r--googletest/test/googletest-param-test-invalid-name2-test.py71
-rw-r--r--googletest/test/googletest-param-test-invalid-name2-test_.cc56
-rw-r--r--googletest/test/googletest-param-test-test.cc (renamed from googletest/test/gtest-param-test_test.cc)2
-rw-r--r--googletest/test/googletest-param-test-test.h (renamed from googletest/test/gtest-param-test_test.h)0
-rw-r--r--googletest/test/googletest-param-test2-test.cc (renamed from googletest/test/gtest-param-test2_test.cc)8
-rw-r--r--googletest/test/googletest-port-test.cc (renamed from googletest/test/gtest-port_test.cc)6
-rw-r--r--googletest/test/googletest-printers-test.cc (renamed from googletest/test/gtest-printers_test.cc)0
-rwxr-xr-xgoogletest/test/googletest-shuffle-test.py (renamed from googletest/test/gtest_shuffle_test.py)6
-rw-r--r--googletest/test/googletest-shuffle-test_.cc (renamed from googletest/test/gtest_shuffle_test_.cc)0
-rw-r--r--googletest/test/googletest-test-part-test.cc (renamed from googletest/test/gtest-test-part_test.cc)0
-rw-r--r--googletest/test/googletest-test2_test.cc61
-rwxr-xr-xgoogletest/test/googletest-throw-on-failure-test.py (renamed from googletest/test/gtest_throw_on_failure_test.py)10
-rw-r--r--googletest/test/googletest-throw-on-failure-test_.cc (renamed from googletest/test/gtest_throw_on_failure_test_.cc)2
-rw-r--r--googletest/test/googletest-tuple-test.cc (renamed from googletest/test/gtest-tuple_test.cc)0
-rwxr-xr-xgoogletest/test/googletest-uninitialized-test.py (renamed from googletest/test/gtest_uninitialized_test.py)2
-rw-r--r--googletest/test/googletest-uninitialized-test_.cc (renamed from googletest/test/gtest_uninitialized_test_.cc)0
-rw-r--r--googletest/test/gtest_all_test.cc12
-rw-r--r--googletest/test/gtest_test_macro_stack_footprint_test.cc90
-rw-r--r--googletest/test/gtest_unittest.cc2
-rw-r--r--googletest/xcode/Config/DebugProject.xcconfig2
-rw-r--r--googletest/xcode/Config/FrameworkTarget.xcconfig2
-rw-r--r--googletest/xcode/Config/General.xcconfig2
-rw-r--r--googletest/xcode/Config/ReleaseProject.xcconfig2
-rw-r--r--googletest/xcode/Config/StaticLibraryTarget.xcconfig2
61 files changed, 864 insertions, 347 deletions
diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt
index 2e412d7..ba2c2c2 100644
--- a/googletest/CMakeLists.txt
+++ b/googletest/CMakeLists.txt
@@ -86,7 +86,7 @@ include_directories(
if (MSVC AND MSVC_VERSION EQUAL 1700)
add_definitions(/D _VARIADIC_MAX=10)
endif()
-
+
########################################################################
#
# Defines the gtest & gtest_main libraries. User tests should link
@@ -171,28 +171,28 @@ if (gtest_build_tests)
############################################################
# C++ tests built with standard compiler flags.
- cxx_test(gtest-death-test_test gtest_main)
+ cxx_test(googletest-death-test-test gtest_main)
cxx_test(gtest_environment_test gtest)
- cxx_test(gtest-filepath_test gtest_main)
- cxx_test(gtest-linked_ptr_test gtest_main)
- cxx_test(gtest-listener_test gtest_main)
+ cxx_test(googletest-filepath-test gtest_main)
+ cxx_test(googletest-linked-ptr-test gtest_main)
+ cxx_test(googletest-listener-test gtest_main)
cxx_test(gtest_main_unittest gtest_main)
- cxx_test(gtest-message_test gtest_main)
+ cxx_test(googletest-message-test gtest_main)
cxx_test(gtest_no_test_unittest gtest)
- cxx_test(gtest-options_test gtest_main)
- cxx_test(gtest-param-test_test gtest
- test/gtest-param-test2_test.cc)
- cxx_test(gtest-port_test gtest_main)
+ cxx_test(googletest-options-test gtest_main)
+ cxx_test(googletest-param-test-test gtest
+ test/googletest-param-test2-test.cc)
+ cxx_test(googletest-port-test gtest_main)
cxx_test(gtest_pred_impl_unittest gtest_main)
cxx_test(gtest_premature_exit_test gtest
test/gtest_premature_exit_test.cc)
- cxx_test(gtest-printers_test gtest_main)
+ cxx_test(googletest-printers-test gtest_main)
cxx_test(gtest_prod_test gtest_main
test/production.cc)
cxx_test(gtest_repeat_test gtest)
cxx_test(gtest_sole_header_test gtest_main)
cxx_test(gtest_stress_test gtest)
- cxx_test(gtest-test-part_test gtest_main)
+ cxx_test(googletest-test-part-test gtest_main)
cxx_test(gtest_throw_on_failure_ex_test gtest)
cxx_test(gtest-typed-test_test gtest_main
test/gtest-typed-test2_test.cc)
@@ -214,10 +214,10 @@ if (gtest_build_tests)
cxx_test_with_flags(gtest-death-test_ex_nocatch_test
"${cxx_exception} -DGTEST_ENABLE_CATCH_EXCEPTIONS_=0"
- gtest test/gtest-death-test_ex_test.cc)
+ gtest test/googletest-death-test_ex_test.cc)
cxx_test_with_flags(gtest-death-test_ex_catch_test
"${cxx_exception} -DGTEST_ENABLE_CATCH_EXCEPTIONS_=1"
- gtest test/gtest-death-test_ex_test.cc)
+ gtest test/googletest-death-test_ex_test.cc)
cxx_test_with_flags(gtest_no_rtti_unittest "${cxx_no_rtti}"
gtest_main_no_rtti test/gtest_unittest.cc)
@@ -238,75 +238,75 @@ if (gtest_build_tests)
cxx_library(gtest_main_use_own_tuple "${cxx_use_own_tuple}"
src/gtest-all.cc src/gtest_main.cc)
- cxx_test_with_flags(gtest-tuple_test "${cxx_use_own_tuple}"
- gtest_main_use_own_tuple test/gtest-tuple_test.cc)
+ cxx_test_with_flags(googletest-tuple-test "${cxx_use_own_tuple}"
+ gtest_main_use_own_tuple test/googletest-tuple-test.cc)
cxx_test_with_flags(gtest_use_own_tuple_test "${cxx_use_own_tuple}"
gtest_main_use_own_tuple
- test/gtest-param-test_test.cc test/gtest-param-test2_test.cc)
+ test/googletest-param-test-test.cc test/googletest-param-test2-test.cc)
endif()
############################################################
# Python tests.
- cxx_executable(gtest_break_on_failure_unittest_ test gtest)
- py_test(gtest_break_on_failure_unittest)
+ cxx_executable(googletest-break-on-failure-unittest_ test gtest)
+ py_test(googletest-break-on-failure-unittest)
# Visual Studio .NET 2003 does not support STL with exceptions disabled.
if (NOT MSVC OR MSVC_VERSION GREATER 1310) # 1310 is Visual Studio .NET 2003
cxx_executable_with_flags(
- gtest_catch_exceptions_no_ex_test_
+ googletest-catch-exceptions-no-ex-test_
"${cxx_no_exception}"
gtest_main_no_exception
- test/gtest_catch_exceptions_test_.cc)
+ test/googletest-catch-exceptions-test_.cc)
endif()
cxx_executable_with_flags(
- gtest_catch_exceptions_ex_test_
+ googletest-catch-exceptions-ex-test_
"${cxx_exception}"
gtest_main
- test/gtest_catch_exceptions_test_.cc)
- py_test(gtest_catch_exceptions_test)
+ test/googletest-catch-exceptions-test_.cc)
+ py_test(googletest-catch-exceptions-test)
- cxx_executable(gtest_color_test_ test gtest)
- py_test(gtest_color_test)
+ cxx_executable(googletest-color-test_ test gtest)
+ py_test(googletest-color-test)
- cxx_executable(gtest_env_var_test_ test gtest)
- py_test(gtest_env_var_test)
+ cxx_executable(googletest-env-var-test_ test gtest)
+ py_test(googletest-env-var-test)
- cxx_executable(gtest_filter_unittest_ test gtest)
- py_test(gtest_filter_unittest)
+ cxx_executable(googletest-filter-unittest_ test gtest)
+ py_test(googletest-filter-unittest)
cxx_executable(gtest_help_test_ test gtest_main)
py_test(gtest_help_test)
- cxx_executable(gtest_list_tests_unittest_ test gtest)
- py_test(gtest_list_tests_unittest)
+ cxx_executable(googletest-list-tests-unittest_ test gtest)
+ py_test(googletest-list-tests-unittest)
- cxx_executable(gtest_output_test_ test gtest)
- py_test(gtest_output_test --no_stacktrace_support)
+ cxx_executable(googletest-output-test_ test gtest)
+ py_test(googletest-output-test --no_stacktrace_support)
- cxx_executable(gtest_shuffle_test_ test gtest)
- py_test(gtest_shuffle_test)
+ cxx_executable(googletest-shuffle-test_ test gtest)
+ py_test(googletest-shuffle-test)
# MSVC 7.1 does not support STL with exceptions disabled.
if (NOT MSVC OR MSVC_VERSION GREATER 1310)
- cxx_executable(gtest_throw_on_failure_test_ test gtest_no_exception)
- set_target_properties(gtest_throw_on_failure_test_
+ cxx_executable(googletest-throw-on-failure-test_ test gtest_no_exception)
+ set_target_properties(googletest-throw-on-failure-test_
PROPERTIES
COMPILE_FLAGS "${cxx_no_exception}")
- py_test(gtest_throw_on_failure_test)
+ py_test(googletest-throw-on-failure-test)
endif()
- cxx_executable(gtest_uninitialized_test_ test gtest)
- py_test(gtest_uninitialized_test)
+ cxx_executable(googletest-uninitialized-test_ test gtest)
+ py_test(googletest-uninitialized-test)
cxx_executable(gtest_xml_outfile1_test_ test gtest_main)
cxx_executable(gtest_xml_outfile2_test_ test gtest_main)
py_test(gtest_xml_outfiles_test)
- py_test(gtest_json_outfiles_test)
+ py_test(googletest-json-outfiles-test)
cxx_executable(gtest_xml_output_unittest_ test gtest)
py_test(gtest_xml_output_unittest --no_stacktrace_support)
- py_test(gtest_json_output_unittest)
+ py_test(googletest-json-output-unittest --no_stacktrace_support)
endif()
diff --git a/googletest/Makefile.am b/googletest/Makefile.am
index b6c7232..b44c841 100644
--- a/googletest/Makefile.am
+++ b/googletest/Makefile.am
@@ -53,40 +53,40 @@ EXTRA_DIST += \
test/gtest-listener_test.cc \
test/gtest-message_test.cc \
test/gtest-options_test.cc \
- test/gtest-param-test2_test.cc \
- test/gtest-param-test2_test.cc \
- test/gtest-param-test_test.cc \
- test/gtest-param-test_test.cc \
+ test/googletest-param-test2-test.cc \
+ test/googletest-param-test2-test.cc \
+ test/googletest-param-test-test.cc \
+ test/googletest-param-test-test.cc \
test/gtest-param-test_test.h \
test/gtest-port_test.cc \
test/gtest_premature_exit_test.cc \
test/gtest-printers_test.cc \
test/gtest-test-part_test.cc \
- test/gtest-tuple_test.cc \
+ test/googletest-tuple-test.cc \
test/gtest-typed-test2_test.cc \
test/gtest-typed-test_test.cc \
test/gtest-typed-test_test.h \
test/gtest-unittest-api_test.cc \
- test/gtest_break_on_failure_unittest_.cc \
- test/gtest_catch_exceptions_test_.cc \
- test/gtest_color_test_.cc \
- test/gtest_env_var_test_.cc \
+ test/googletest-break-on-failure-unittest_.cc \
+ test/googletest-catch-exceptions-test_.cc \
+ test/googletest-color-test_.cc \
+ test/googletest-env-var-test_.cc \
test/gtest_environment_test.cc \
- test/gtest_filter_unittest_.cc \
+ test/googletest-filter-unittest_.cc \
test/gtest_help_test_.cc \
- test/gtest_list_tests_unittest_.cc \
+ test/googletest-list-tests-unittest_.cc \
test/gtest_main_unittest.cc \
test/gtest_no_test_unittest.cc \
- test/gtest_output_test_.cc \
+ test/googletest-output-test_.cc \
test/gtest_pred_impl_unittest.cc \
test/gtest_prod_test.cc \
test/gtest_repeat_test.cc \
- test/gtest_shuffle_test_.cc \
+ test/googletest-shuffle-test_.cc \
test/gtest_sole_header_test.cc \
test/gtest_stress_test.cc \
test/gtest_throw_on_failure_ex_test.cc \
- test/gtest_throw_on_failure_test_.cc \
- test/gtest_uninitialized_test_.cc \
+ test/googletest-throw-on-failure-test_.cc \
+ test/googletest-uninitialized-test_.cc \
test/gtest_unittest.cc \
test/gtest_unittest.cc \
test/gtest_xml_outfile1_test_.cc \
@@ -97,19 +97,19 @@ EXTRA_DIST += \
# Python tests that we don't run.
EXTRA_DIST += \
- test/gtest_break_on_failure_unittest.py \
- test/gtest_catch_exceptions_test.py \
- test/gtest_color_test.py \
- test/gtest_env_var_test.py \
- test/gtest_filter_unittest.py \
+ test/googletest-break-on-failure-unittest.py \
+ test/googletest-catch-exceptions-test.py \
+ test/googletest-color-test.py \
+ test/googletest-env-var-test.py \
+ test/googletest-filter-unittest.py \
test/gtest_help_test.py \
- test/gtest_list_tests_unittest.py \
- test/gtest_output_test.py \
- test/gtest_output_test_golden_lin.txt \
- test/gtest_shuffle_test.py \
+ test/googletest-list-tests-unittest.py \
+ test/googletest-output-test.py \
+ test/googletest-output-test_golden_lin.txt \
+ test/googletest-shuffle-test.py \
test/gtest_test_utils.py \
- test/gtest_throw_on_failure_test.py \
- test/gtest_uninitialized_test.py \
+ test/googletest-throw-on-failure-test.py \
+ test/googletest-uninitialized-test.py \
test/gtest_xml_outfiles_test.py \
test/gtest_xml_output_unittest.py \
test/gtest_xml_test_utils.py
diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake
index be7af38..086f51c 100644
--- a/googletest/cmake/internal_utils.cmake
+++ b/googletest/cmake/internal_utils.cmake
@@ -20,7 +20,7 @@ macro(fix_default_compiler_settings_)
if (MSVC)
# For MSVC, CMake sets certain flags to defaults we want to override.
# This replacement code is taken from sample in the CMake Wiki at
- # http://www.cmake.org/Wiki/CMake_FAQ#Dynamic_Replace.
+ # https://gitlab.kitware.com/cmake/community/wikis/FAQ#dynamic-replace.
foreach (flag_var
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
diff --git a/googletest/docs/XcodeGuide.md b/googletest/docs/XcodeGuide.md
index 117265c..1c60a33 100644
--- a/googletest/docs/XcodeGuide.md
+++ b/googletest/docs/XcodeGuide.md
@@ -6,7 +6,7 @@ This guide will explain how to use the Google Testing Framework in your Xcode pr
Here is the quick guide for using Google Test in your Xcode project.
- 1. Download the source from the [website](http://code.google.com/p/googletest) using this command: `svn checkout http://googletest.googlecode.com/svn/trunk/ googletest-read-only`.
+ 1. Download the source from the [website](https://github.com/google/googletest) using this command: `svn checkout http://googletest.googlecode.com/svn/trunk/ googletest-read-only`.
1. Open up the `gtest.xcodeproj` in the `googletest-read-only/xcode/` directory and build the gtest.framework.
1. Create a new "Shell Tool" target in your Xcode project called something like "UnitTests".
1. Add the gtest.framework to your project and add it to the "Link Binary with Libraries" build phase of "UnitTests".
@@ -18,7 +18,7 @@ The following sections further explain each of the steps listed above in depth,
# Get the Source #
-Currently, the gtest.framework discussed here isn't available in a tagged release of Google Test, it is only available in the trunk. As explained at the Google Test [site](http://code.google.com/p/googletest/source/checkout">svn), you can get the code from anonymous SVN with this command:
+Currently, the gtest.framework discussed here isn't available in a tagged release of Google Test, it is only available in the trunk. As explained at the Google Test [site](https://github.com/google/googletest), you can get the code from anonymous SVN with this command:
```
svn checkout http://googletest.googlecode.com/svn/trunk/ googletest-read-only
@@ -28,7 +28,7 @@ Alternatively, if you are working with Subversion in your own code base, you can
To use `svn:externals`, decide where you would like to have the external source reside. You might choose to put the external source inside the trunk, because you want it to be part of the branch when you make a release. However, keeping it outside the trunk in a version-tagged directory called something like `third-party/googletest/1.0.1`, is another option. Once the location is established, use `svn propedit svn:externals _directory_` to set the svn:externals property on a directory in your repository. This directory won't contain the code, but be its versioned parent directory.
-The command `svn propedit` will bring up your Subversion editor, making editing the long, (potentially multi-line) property simpler. This same method can be used to check out a tagged branch, by using the appropriate URL (e.g. `http://googletest.googlecode.com/svn/tags/release-1.0.1`). Additionally, the svn:externals property allows the specification of a particular revision of the trunk with the `-r_##_` option (e.g. `externals/src/googletest -r60 http://googletest.googlecode.com/svn/trunk`).
+The command `svn propedit` will bring up your Subversion editor, making editing the long, (potentially multi-line) property simpler. This same method can be used to check out a tagged branch, by using the appropriate URL (e.g. `https://github.com/google/googletest/releases/tag/release-1.0.1`). Additionally, the svn:externals property allows the specification of a particular revision of the trunk with the `-r_##_` option (e.g. `externals/src/googletest -r60 http://googletest.googlecode.com/svn/trunk`).
Here is an example of using the svn:externals properties on a trunk (read via `svn propget`) of a project. This value checks out a copy of Google Test into the `trunk/externals/src/googletest/` directory.
@@ -90,4 +90,4 @@ The Debugger has exited with status 0.
# Summary #
-Unit testing is a valuable way to ensure your data model stays valid even during rapid development or refactoring. The Google Testing Framework is a great unit testing framework for C and C++ which integrates well with an Xcode development environment. \ No newline at end of file
+Unit testing is a valuable way to ensure your data model stays valid even during rapid development or refactoring. The Google Testing Framework is a great unit testing framework for C and C++ which integrates well with an Xcode development environment.
diff --git a/googletest/docs/advanced.md b/googletest/docs/advanced.md
index 6883784..feb8ad6 100644
--- a/googletest/docs/advanced.md
+++ b/googletest/docs/advanced.md
@@ -154,7 +154,7 @@ c is 10
> `ASSERT_PRED*` or `EXPECT_PRED*`, please see
> [this](faq#OverloadedPredicate) for how to resolve it.
> 1. Currently we only provide predicate assertions of arity <= 5. If you need
-> a higher-arity assertion, let [us](http://g/opensource-gtest) know.
+> a higher-arity assertion, let [us](https://github.com/google/googletest/issues) know.
**Availability**: Linux, Windows, Mac.
@@ -382,7 +382,7 @@ Verifies that `val1` is less than, or almost equal to, `val2`. You can replace
### Asserting Using gMock Matchers
-Google-developed C++ mocking framework [gMock](http://go/gmock) comes with a
+Google-developed C++ mocking framework [gMock](../../googlemock) comes with a
library of matchers for validating arguments passed to mock objects. A gMock
*matcher* is basically a predicate that knows how to describe itself. It can be
used in these assertion macros:
@@ -402,17 +402,17 @@ using ::testing::StartsWith;
EXPECT_THAT(Foo(), StartsWith("Hello"));
```
-Read this [recipe](http://go/gmockguide#using-matchers-in-gunit-assertions) in
+Read this [recipe](../../googlemock/docs/CookBook.md#using-matchers-in-google-test-assertions) in
the gMock Cookbook for more details.
gMock has a rich set of matchers. You can do many things googletest cannot do
alone with them. For a list of matchers gMock provides, read
-[this](http://go/gmockguide#using-matchers). Especially useful among them are
-some [protocol buffer matchers](http://go/protomatchers). It's easy to write
-your [own matchers](http://go/gmockguide#NewMatchers) too.
+[this](../../googlemock/docs/CookBook.md#using-matchers). Especially useful among them are
+some [protocol buffer matchers](https://github.com/google/nucleus/blob/master/nucleus/testing/protocol-buffer-matchers.h). It's easy to write
+your [own matchers](../../googlemock/docs/CookBook.md#writing-new-matchers-quickly) too.
For example, you can use gMock's
-[EqualsProto](http://cs/#piper///depot/google3/testing/base/public/gmock_utils/protocol-buffer-matchers.h)
+[EqualsProto](https://github.com/google/nucleus/blob/master/nucleus/testing/protocol-buffer-matchers.h)
to compare protos in your tests:
```c++
@@ -433,7 +433,7 @@ and you're ready to go.
(Please read the [previous](#AssertThat) section first if you haven't.)
-You can use the gMock [string matchers](http://go/gmockguide#string-matchers)
+You can use the gMock [string matchers](../../googlemock/docs/CheatSheet.md#string-matchers)
with `EXPECT_THAT()` or `ASSERT_THAT()` to do more string comparison tricks
(sub-string, prefix, suffix, regular expression, and etc). For example,
diff --git a/googletest/docs/faq.md b/googletest/docs/faq.md
index dad2836..d613f7b 100644
--- a/googletest/docs/faq.md
+++ b/googletest/docs/faq.md
@@ -162,7 +162,7 @@ result, any in-memory side effects they incur are observable in their respective
sub-processes, but not in the parent process. You can think of them as running
in a parallel universe, more or less.
-In particular, if you use [gMock](http://go/gmock) and the death test statement
+In particular, if you use [gMock](../../googlemock) and the death test statement
invokes some mock methods, the parent process will think the calls have never
occurred. Therefore, you may want to move your `EXPECT_CALL` statements inside
the `EXPECT_DEATH` macro.
@@ -289,7 +289,7 @@ Please make sure you have read [this](advanced.md#how-it-works).
In particular, death tests don't like having multiple threads in the parent
process. So the first thing you can try is to eliminate creating threads outside
-of `EXPECT_DEATH()`. For example, you may want to use [mocks](http://go/gmock)
+of `EXPECT_DEATH()`. For example, you may want to use [mocks](../../googlemock)
or fake objects instead of real ones in your tests.
Sometimes this is impossible as some library you must use may be creating
@@ -704,7 +704,7 @@ mistake in production. Such cleverness also leads to
advise against the practice, and googletest doesn't provide a way to do it.
In general, the recommended way to cause the code to behave differently under
-test is [Dependency Injection](http://go/dependency-injection). You can inject
+test is [Dependency Injection](https://en.wikipedia.org/wiki/Dependency_injection). You can inject
different functionality from the test and from the production code. Since your
production code doesn't link in the for-test logic at all (the
[`testonly`](http://go/testonly) attribute for BUILD targets helps to ensure
diff --git a/googletest/docs/primer.md b/googletest/docs/primer.md
index 260d50b..02dea42 100644
--- a/googletest/docs/primer.md
+++ b/googletest/docs/primer.md
@@ -5,8 +5,8 @@
*googletest* helps you write better C++ tests.
-googletest is a testing framework developed by the [Testing
-Technology](http://engdoc/eng/testing/TT/) team with Google's specific
+googletest is a testing framework developed by the Testing
+Technology team with Google's specific
requirements and constraints in mind. No matter whether you work on Linux,
Windows, or a Mac, if you write C++ code, googletest can help you. And it
supports *any* kind of tests, not just unit tests.
@@ -75,7 +75,7 @@ the terms:
Meaning | googletest Term | [ISTQB](http://www.istqb.org/) Term
:----------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------- | :----------------------------------
Exercise a particular program path with specific input values and verify the results | [TEST()](#simple-tests) | [Test Case](http://glossary.istqb.org/search/test%20case)
-A set of several tests related to one component | [TestCase](https://g3doc.corp.google.com/third_party/googletest/googletest/g3doc/primer.md#basic-concepts) | [TestSuite](http://glossary.istqb.org/search/test%20suite)
+A set of several tests related to one component | [TestCase](#basic-concepts) | [TestSuite](http://glossary.istqb.org/search/test%20suite)
## Basic Concepts
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h
index 497fc29..850f876 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -397,7 +397,7 @@
#if GTEST_LANG_CXX11
# define GTEST_HAS_STD_TUPLE_ 1
# if defined(__clang__)
-// Inspired by http://clang.llvm.org/docs/LanguageExtensions.html#__has_include
+// Inspired by https://clang.llvm.org/docs/LanguageExtensions.html#include-file-checking-macros
# if defined(__has_include) && !__has_include(<tuple>)
# undef GTEST_HAS_STD_TUPLE_
# endif
@@ -409,7 +409,7 @@
# elif defined(__GLIBCXX__)
// Inspired by boost/config/stdlib/libstdcpp3.hpp,
// http://gcc.gnu.org/gcc-4.2/changes.html and
-// http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch01.html#manual.intro.status.standard.200x
+// https://web.archive.org/web/20140227044429/gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch01.html#manual.intro.status.standard.200x
# if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)
# undef GTEST_HAS_STD_TUPLE_
# endif
@@ -1817,7 +1817,7 @@ class GTEST_API_ Mutex {
// Initializes owner_thread_id_ and critical_section_ in static mutexes.
void ThreadSafeLazyInit();
- // Per http://blogs.msdn.com/b/oldnewthing/archive/2004/02/23/78395.aspx,
+ // Per https://blogs.msdn.microsoft.com/oldnewthing/20040223-00/?p=40503,
// we assume that 0 is an invalid value for thread IDs.
unsigned int owner_thread_id_;
diff --git a/googletest/scripts/upload.py b/googletest/scripts/upload.py
index 81e8e04..c852e4c 100755
--- a/googletest/scripts/upload.py
+++ b/googletest/scripts/upload.py
@@ -242,7 +242,7 @@ class AbstractRpcServer(object):
The authentication process works as follows:
1) We get a username and password from the user
2) We use ClientLogin to obtain an AUTH token for the user
- (see http://code.google.com/apis/accounts/AuthForInstalledApps.html).
+ (see https://developers.google.com/identity/protocols/AuthForInstalledApps).
3) We pass the auth token to /_ah/login on the server to obtain an
authentication cookie. If login was successful, it tries to redirect
us to the URL we provided.
@@ -506,7 +506,7 @@ def EncodeMultipartFormData(fields, files):
(content_type, body) ready for httplib.HTTP instance.
Source:
- http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306
+ https://web.archive.org/web/20160116052001/code.activestate.com/recipes/146306
"""
BOUNDARY = '-M-A-G-I-C---B-O-U-N-D-A-R-Y-'
CRLF = '\r\n'
@@ -807,7 +807,7 @@ class SubversionVCS(VersionControlSystem):
# svn cat translates keywords but svn diff doesn't. As a result of this
# behavior patching.PatchChunks() fails with a chunk mismatch error.
# This part was originally written by the Review Board development team
- # who had the same problem (http://reviews.review-board.org/r/276/).
+ # who had the same problem (https://reviews.reviewboard.org/r/276/).
# Mapping of keywords to known aliases
svn_keywords = {
# Standard keywords
@@ -860,7 +860,7 @@ class SubversionVCS(VersionControlSystem):
status_lines = status.splitlines()
# If file is in a cl, the output will begin with
# "\n--- Changelist 'cl_name':\n". See
- # http://svn.collab.net/repos/svn/trunk/notes/changelist-design.txt
+ # https://web.archive.org/web/20090918234815/svn.collab.net/repos/svn/trunk/notes/changelist-design.txt
if (len(status_lines) == 3 and
not status_lines[0] and
status_lines[1].startswith("--- Changelist")):
diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc
index 2ab2d25..71942e5 100644
--- a/googletest/src/gtest-port.cc
+++ b/googletest/src/gtest-port.cc
@@ -264,7 +264,7 @@ Mutex::~Mutex() {
// to clean them up.
// TODO(yukawa): Switch to Slim Reader/Writer (SRW) Locks, which requires
// nothing to clean it up but is available only on Vista and later.
- // http://msdn.microsoft.com/en-us/library/windows/desktop/aa904937.aspx
+ // https://docs.microsoft.com/en-us/windows/desktop/Sync/slim-reader-writer--srw--locks
if (type_ == kDynamic) {
::DeleteCriticalSection(critical_section_);
delete critical_section_;
diff --git a/googletest/test/BUILD.bazel b/googletest/test/BUILD.bazel
index 405feee..a930d65 100644
--- a/googletest/test/BUILD.bazel
+++ b/googletest/test/BUILD.bazel
@@ -49,31 +49,48 @@ config_setting(
values = {"define": "absl=1"},
)
-#on windows exclude gtest-tuple.h and gtest-tuple_test.cc
+#on windows exclude gtest-tuple.h and googletest-tuple-test.cc
cc_test(
name = "gtest_all_test",
size = "small",
srcs = glob(
include = [
"gtest-*.cc",
+ "googletest-*.cc",
"*.h",
"googletest/include/gtest/**/*.h",
],
exclude = [
"gtest-unittest-api_test.cc",
- "gtest-tuple_test.cc",
+ "googletest-tuple-test.cc",
"googletest/src/gtest-all.cc",
"gtest_all_test.cc",
"gtest-death-test_ex_test.cc",
"gtest-listener_test.cc",
"gtest-unittest-api_test.cc",
- "gtest-param-test_test.cc",
+ "googletest-param-test-test.cc",
+ "googletest-catch-exceptions-test_.cc",
+ "googletest-color-test_.cc",
+ "googletest-env-var-test_.cc",
+ "googletest-filter-unittest_.cc",
+ "googletest-break-on-failure-unittest_.cc",
+ "googletest-listener-test.cc",
+ "googletest-output-test_.cc",
+ "googletest-list-tests-unittest_.cc",
+ "googletest-shuffle-test_.cc",
+ "googletest-uninitialized-test_.cc",
+ "googletest-death-test_ex_test.cc",
+ "googletest-param-test-test",
+ "googletest-throw-on-failure-test_.cc",
+ "googletest-param-test-invalid-name1-test_.cc",
+ "googletest-param-test-invalid-name2-test_.cc",
+
],
) + select({
"//:windows": [],
"//:windows_msvc": [],
"//conditions:default": [
- "gtest-tuple_test.cc",
+ "googletest-tuple-test.cc",
],
}),
copts = select({
@@ -97,16 +114,28 @@ cc_test(
deps = ["//:gtest_main"],
)
+
+# Tests death tests.
+cc_test(
+ name = "googletest-death-test-test",
+ size = "medium",
+ srcs = ["googletest-death-test-test.cc"],
+ deps = ["//:gtest_main"],
+)
+
+cc_test(
+ name = "gtest_test_macro_stack_footprint_test",
+ size = "small",
+ srcs = ["gtest_test_macro_stack_footprint_test.cc"],
+ deps = ["//:gtest"],
+)
+
#These googletest tests have their own main()
cc_test(
- name = "gtest-listener_test",
+ name = "googletest-listener-test",
size = "small",
- srcs = [
- "gtest-listener_test.cc",
- ],
- deps = [
- "//:gtest",
- ],
+ srcs = ["googletest-listener-test.cc"],
+ deps = ["//:gtest_main"],
)
cc_test(
@@ -121,16 +150,14 @@ cc_test(
)
cc_test(
- name = "gtest-param-test_test",
+ name = "googletest-param-test-test",
size = "small",
srcs = [
- "gtest-param-test2_test.cc",
- "gtest-param-test_test.cc",
- "gtest-param-test_test.h",
- ],
- deps = [
- "//:gtest",
+ "googletest-param-test-test.cc",
+ "googletest-param-test-test.h",
+ "googletest-param-test2-test.cc",
],
+ deps = ["//:gtest"],
)
cc_test(
@@ -166,87 +193,92 @@ py_test(
)
cc_binary(
- name = "gtest_output_test_",
+ name = "googletest-output-test_",
testonly = 1,
- srcs = ["gtest_output_test_.cc"],
+ srcs = ["googletest-output-test_.cc"],
deps = ["//:gtest"],
)
+
py_test(
- name = "gtest_output_test",
+ name = "googletest-output-test",
size = "small",
- srcs = ["gtest_output_test.py"],
+ srcs = ["googletest-output-test.py"],
args = select({
":has_absl": [],
"//conditions:default": ["--no_stacktrace_support"],
}),
data = [
- "gtest_output_test_golden_lin.txt",
- ":gtest_output_test_",
+ "googletest-output-test-golden-lin.txt",
+ ":googletest-output-test_",
],
deps = [":gtest_test_utils"],
)
cc_binary(
- name = "gtest_color_test_",
+ name = "googletest-color-test_",
testonly = 1,
- srcs = ["gtest_color_test_.cc"],
+ srcs = ["googletest-color-test_.cc"],
deps = ["//:gtest"],
)
py_test(
- name = "gtest_color_test",
+ name = "googletest-color-test",
size = "small",
- srcs = ["gtest_color_test.py"],
- data = [":gtest_color_test_"],
+ srcs = ["googletest-color-test.py"],
+ data = [":googletest-color-test_"],
deps = [":gtest_test_utils"],
)
cc_binary(
- name = "gtest_env_var_test_",
+ name = "googletest-env-var-test_",
testonly = 1,
- srcs = ["gtest_env_var_test_.cc"],
+ srcs = ["googletest-env-var-test_.cc"],
deps = ["//:gtest"],
)
py_test(
- name = "gtest_env_var_test",
- size = "small",
- srcs = ["gtest_env_var_test.py"],
- data = [":gtest_env_var_test_"],
+ name = "googletest-env-var-test",
+ size = "medium",
+ srcs = ["googletest-env-var-test.py"],
+ data = [":googletest-env-var-test_"],
deps = [":gtest_test_utils"],
)
cc_binary(
- name = "gtest_filter_unittest_",
+ name = "googletest-filter-unittest_",
testonly = 1,
- srcs = ["gtest_filter_unittest_.cc"],
+ srcs = ["googletest-filter-unittest_.cc"],
deps = ["//:gtest"],
)
py_test(
- name = "gtest_filter_unittest",
- size = "small",
- srcs = ["gtest_filter_unittest.py"],
- data = [":gtest_filter_unittest_"],
+ name = "googletest-filter-unittest",
+ size = "medium",
+ srcs = ["googletest-filter-unittest.py"],
+ data = [":googletest-filter-unittest_"],
deps = [":gtest_test_utils"],
)
+
cc_binary(
- name = "gtest_break_on_failure_unittest_",
+ name = "googletest-break-on-failure-unittest_",
testonly = 1,
- srcs = ["gtest_break_on_failure_unittest_.cc"],
+ srcs = ["googletest-break-on-failure-unittest_.cc"],
deps = ["//:gtest"],
)
+
+
py_test(
- name = "gtest_break_on_failure_unittest",
+ name = "googletest-break-on-failure-unittest",
size = "small",
- srcs = ["gtest_break_on_failure_unittest.py"],
- data = [":gtest_break_on_failure_unittest_"],
+ srcs = ["googletest-break-on-failure-unittest.py"],
+ data = [":googletest-break-on-failure-unittest_"],
deps = [":gtest_test_utils"],
)
+
cc_test(
name = "gtest_assert_by_exception_test",
size = "small",
@@ -254,72 +286,75 @@ cc_test(
deps = ["//:gtest"],
)
+
+
cc_binary(
- name = "gtest_throw_on_failure_test_",
+ name = "googletest-throw-on-failure-test_",
testonly = 1,
- srcs = ["gtest_throw_on_failure_test_.cc"],
+ srcs = ["googletest-throw-on-failure-test_.cc"],
deps = ["//:gtest"],
)
py_test(
- name = "gtest_throw_on_failure_test",
+ name = "googletest-throw-on-failure-test",
size = "small",
- srcs = ["gtest_throw_on_failure_test.py"],
- data = [":gtest_throw_on_failure_test_"],
+ srcs = ["googletest-throw-on-failure-test.py"],
+ data = [":googletest-throw-on-failure-test_"],
deps = [":gtest_test_utils"],
)
+
cc_binary(
- name = "gtest_list_tests_unittest_",
+ name = "googletest-list-tests-unittest_",
testonly = 1,
- srcs = ["gtest_list_tests_unittest_.cc"],
+ srcs = ["googletest-list-tests-unittest_.cc"],
deps = ["//:gtest"],
)
py_test(
- name = "gtest_list_tests_unittest",
+ name = "googletest-list-tests-unittest",
size = "small",
- srcs = ["gtest_list_tests_unittest.py"],
- data = [":gtest_list_tests_unittest_"],
+ srcs = ["googletest-list-tests-unittest.py"],
+ data = [":googletest-list-tests-unittest_"],
deps = [":gtest_test_utils"],
)
cc_binary(
- name = "gtest_shuffle_test_",
- srcs = ["gtest_shuffle_test_.cc"],
+ name = "googletest-shuffle-test_",
+ srcs = ["googletest-shuffle-test_.cc"],
deps = ["//:gtest"],
)
py_test(
- name = "gtest_shuffle_test",
+ name = "googletest-shuffle-test",
size = "small",
- srcs = ["gtest_shuffle_test.py"],
- data = [":gtest_shuffle_test_"],
+ srcs = ["googletest-shuffle-test.py"],
+ data = [":googletest-shuffle-test_"],
deps = [":gtest_test_utils"],
)
cc_binary(
- name = "gtest_catch_exceptions_no_ex_test_",
+ name = "googletest-catch-exceptions-no-ex-test_",
testonly = 1,
- srcs = ["gtest_catch_exceptions_test_.cc"],
+ srcs = ["googletest-catch-exceptions-test_.cc"],
deps = ["//:gtest_main"],
)
cc_binary(
- name = "gtest_catch_exceptions_ex_test_",
+ name = "googletest-catch-exceptions-ex-test_",
testonly = 1,
- srcs = ["gtest_catch_exceptions_test_.cc"],
+ srcs = ["googletest-catch-exceptions-test_.cc"],
copts = ["-fexceptions"],
deps = ["//:gtest_main"],
)
py_test(
- name = "gtest_catch_exceptions_test",
+ name = "googletest-catch-exceptions-test",
size = "small",
- srcs = ["gtest_catch_exceptions_test.py"],
+ srcs = ["googletest-catch-exceptions-test.py"],
data = [
- ":gtest_catch_exceptions_ex_test_",
- ":gtest_catch_exceptions_no_ex_test_",
+ ":googletest-catch-exceptions-ex-test_",
+ ":googletest-catch-exceptions-no-ex-test_",
],
deps = [":gtest_test_utils"],
)
@@ -387,17 +422,17 @@ py_test(
)
cc_binary(
- name = "gtest_uninitialized_test_",
+ name = "googletest-uninitialized-test_",
testonly = 1,
- srcs = ["gtest_uninitialized_test_.cc"],
+ srcs = ["googletest-uninitialized-test_.cc"],
deps = ["//:gtest"],
)
py_test(
- name = "gtest_uninitialized_test",
+ name = "googletest-uninitialized-test",
size = "medium",
- srcs = ["gtest_uninitialized_test.py"],
- data = [":gtest_uninitialized_test_"],
+ srcs = ["googletest-uninitialized-test.py"],
+ data = ["googletest-uninitialized-test_"],
deps = [":gtest_test_utils"],
)
@@ -416,3 +451,77 @@ py_test(
data = [":gtest_testbridge_test_"],
deps = [":gtest_test_utils"],
)
+
+
+py_test(
+ name = "googletest-json-outfiles-test",
+ size = "small",
+ srcs = [
+ "googletest-json-outfiles-test.py",
+ "gtest_json_test_utils.py",
+ ],
+ data = [
+ ":gtest_xml_outfile1_test_",
+ ":gtest_xml_outfile2_test_",
+ ],
+ deps = [":gtest_test_utils"],
+)
+
+py_test(
+ name = "googletest-json-output-unittest",
+ size = "medium",
+ srcs = [
+ "googletest-json-output-unittest.py",
+ "gtest_json_test_utils.py",
+ ],
+ data = [
+ # We invoke gtest_no_test_unittest to verify the JSON output
+ # when the test program contains no test definition.
+ ":gtest_no_test_unittest",
+ ":gtest_xml_output_unittest_",
+ ],
+ args = select({
+ ":has_absl": [],
+ "//conditions:default": ["--no_stacktrace_support"],
+ }),
+ deps = [":gtest_test_utils"],
+)
+# Verifies interaction of death tests and exceptions.
+cc_test(
+ name = "googletest-death-test_ex_catch_test",
+ size = "medium",
+ srcs = ["googletest-death-test_ex_test.cc"],
+ copts = ["-fexceptions"],
+ defines = ["GTEST_ENABLE_CATCH_EXCEPTIONS_=1"],
+ deps = ["//:gtest"],
+)
+
+cc_binary(
+ name = "googletest-param-test-invalid-name1-test_",
+ testonly = 1,
+ srcs = ["googletest-param-test-invalid-name1-test_.cc"],
+ deps = ["//:gtest"],
+)
+
+cc_binary(
+ name = "googletest-param-test-invalid-name2-test_",
+ testonly = 1,
+ srcs = ["googletest-param-test-invalid-name2-test_.cc"],
+ deps = ["//:gtest"],
+)
+
+py_test(
+ name = "googletest-param-test-invalid-name1-test",
+ size = "small",
+ srcs = ["googletest-param-test-invalid-name1-test.py"],
+ data = [":googletest-param-test-invalid-name1-test_"],
+ deps = [":gtest_test_utils"],
+)
+
+py_test(
+ name = "googletest-param-test-invalid-name2-test",
+ size = "small",
+ srcs = ["googletest-param-test-invalid-name2-test.py"],
+ data = [":googletest-param-test-invalid-name2-test_"],
+ deps = [":gtest_test_utils"],
+)
diff --git a/googletest/test/gtest_break_on_failure_unittest.py b/googletest/test/googletest-break-on-failure-unittest.py
index 16e19db..cd77547 100755
--- a/googletest/test/gtest_break_on_failure_unittest.py
+++ b/googletest/test/googletest-break-on-failure-unittest.py
@@ -34,7 +34,7 @@
A user can ask Google Test to seg-fault when an assertion fails, using
either the GTEST_BREAK_ON_FAILURE environment variable or the
--gtest_break_on_failure flag. This script tests such functionality
-by invoking gtest_break_on_failure_unittest_ (a program written with
+by invoking googletest-break-on-failure-unittest_ (a program written with
Google Test) with different environments and command line flags.
"""
@@ -59,9 +59,9 @@ THROW_ON_FAILURE_ENV_VAR = 'GTEST_THROW_ON_FAILURE'
# The environment variable for enabling/disabling the catch-exceptions mode.
CATCH_EXCEPTIONS_ENV_VAR = 'GTEST_CATCH_EXCEPTIONS'
-# Path to the gtest_break_on_failure_unittest_ program.
+# Path to the googletest-break-on-failure-unittest_ program.
EXE_PATH = gtest_test_utils.GetTestExecutablePath(
- 'gtest_break_on_failure_unittest_')
+ 'googletest-break-on-failure-unittest_')
environ = gtest_test_utils.environ
@@ -95,7 +95,7 @@ class GTestBreakOnFailureUnitTest(gtest_test_utils.TestCase):
"""
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault):
- """Runs gtest_break_on_failure_unittest_ and verifies that it does
+ """Runs googletest-break-on-failure-unittest_ and verifies that it does
(or does not) have a seg-fault.
Args:
diff --git a/googletest/test/gtest_break_on_failure_unittest_.cc b/googletest/test/googletest-break-on-failure-unittest_.cc
index 1231ec2..1231ec2 100644
--- a/googletest/test/gtest_break_on_failure_unittest_.cc
+++ b/googletest/test/googletest-break-on-failure-unittest_.cc
diff --git a/googletest/test/gtest_catch_exceptions_test.py b/googletest/test/googletest-catch-exceptions-test.py
index 760f914..69dbadf 100755
--- a/googletest/test/gtest_catch_exceptions_test.py
+++ b/googletest/test/googletest-catch-exceptions-test.py
@@ -30,8 +30,8 @@
"""Tests Google Test's exception catching behavior.
-This script invokes gtest_catch_exceptions_test_ and
-gtest_catch_exceptions_ex_test_ (programs written with
+This script invokes googletest-catch-exceptions-test_ and
+googletest-catch-exceptions-ex-test_ (programs written with
Google Test) and verifies their output.
"""
@@ -45,15 +45,15 @@ LIST_TESTS_FLAG = FLAG_PREFIX + 'list_tests'
NO_CATCH_EXCEPTIONS_FLAG = FLAG_PREFIX + 'catch_exceptions=0'
FILTER_FLAG = FLAG_PREFIX + 'filter'
-# Path to the gtest_catch_exceptions_ex_test_ binary, compiled with
+# Path to the googletest-catch-exceptions-ex-test_ binary, compiled with
# exceptions enabled.
EX_EXE_PATH = gtest_test_utils.GetTestExecutablePath(
- 'gtest_catch_exceptions_ex_test_')
+ 'googletest-catch-exceptions-ex-test_')
-# Path to the gtest_catch_exceptions_test_ binary, compiled with
+# Path to the googletest-catch-exceptions-test_ binary, compiled with
# exceptions disabled.
EXE_PATH = gtest_test_utils.GetTestExecutablePath(
- 'gtest_catch_exceptions_no_ex_test_')
+ 'googletest-catch-exceptions-no-ex-test_')
environ = gtest_test_utils.environ
SetEnvVar = gtest_test_utils.SetEnvVar
diff --git a/googletest/test/gtest_catch_exceptions_test_.cc b/googletest/test/googletest-catch-exceptions-test_.cc
index c6d953c..cb018f9 100644
--- a/googletest/test/gtest_catch_exceptions_test_.cc
+++ b/googletest/test/googletest-catch-exceptions-test_.cc
@@ -30,7 +30,7 @@
// Author: vladl@google.com (Vlad Losev)
//
// Tests for Google Test itself. Tests in this file throw C++ or SEH
-// exceptions, and the output is verified by gtest_catch_exceptions_test.py.
+// exceptions, and the output is verified by googletest-catch-exceptions-test.py.
#include "gtest/gtest.h"
diff --git a/googletest/test/gtest_color_test.py b/googletest/test/googletest-color-test.py
index 49b8ed2..875d478 100755
--- a/googletest/test/gtest_color_test.py
+++ b/googletest/test/googletest-color-test.py
@@ -40,7 +40,7 @@ IS_WINDOWS = os.name == 'nt'
COLOR_ENV_VAR = 'GTEST_COLOR'
COLOR_FLAG = 'gtest_color'
-COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_color_test_')
+COMMAND = gtest_test_utils.GetTestExecutablePath('googletest-color-test_')
def SetEnvVar(env_var, value):
@@ -53,7 +53,7 @@ def SetEnvVar(env_var, value):
def UsesColor(term, color_env_var, color_flag):
- """Runs gtest_color_test_ and returns its exit code."""
+ """Runs googletest-color-test_ and returns its exit code."""
SetEnvVar('TERM', term)
SetEnvVar(COLOR_ENV_VAR, color_env_var)
diff --git a/googletest/test/gtest_color_test_.cc b/googletest/test/googletest-color-test_.cc
index f9a21e2..f9a21e2 100644
--- a/googletest/test/gtest_color_test_.cc
+++ b/googletest/test/googletest-color-test_.cc
diff --git a/googletest/test/gtest-death-test_test.cc b/googletest/test/googletest-death-test-test.cc
index 37261cb..9d8f13c 100644
--- a/googletest/test/gtest-death-test_test.cc
+++ b/googletest/test/googletest-death-test-test.cc
@@ -784,7 +784,7 @@ static void TestExitMacros() {
// Of all signals effects on the process exit code, only those of SIGABRT
// are documented on Windows.
- // See http://msdn.microsoft.com/en-us/library/dwwzkt4c(VS.71).aspx.
+ // See https://msdn.microsoft.com/en-us/query-bi/m/dwwzkt4c.
EXPECT_EXIT(raise(SIGABRT), testing::ExitedWithCode(3), "") << "b_ar";
# elif !GTEST_OS_FUCHSIA
diff --git a/googletest/test/gtest-death-test_ex_test.cc b/googletest/test/googletest-death-test_ex_test.cc
index b50a13d..3391074 100644
--- a/googletest/test/gtest-death-test_ex_test.cc
+++ b/googletest/test/googletest-death-test_ex_test.cc
@@ -69,7 +69,7 @@ TEST(CxxExceptionDeathTest, PrintsMessageForStdExceptions) {
"exceptional message");
// Verifies that the location is mentioned in the failure text.
EXPECT_NONFATAL_FAILURE(EXPECT_DEATH(throw TestException(), ""),
- "gtest-death-test_ex_test.cc");
+ "googletest-death-test_ex_test.cc");
}
# endif // GTEST_HAS_EXCEPTIONS
diff --git a/googletest/test/gtest_env_var_test.py b/googletest/test/googletest-env-var-test.py
index beb2a8b..9c80e2a 100755
--- a/googletest/test/gtest_env_var_test.py
+++ b/googletest/test/googletest-env-var-test.py
@@ -40,7 +40,7 @@ import gtest_test_utils
IS_WINDOWS = os.name == 'nt'
IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
-COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_env_var_test_')
+COMMAND = gtest_test_utils.GetTestExecutablePath('googletest-env-var-test_')
environ = os.environ.copy()
@@ -62,7 +62,7 @@ def SetEnvVar(env_var, value):
def GetFlag(flag):
- """Runs gtest_env_var_test_ and returns its output."""
+ """Runs googletest-env-var-test_ and returns its output."""
args = [COMMAND]
if flag is not None:
diff --git a/googletest/test/gtest_env_var_test_.cc b/googletest/test/googletest-env-var-test_.cc
index 9b668dc..74b9506 100644
--- a/googletest/test/gtest_env_var_test_.cc
+++ b/googletest/test/googletest-env-var-test_.cc
@@ -115,7 +115,7 @@ int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv);
if (argc != 2) {
- cout << "Usage: gtest_env_var_test_ NAME_OF_FLAG\n";
+ cout << "Usage: googletest-env-var-test_ NAME_OF_FLAG\n";
return 1;
}
diff --git a/googletest/test/gtest-filepath_test.cc b/googletest/test/googletest-filepath-test.cc
index 29cea3d..29cea3d 100644
--- a/googletest/test/gtest-filepath_test.cc
+++ b/googletest/test/googletest-filepath-test.cc
diff --git a/googletest/test/gtest_filter_unittest.py b/googletest/test/googletest-filter-unittest.py
index 92cc77c..1e554d5 100755
--- a/googletest/test/gtest_filter_unittest.py
+++ b/googletest/test/googletest-filter-unittest.py
@@ -33,7 +33,7 @@
A user can specify which test(s) in a Google Test program to run via either
the GTEST_FILTER environment variable or the --gtest_filter flag.
This script tests such functionality by invoking
-gtest_filter_unittest_ (a program written with Google Test) with different
+googletest-filter-unittest_ (a program written with Google Test) with different
environments and command line flags.
Note that test sharding may also influence which tests are filtered. Therefore,
@@ -100,8 +100,8 @@ FILTER_FLAG = 'gtest_filter'
# The command line flag for including disabled tests.
ALSO_RUN_DISABLED_TESTS_FLAG = 'gtest_also_run_disabled_tests'
-# Command to run the gtest_filter_unittest_ program.
-COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_filter_unittest_')
+# Command to run the googletest-filter-unittest_ program.
+COMMAND = gtest_test_utils.GetTestExecutablePath('googletest-filter-unittest_')
# Regex for determining whether parameterized tests are enabled in the binary.
PARAM_TEST_REGEX = re.compile(r'/ParamTest')
@@ -120,7 +120,7 @@ LIST_TESTS_FLAG = '--gtest_list_tests'
SUPPORTS_DEATH_TESTS = 'HasDeathTest' in gtest_test_utils.Subprocess(
[COMMAND, LIST_TESTS_FLAG]).output
-# Full names of all tests in gtest_filter_unittests_.
+# Full names of all tests in googletest-filter-unittests_.
PARAM_TESTS = [
'SeqP/ParamTest.TestX/0',
'SeqP/ParamTest.TestX/1',
@@ -292,7 +292,7 @@ class GTestFilterUnitTest(gtest_test_utils.TestCase):
args=None, check_exit_0=False):
"""Checks that binary runs correct tests for the given filter and shard.
- Runs all shards of gtest_filter_unittest_ with the given filter, and
+ Runs all shards of googletest-filter-unittest_ with the given filter, and
verifies that the right set of tests were run. The union of tests run
on each shard should be identical to tests_to_run, without duplicates.
If check_exit_0, .
@@ -330,7 +330,7 @@ class GTestFilterUnitTest(gtest_test_utils.TestCase):
def RunAndVerifyAllowingDisabled(self, gtest_filter, tests_to_run):
"""Checks that the binary runs correct set of tests for the given filter.
- Runs gtest_filter_unittest_ with the given filter, and enables
+ Runs googletest-filter-unittest_ with the given filter, and enables
disabled tests. Verifies that the right set of tests were run.
Args:
diff --git a/googletest/test/gtest_filter_unittest_.cc b/googletest/test/googletest-filter-unittest_.cc
index e74a7a3..e74a7a3 100644
--- a/googletest/test/gtest_filter_unittest_.cc
+++ b/googletest/test/googletest-filter-unittest_.cc
diff --git a/googletest/test/gtest_json_outfiles_test.py b/googletest/test/googletest-json-outfiles-test.py
index 46010d8..46010d8 100644
--- a/googletest/test/gtest_json_outfiles_test.py
+++ b/googletest/test/googletest-json-outfiles-test.py
diff --git a/googletest/test/gtest_json_output_unittest.py b/googletest/test/googletest-json-output-unittest.py
index 12047c4..57dcd5f 100644
--- a/googletest/test/gtest_json_output_unittest.py
+++ b/googletest/test/googletest-json-output-unittest.py
@@ -46,7 +46,10 @@ GTEST_OUTPUT_FLAG = '--gtest_output'
GTEST_DEFAULT_OUTPUT_FILE = 'test_detail.json'
GTEST_PROGRAM_NAME = 'gtest_xml_output_unittest_'
-SUPPORTS_STACK_TRACES = False
+# The flag indicating stacktraces are not supported
+NO_STACKTRACE_SUPPORT_FLAG = '--no_stacktrace_support'
+
+SUPPORTS_STACK_TRACES = NO_STACKTRACE_SUPPORT_FLAG not in sys.argv
if SUPPORTS_STACK_TRACES:
STACK_TRACE_TEMPLATE = '\nStack trace:\n*'
@@ -607,5 +610,9 @@ class GTestJsonOutputUnitTest(gtest_test_utils.TestCase):
if __name__ == '__main__':
+ if NO_STACKTRACE_SUPPORT_FLAG in sys.argv:
+ # unittest.main() can't handle unknown flags
+ sys.argv.remove(NO_STACKTRACE_SUPPORT_FLAG)
+
os.environ['GTEST_STACK_TRACE_DEPTH'] = '1'
gtest_test_utils.Main()
diff --git a/googletest/test/gtest-linked_ptr_test.cc b/googletest/test/googletest-linked-ptr-test.cc
index 6fcf512..6fcf512 100644
--- a/googletest/test/gtest-linked_ptr_test.cc
+++ b/googletest/test/googletest-linked-ptr-test.cc
diff --git a/googletest/test/gtest_list_tests_unittest.py b/googletest/test/googletest-list-tests-unittest.py
index ebf1a3c..a38073a 100755
--- a/googletest/test/gtest_list_tests_unittest.py
+++ b/googletest/test/googletest-list-tests-unittest.py
@@ -33,7 +33,7 @@
A user can ask Google Test to list all tests by specifying the
--gtest_list_tests flag. This script tests such functionality
-by invoking gtest_list_tests_unittest_ (a program written with
+by invoking googletest-list-tests-unittest_ (a program written with
Google Test) the command line flags.
"""
@@ -47,10 +47,10 @@ import gtest_test_utils
# The command line flag for enabling/disabling listing all tests.
LIST_TESTS_FLAG = 'gtest_list_tests'
-# Path to the gtest_list_tests_unittest_ program.
-EXE_PATH = gtest_test_utils.GetTestExecutablePath('gtest_list_tests_unittest_')
+# Path to the googletest-list-tests-unittest_ program.
+EXE_PATH = gtest_test_utils.GetTestExecutablePath('googletest-list-tests-unittest_')
-# The expected output when running gtest_list_tests_unittest_ with
+# The expected output when running googletest-list-tests-unittest_ with
# --gtest_list_tests
EXPECTED_OUTPUT_NO_FILTER_RE = re.compile(r"""FooDeathTest\.
Test1
@@ -94,7 +94,7 @@ MyInstantiation/ValueParamTest\.
TestB/2 # GetParam\(\) = a very\\nlo{241}\.\.\.
""")
-# The expected output when running gtest_list_tests_unittest_ with
+# The expected output when running googletest-list-tests-unittest_ with
# --gtest_list_tests and --gtest_filter=Foo*.
EXPECTED_OUTPUT_FILTER_FOO_RE = re.compile(r"""FooDeathTest\.
Test1
@@ -114,7 +114,7 @@ FooTest\.
def Run(args):
- """Runs gtest_list_tests_unittest_ and returns the list of tests printed."""
+ """Runs googletest-list-tests-unittest_ and returns the list of tests printed."""
return gtest_test_utils.Subprocess([EXE_PATH] + args,
capture_stderr=False).output
@@ -127,7 +127,7 @@ class GTestListTestsUnitTest(gtest_test_utils.TestCase):
"""Tests using the --gtest_list_tests flag to list all tests."""
def RunAndVerify(self, flag_value, expected_output_re, other_flag):
- """Runs gtest_list_tests_unittest_ and verifies that it prints
+ """Runs googletest-list-tests-unittest_ and verifies that it prints
the correct tests.
Args:
diff --git a/googletest/test/gtest_list_tests_unittest_.cc b/googletest/test/googletest-list-tests-unittest_.cc
index 907c176..907c176 100644
--- a/googletest/test/gtest_list_tests_unittest_.cc
+++ b/googletest/test/googletest-list-tests-unittest_.cc
diff --git a/googletest/test/gtest-listener_test.cc b/googletest/test/googletest-listener-test.cc
index 639529c..639529c 100644
--- a/googletest/test/gtest-listener_test.cc
+++ b/googletest/test/googletest-listener-test.cc
diff --git a/googletest/test/gtest-message_test.cc b/googletest/test/googletest-message-test.cc
index 175238e..175238e 100644
--- a/googletest/test/gtest-message_test.cc
+++ b/googletest/test/googletest-message-test.cc
diff --git a/googletest/test/gtest-options_test.cc b/googletest/test/googletest-options-test.cc
index 10cb1df..e4c0d04 100644
--- a/googletest/test/gtest-options_test.cc
+++ b/googletest/test/googletest-options-test.cc
@@ -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";
diff --git a/googletest/test/gtest_output_test_golden_lin.txt b/googletest/test/googletest-output-test-golden-lin.txt
index 02a77a8..b0c5189 100644
--- a/googletest/test/gtest_output_test_golden_lin.txt
+++ b/googletest/test/googletest-output-test-golden-lin.txt
@@ -1,12 +1,12 @@
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)
diff --git a/googletest/test/gtest_output_test.py b/googletest/test/googletest-output-test.py
index 63763b9..c1c3652 100755
--- a/googletest/test/gtest_output_test.py
+++ b/googletest/test/googletest-output-test.py
@@ -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)
diff --git a/googletest/test/gtest_output_test_.cc b/googletest/test/googletest-output-test_.cc
index 9ae9dc6..29fc993 100644
--- a/googletest/test/gtest_output_test_.cc
+++ b/googletest/test/googletest-output-test_.cc
@@ -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.
//
diff --git a/googletest/test/googletest-param-test-invalid-name1-test.py b/googletest/test/googletest-param-test-invalid-name1-test.py
new file mode 100644
index 0000000..63be043
--- /dev/null
+++ b/googletest/test/googletest-param-test-invalid-name1-test.py
@@ -0,0 +1,72 @@
+#!/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()
diff --git a/googletest/test/googletest-param-test-invalid-name1-test_.cc b/googletest/test/googletest-param-test-invalid-name1-test_.cc
new file mode 100644
index 0000000..68dd470
--- /dev/null
+++ b/googletest/test/googletest-param-test-invalid-name1-test_.cc
@@ -0,0 +1,51 @@
+// 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();
+}
+
diff --git a/googletest/test/googletest-param-test-invalid-name2-test.py b/googletest/test/googletest-param-test-invalid-name2-test.py
new file mode 100644
index 0000000..b1a80c1
--- /dev/null
+++ b/googletest/test/googletest-param-test-invalid-name2-test.py
@@ -0,0 +1,71 @@
+#!/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()
diff --git a/googletest/test/googletest-param-test-invalid-name2-test_.cc b/googletest/test/googletest-param-test-invalid-name2-test_.cc
new file mode 100644
index 0000000..9a8ec4e
--- /dev/null
+++ b/googletest/test/googletest-param-test-invalid-name2-test_.cc
@@ -0,0 +1,56 @@
+// 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();
+}
+
+
diff --git a/googletest/test/gtest-param-test_test.cc b/googletest/test/googletest-param-test-test.cc
index adc4d1b..893b132 100644
--- a/googletest/test/gtest-param-test_test.cc
+++ b/googletest/test/googletest-param-test-test.cc
@@ -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;
diff --git a/googletest/test/gtest-param-test_test.h b/googletest/test/googletest-param-test-test.h
index ea1e884..ea1e884 100644
--- a/googletest/test/gtest-param-test_test.h
+++ b/googletest/test/googletest-param-test-test.h
diff --git a/googletest/test/gtest-param-test2_test.cc b/googletest/test/googletest-param-test2-test.cc
index c3b2d18..c0a908b 100644
--- a/googletest/test/gtest-param-test2_test.cc
+++ b/googletest/test/googletest-param-test2-test.cc
@@ -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,
diff --git a/googletest/test/gtest-port_test.cc b/googletest/test/googletest-port-test.cc
index 3801e5e..15a629f 100644
--- a/googletest/test/gtest-port_test.cc
+++ b/googletest/test/googletest-port-test.cc
@@ -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.*";
diff --git a/googletest/test/gtest-printers_test.cc b/googletest/test/googletest-printers-test.cc
index 49b3bd4..49b3bd4 100644
--- a/googletest/test/gtest-printers_test.cc
+++ b/googletest/test/googletest-printers-test.cc
diff --git a/googletest/test/gtest_shuffle_test.py b/googletest/test/googletest-shuffle-test.py
index 30d0303..5ae9655 100755
--- a/googletest/test/gtest_shuffle_test.py
+++ b/googletest/test/googletest-shuffle-test.py
@@ -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
diff --git a/googletest/test/gtest_shuffle_test_.cc b/googletest/test/googletest-shuffle-test_.cc
index 6fb441b..6fb441b 100644
--- a/googletest/test/gtest_shuffle_test_.cc
+++ b/googletest/test/googletest-shuffle-test_.cc
diff --git a/googletest/test/gtest-test-part_test.cc b/googletest/test/googletest-test-part-test.cc
index ca8ba93..ca8ba93 100644
--- a/googletest/test/gtest-test-part_test.cc
+++ b/googletest/test/googletest-test-part-test.cc
diff --git a/googletest/test/googletest-test2_test.cc b/googletest/test/googletest-test2_test.cc
new file mode 100644
index 0000000..e50c259
--- /dev/null
+++ b/googletest/test/googletest-test2_test.cc
@@ -0,0 +1,61 @@
+// 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));
+
diff --git a/googletest/test/gtest_throw_on_failure_test.py b/googletest/test/googletest-throw-on-failure-test.py
index 5678ffe..26ba32b 100755
--- a/googletest/test/gtest_throw_on_failure_test.py
+++ b/googletest/test/googletest-throw-on-failure-test.py
@@ -31,7 +31,7 @@
"""Tests Google Test's throw-on-failure mode with exceptions disabled.
-This script invokes gtest_throw_on_failure_test_ (a program written with
+This script invokes googletest-throw-on-failure-test_ (a program written with
Google Test) with different environments and command line flags.
"""
@@ -46,10 +46,10 @@ import gtest_test_utils
# The command line flag for enabling/disabling the throw-on-failure mode.
THROW_ON_FAILURE = 'gtest_throw_on_failure'
-# Path to the gtest_throw_on_failure_test_ program, compiled with
+# Path to the googletest-throw-on-failure-test_ program, compiled with
# exceptions disabled.
EXE_PATH = gtest_test_utils.GetTestExecutablePath(
- 'gtest_throw_on_failure_test_')
+ 'googletest-throw-on-failure-test_')
# Utilities.
@@ -76,12 +76,12 @@ def Run(command):
# The tests. TODO(wan@google.com): refactor the class to share common
-# logic with code in gtest_break_on_failure_unittest.py.
+# logic with code in googletest-break-on-failure-unittest.py.
class ThrowOnFailureTest(gtest_test_utils.TestCase):
"""Tests the throw-on-failure mode."""
def RunAndVerify(self, env_var_value, flag_value, should_fail):
- """Runs gtest_throw_on_failure_test_ and verifies that it does
+ """Runs googletest-throw-on-failure-test_ and verifies that it does
(or does not) exit with a non-zero code.
Args:
diff --git a/googletest/test/gtest_throw_on_failure_test_.cc b/googletest/test/googletest-throw-on-failure-test_.cc
index 2b88fe3..0617c27 100644
--- a/googletest/test/gtest_throw_on_failure_test_.cc
+++ b/googletest/test/googletest-throw-on-failure-test_.cc
@@ -32,7 +32,7 @@
// Tests Google Test's throw-on-failure mode with exceptions disabled.
//
// This program must be compiled with exceptions disabled. It will be
-// invoked by gtest_throw_on_failure_test.py, and is expected to exit
+// invoked by googletest-throw-on-failure-test.py, and is expected to exit
// with non-zero in the throw-on-failure mode or 0 otherwise.
#include "gtest/gtest.h"
diff --git a/googletest/test/gtest-tuple_test.cc b/googletest/test/googletest-tuple-test.cc
index bfaa3e0..bfaa3e0 100644
--- a/googletest/test/gtest-tuple_test.cc
+++ b/googletest/test/googletest-tuple-test.cc
diff --git a/googletest/test/gtest_uninitialized_test.py b/googletest/test/googletest-uninitialized-test.py
index ae91f2a..e3df5fa 100755
--- a/googletest/test/gtest_uninitialized_test.py
+++ b/googletest/test/googletest-uninitialized-test.py
@@ -35,7 +35,7 @@ __author__ = 'wan@google.com (Zhanyong Wan)'
import gtest_test_utils
-COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_uninitialized_test_')
+COMMAND = gtest_test_utils.GetTestExecutablePath('googletest-uninitialized-test_')
def Assert(condition):
diff --git a/googletest/test/gtest_uninitialized_test_.cc b/googletest/test/googletest-uninitialized-test_.cc
index 2ba0e8b..2ba0e8b 100644
--- a/googletest/test/gtest_uninitialized_test_.cc
+++ b/googletest/test/googletest-uninitialized-test_.cc
diff --git a/googletest/test/gtest_all_test.cc b/googletest/test/gtest_all_test.cc
index e6c1b01..656066d 100644
--- a/googletest/test/gtest_all_test.cc
+++ b/googletest/test/gtest_all_test.cc
@@ -33,14 +33,14 @@
//
// Sometimes it's desirable to build most of Google Test's own tests
// by compiling a single file. This file serves this purpose.
-#include "gtest-filepath_test.cc"
-#include "gtest-linked_ptr_test.cc"
-#include "gtest-message_test.cc"
-#include "gtest-options_test.cc"
-#include "gtest-port_test.cc"
+#include "googletest-filepath-test.cc"
+#include "googletest-linked-ptr-test.cc"
+#include "googletest-message-test.cc"
+#include "googletest-options-test.cc"
+#include "googletest-port-test.cc"
#include "gtest_pred_impl_unittest.cc"
#include "gtest_prod_test.cc"
-#include "gtest-test-part_test.cc"
+#include "googletest-test-part-test.cc"
#include "gtest-typed-test_test.cc"
#include "gtest-typed-test2_test.cc"
#include "gtest_unittest.cc"
diff --git a/googletest/test/gtest_test_macro_stack_footprint_test.cc b/googletest/test/gtest_test_macro_stack_footprint_test.cc
new file mode 100644
index 0000000..48958b8
--- /dev/null
+++ b/googletest/test/gtest_test_macro_stack_footprint_test.cc
@@ -0,0 +1,90 @@
+// Copyright 2013, 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: wan@google.com (Zhanyong Wan)
+//
+// Each TEST() expands to some static registration logic. GCC puts all
+// such static initialization logic for a translation unit in a common,
+// internal function. Since Google's build system restricts how much
+// stack space a function can use, there's a limit on how many TEST()s
+// one can put in a single C++ test file. This test ensures that a large
+// number of TEST()s can be defined in the same translation unit.
+
+#include "gtest/gtest.h"
+
+// This macro defines 10 dummy tests.
+#define TEN_TESTS_(test_case_name) \
+ TEST(test_case_name, T0) {} \
+ TEST(test_case_name, T1) {} \
+ TEST(test_case_name, T2) {} \
+ TEST(test_case_name, T3) {} \
+ TEST(test_case_name, T4) {} \
+ TEST(test_case_name, T5) {} \
+ TEST(test_case_name, T6) {} \
+ TEST(test_case_name, T7) {} \
+ TEST(test_case_name, T8) {} \
+ TEST(test_case_name, T9) {}
+
+// This macro defines 100 dummy tests.
+#define HUNDRED_TESTS_(test_case_name_prefix) \
+ TEN_TESTS_(test_case_name_prefix ## 0) \
+ TEN_TESTS_(test_case_name_prefix ## 1) \
+ TEN_TESTS_(test_case_name_prefix ## 2) \
+ TEN_TESTS_(test_case_name_prefix ## 3) \
+ TEN_TESTS_(test_case_name_prefix ## 4) \
+ TEN_TESTS_(test_case_name_prefix ## 5) \
+ TEN_TESTS_(test_case_name_prefix ## 6) \
+ TEN_TESTS_(test_case_name_prefix ## 7) \
+ TEN_TESTS_(test_case_name_prefix ## 8) \
+ TEN_TESTS_(test_case_name_prefix ## 9)
+
+// This macro defines 1000 dummy tests.
+#define THOUSAND_TESTS_(test_case_name_prefix) \
+ HUNDRED_TESTS_(test_case_name_prefix ## 0) \
+ HUNDRED_TESTS_(test_case_name_prefix ## 1) \
+ HUNDRED_TESTS_(test_case_name_prefix ## 2) \
+ HUNDRED_TESTS_(test_case_name_prefix ## 3) \
+ HUNDRED_TESTS_(test_case_name_prefix ## 4) \
+ HUNDRED_TESTS_(test_case_name_prefix ## 5) \
+ HUNDRED_TESTS_(test_case_name_prefix ## 6) \
+ HUNDRED_TESTS_(test_case_name_prefix ## 7) \
+ HUNDRED_TESTS_(test_case_name_prefix ## 8) \
+ HUNDRED_TESTS_(test_case_name_prefix ## 9)
+
+// Ensures that we can define 1000 TEST()s in the same translation
+// unit.
+THOUSAND_TESTS_(T)
+
+int main(int argc, char **argv) {
+ testing::InitGoogleTest(&argc, argv);
+
+ // We don't actually need to run the dummy tests - the purpose is to
+ // ensure that they compile.
+ return 0;
+}
diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc
index c5987ae..033bc3a 100644
--- a/googletest/test/gtest_unittest.cc
+++ b/googletest/test/gtest_unittest.cc
@@ -4689,7 +4689,7 @@ TEST(MacroTest, ADD_FAILURE_AT) {
// Unfortunately, we cannot verify that the failure message contains
// the right file path and line number the same way, as
// EXPECT_NONFATAL_FAILURE() doesn't get to see the file path and
- // line number. Instead, we do that in gtest_output_test_.cc.
+ // line number. Instead, we do that in googletest-output-test_.cc.
}
// Tests FAIL.
diff --git a/googletest/xcode/Config/DebugProject.xcconfig b/googletest/xcode/Config/DebugProject.xcconfig
index 3d68157..645701e 100644
--- a/googletest/xcode/Config/DebugProject.xcconfig
+++ b/googletest/xcode/Config/DebugProject.xcconfig
@@ -5,7 +5,7 @@
// examples. It is set in the "Based On:" dropdown in the "Project" info
// dialog.
// This file is based on the Xcode Configuration files in:
-// http://code.google.com/p/google-toolbox-for-mac/
+// https://github.com/google/google-toolbox-for-mac
//
#include "General.xcconfig"
diff --git a/googletest/xcode/Config/FrameworkTarget.xcconfig b/googletest/xcode/Config/FrameworkTarget.xcconfig
index 357b1c8..77081fb 100644
--- a/googletest/xcode/Config/FrameworkTarget.xcconfig
+++ b/googletest/xcode/Config/FrameworkTarget.xcconfig
@@ -4,7 +4,7 @@
// These are Framework target settings for the gtest framework and examples. It
// is set in the "Based On:" dropdown in the "Target" info dialog.
// This file is based on the Xcode Configuration files in:
-// http://code.google.com/p/google-toolbox-for-mac/
+// https://github.com/google/google-toolbox-for-mac
//
// Dynamic libs need to be position independent
diff --git a/googletest/xcode/Config/General.xcconfig b/googletest/xcode/Config/General.xcconfig
index f23e322..1aba486 100644
--- a/googletest/xcode/Config/General.xcconfig
+++ b/googletest/xcode/Config/General.xcconfig
@@ -4,7 +4,7 @@
// These are General configuration settings for the gtest framework and
// examples.
// This file is based on the Xcode Configuration files in:
-// http://code.google.com/p/google-toolbox-for-mac/
+// https://github.com/google/google-toolbox-for-mac
//
// Build for PPC and Intel, 32- and 64-bit
diff --git a/googletest/xcode/Config/ReleaseProject.xcconfig b/googletest/xcode/Config/ReleaseProject.xcconfig
index 5349f0a..df9a38f 100644
--- a/googletest/xcode/Config/ReleaseProject.xcconfig
+++ b/googletest/xcode/Config/ReleaseProject.xcconfig
@@ -5,7 +5,7 @@
// and examples. It is set in the "Based On:" dropdown in the "Project" info
// dialog.
// This file is based on the Xcode Configuration files in:
-// http://code.google.com/p/google-toolbox-for-mac/
+// https://github.com/google/google-toolbox-for-mac
//
#include "General.xcconfig"
diff --git a/googletest/xcode/Config/StaticLibraryTarget.xcconfig b/googletest/xcode/Config/StaticLibraryTarget.xcconfig
index 3922fa5..d2424fe 100644
--- a/googletest/xcode/Config/StaticLibraryTarget.xcconfig
+++ b/googletest/xcode/Config/StaticLibraryTarget.xcconfig
@@ -4,7 +4,7 @@
// These are static library target settings for libgtest.a. It
// is set in the "Based On:" dropdown in the "Target" info dialog.
// This file is based on the Xcode Configuration files in:
-// http://code.google.com/p/google-toolbox-for-mac/
+// https://github.com/google/google-toolbox-for-mac
//
// Static libs can be included in bundles so make them position independent