summaryrefslogtreecommitdiffstats
path: root/googletest/test
diff options
context:
space:
mode:
authorBernhard Bauer <bauerb@chromium.org>2016-02-10 17:41:18 (GMT)
committerBernhard Bauer <bauerb@chromium.org>2017-09-04 14:46:31 (GMT)
commit86e5f0083e5217e37eb94a391a2f7349bcef4660 (patch)
tree3b77d952ac6049abd5a7fdcf71cefe96f8e44b42 /googletest/test
parente7c9e80e63e5cdcd3252ed81c9d3dbf0a7fb6841 (diff)
downloadgoogletest-86e5f0083e5217e37eb94a391a2f7349bcef4660.zip
googletest-86e5f0083e5217e37eb94a391a2f7349bcef4660.tar.gz
googletest-86e5f0083e5217e37eb94a391a2f7349bcef4660.tar.bz2
Add a non-parametrized test.
Diffstat (limited to 'googletest/test')
-rw-r--r--googletest/test/gtest-param-test_test.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/googletest/test/gtest-param-test_test.cc b/googletest/test/gtest-param-test_test.cc
index a6ecef6..f6f5955 100644
--- a/googletest/test/gtest-param-test_test.cc
+++ b/googletest/test/gtest-param-test_test.cc
@@ -825,6 +825,18 @@ TEST_P(PREFIX_WITH_MACRO(NamingTest), PREFIX_WITH_FOO(SomeTestName)) {
INSTANTIATE_TEST_CASE_P(FortyTwo, MacroNamingTest, Values(42));
+// Tests the same thing for non-parametrized tests.
+class MacroNamingTestNonParametrized : public ::testing::Test {};
+
+TEST_F(PREFIX_WITH_MACRO(NamingTestNonParametrized),
+ PREFIX_WITH_FOO(SomeTestName)) {
+ const ::testing::TestInfo* const test_info =
+ ::testing::UnitTest::GetInstance()->current_test_info();
+
+ EXPECT_STREQ("MacroNamingTestNonParametrized", test_info->test_case_name());
+ EXPECT_STREQ("FOO_SomeTestName", test_info->name());
+}
+
// Tests that user supplied custom parameter names are working correctly.
// Runs the test with a builtin helper method which uses PrintToString,
// as well as a custom function and custom functor to ensure all possible