summaryrefslogtreecommitdiffstats
path: root/googletest
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2023-08-17 19:55:43 (GMT)
committerCopybara-Service <copybara-worker@google.com>2023-08-17 19:56:29 (GMT)
commitf42da0e4431a14260946323bff4d856f20973b2c (patch)
tree282b328155ab4080b1f6fa37f35eaef947440106 /googletest
parent987e225614755fec7253aa95bf959c09e0d380d7 (diff)
downloadgoogletest-f42da0e4431a14260946323bff4d856f20973b2c.zip
googletest-f42da0e4431a14260946323bff4d856f20973b2c.tar.gz
googletest-f42da0e4431a14260946323bff4d856f20973b2c.tar.bz2
Improve error message for invalid parameterized test names.
PiperOrigin-RevId: 557910190 Change-Id: Ia965a6c96e4cc5997d8af2611abc62c42e81653e
Diffstat (limited to 'googletest')
-rw-r--r--googletest/include/gtest/internal/gtest-param-util.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/googletest/include/gtest/internal/gtest-param-util.h b/googletest/include/gtest/internal/gtest-param-util.h
index 6a81c37..dd39e98 100644
--- a/googletest/include/gtest/internal/gtest-param-util.h
+++ b/googletest/include/gtest/internal/gtest-param-util.h
@@ -584,7 +584,9 @@ class ParameterizedTestSuiteInfo : public ParameterizedTestSuiteInfoBase {
GTEST_CHECK_(IsValidParamName(param_name))
<< "Parameterized test name '" << param_name
- << "' is invalid, in " << file << " line " << line << std::endl;
+ << "' is invalid (contains spaces, dashes, underscores, or "
+ "non-alphanumeric characters), in "
+ << file << " line " << line << "" << std::endl;
GTEST_CHECK_(test_param_names.count(param_name) == 0)
<< "Duplicate parameterized test name '" << param_name << "', in "