Merge 7754b4042f6d08026617dea21a4d476872aacf2f into d72f9c8aea6817cdf1ca0ac10887f328de7f3da2

This commit is contained in:
Derek Brown 2026-04-01 09:00:22 +08:00 committed by GitHub
commit a65fcb96de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;