mirror of https://github.com/google/googletest.git
Merge 7754b4042f into 8ecdd89c69
This commit is contained in:
commit
37e768d7b0
|
|
@ -655,14 +655,17 @@ class [[nodiscard]] ParameterizedTestSuiteInfo
|
|||
int line;
|
||||
};
|
||||
typedef ::std::vector<InstantiationInfo> InstantiationContainer;
|
||||
|
||||
|
||||
static bool IsValidParamName(const std::string& name) {
|
||||
static constexpr validParamChars = "_-:/";
|
||||
|
||||
// Check for empty string
|
||||
if (name.empty()) return false;
|
||||
|
||||
// Check for invalid characters
|
||||
for (std::string::size_type index = 0; index < name.size(); ++index) {
|
||||
if (!IsAlNum(name[index]) && name[index] != '_') return false;
|
||||
if (!isalnum(name[index]) && validParamChars.find(name[index]) == std::string::npos)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue