Add more tests for exclude validation

This commit is contained in:
Patrick Niklaus
2017-08-18 21:42:05 +00:00
committed by Patrick Niklaus
parent 0c838fb60c
commit 27324d0270
7 changed files with 55 additions and 4 deletions
+6
View File
@@ -80,6 +80,12 @@ void SetClassNames(const std::vector<std::string> &class_names,
// this makes sure we can correctly validate unkown class names later
for (const auto &name : class_names)
{
if (!isValidClassName(name))
{
throw util::exception("Invalid class name " + name +
" only [a-Z0-9] allowed.");
}
auto iter = classes_map.find(name);
if (iter == classes_map.end())
{