summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/gtest-param-test.h
diff options
context:
space:
mode:
authorBernhard Bauer <bauerb@chromium.org>2018-03-12 13:51:04 (GMT)
committerBernhard Bauer <bauerb@chromium.org>2018-03-12 18:14:06 (GMT)
commit7b70413e0ca57b3e48d7655f342122f159f52b31 (patch)
treee9339fcd1ff6deb4e9b5f76b11012a4941984ddd /googletest/include/gtest/gtest-param-test.h
parent7a2563a514563145d82f02b5b350cba1af33af67 (diff)
downloadgoogletest-7b70413e0ca57b3e48d7655f342122f159f52b31.zip
googletest-7b70413e0ca57b3e48d7655f342122f159f52b31.tar.gz
googletest-7b70413e0ca57b3e48d7655f342122f159f52b31.tar.bz2
Allow macros inside of parametrized test names.
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.
Diffstat (limited to 'googletest/include/gtest/gtest-param-test.h')
-rw-r--r--googletest/include/gtest/gtest-param-test.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/googletest/include/gtest/gtest-param-test.h b/googletest/include/gtest/gtest-param-test.h
index 19fae39..e155763 100644
--- a/googletest/include/gtest/gtest-param-test.h
+++ b/googletest/include/gtest/gtest-param-test.h
@@ -1371,8 +1371,6 @@ internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
}
# endif // GTEST_HAS_COMBINE
-
-
# define TEST_P(test_case_name, test_name) \
class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
: public test_case_name { \
@@ -1386,8 +1384,8 @@ internal::CartesianProductHolder10<Generator1, Generator2, Generator3,
#test_case_name, \
::testing::internal::CodeLocation(\
__FILE__, __LINE__))->AddTestPattern(\
- #test_case_name, \
- #test_name, \
+ GTEST_STRINGIFY_(test_case_name), \
+ GTEST_STRINGIFY_(test_name), \
new ::testing::internal::TestMetaFactory< \
GTEST_TEST_CLASS_NAME_(\
test_case_name, test_name)>()); \