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

summaryrefslogtreecommitdiffhomepage
path: root/include/internal
diff options
context:
space:
mode:
authorMartin Hořeňovský2019-11-03 22:50:53 +0100
committerMartin Hořeňovský2019-11-03 23:13:25 +0100
commitae10e4ef728b144e296841377b8b37191520bb53 (patch)
treebc2b3cc7670fde2a5d093828a203450f4316b123 /include/internal
parent2c6ace04a74458003506befea9291f5e60078bae (diff)
downloadcatch3-ae10e4ef728b144e296841377b8b37191520bb53.tar.gz
Sections no longer save their description
Users can still write a description for their sections, but it will no longer be saved as part of the `SectionInfo` struct. This ability has also been added to the documentation. Closes #1319
Diffstat (limited to 'include/internal')
-rw-r--r--include/internal/catch_section_info.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/internal/catch_section_info.h b/include/internal/catch_section_info.h
index 9cf792e8..7215c744 100644
--- a/include/internal/catch_section_info.h
+++ b/include/internal/catch_section_info.h
@@ -9,6 +9,7 @@
#define TWOBLUECUBES_CATCH_SECTION_INFO_H_INCLUDED
#include "catch_common.h"
+#include "catch_stringref.h"
#include "catch_totals.h"
#include <string>
@@ -20,14 +21,15 @@ namespace Catch {
( SourceLineInfo const& _lineInfo,
std::string const& _name );
- // Deprecated
+ // The last argument is ignored, so that people can write
+ // SECTION("ShortName", "Proper description that is long") and
+ // still use the `-c` flag comfortably.
SectionInfo
( SourceLineInfo const& _lineInfo,
std::string const& _name,
- std::string const& ) : SectionInfo( _lineInfo, _name ) {}
+ const char* const ) : SectionInfo( _lineInfo, _name ) {}
std::string name;
- std::string description; // !Deprecated: this will always be empty
SourceLineInfo lineInfo;
};