Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-05-28 20:49:05 +0200
committerMartin Hořeňovský2021-06-01 00:17:13 +0200
commitaee31d0620717f3e0f6bde650f4d0e3a5481819c (patch)
treeaaedb37a723c7e615ed0ce1f84c4a9a9e43682b2 /src
parentc9371865d4e08d6e9907597ca827c295235c0594 (diff)
downloadcatch3-aee31d0620717f3e0f6bde650f4d0e3a5481819c.tar.gz
Disallow empty tags in test case specification
Diffstat (limited to 'src')
-rw-r--r--src/catch2/catch_test_case_info.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/catch2/catch_test_case_info.cpp b/src/catch2/catch_test_case_info.cpp
index e8029e9c..800c94fa 100644
--- a/src/catch2/catch_test_case_info.cpp
+++ b/src/catch2/catch_test_case_info.cpp
@@ -146,6 +146,7 @@ namespace Catch {
// it over to backing storage and actually reference the
// backing storage in the saved tags
StringRef tagStr = originalTags.substr(tagStart+1, tagEnd - tagStart - 1);
+ CATCH_ENFORCE(!tagStr.empty(), "Empty tags are not allowed");
enforceNotReservedTag(tagStr, lineInfo);
properties |= parseSpecialTag(tagStr);
// When copying a tag to the backing storage, we need to