This allows doing things like TEST_P(TestFixture, MAYBE(TestName))
for nicer conditional test disabling.
Upstream of cr/188748737.
Tested:
Added unit tests MacroNamingTest and MacroNamingTestNonParametrized.
This change allows emitting output in JSON format in addition to the
already supported XML format. The implementation as well as the file
structure is intentionally modelled after the XML one.
Google Test has recently (02/09/2018) switched the default death test
style from "fast" to "threadsafe" in
ec7faa943d
Threadsafe death tests have been used internally for a while, and are
proven to be a better default.
However, adopting this better default can be challenging for large
projects with a significant investment in custom infrastructure built on
top of Google Test. The same custom infrastructure can make it difficult
for large projects to switch back to the old default by passing in
--gtest_death_test_style=fast.
For the reasons above, the default switch is considered too disruptive,
and this CL reverts it. This CL also introduces the
GTEST_DEFAULT_DEATH_TEST_STYLE preprocesor macro, which replaces the
hard-coded default. The macro can be defined in
gtest/internal/custom/gtest-port.h by projects that are ready to migrate
to thread-safe death tests.
CMAKE_DEBUG_POSTFIX is a global configuration parameter, and
changing it pollutes the configuration space for other projects
that enclose this project.
DEBUG_POSTFIX is better to use since it is a target-specific poperty.
Fixes#1334Fixes#1268
As of recently, Google Test fails to compile with the warning below when
used in projects with strict warning settings.
googletest/src/gtest-death-test.cc:1004:13: error: unused function 'StackGrowsDown' [-Werror,-Wunused-function]