diff options
| author | Martin Hořeňovský | 2021-05-28 20:49:05 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2021-06-01 00:17:13 +0200 |
| commit | aee31d0620717f3e0f6bde650f4d0e3a5481819c (patch) | |
| tree | aaedb37a723c7e615ed0ce1f84c4a9a9e43682b2 /src/catch2 | |
| parent | c9371865d4e08d6e9907597ca827c295235c0594 (diff) | |
| download | catch3-aee31d0620717f3e0f6bde650f4d0e3a5481819c.tar.gz | |
Disallow empty tags in test case specification
Diffstat (limited to 'src/catch2')
| -rw-r--r-- | src/catch2/catch_test_case_info.cpp | 1 |
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 |