diff options
| author | Martin Hořeňovský | 2019-11-03 22:50:53 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2019-11-03 23:13:25 +0100 |
| commit | ae10e4ef728b144e296841377b8b37191520bb53 (patch) | |
| tree | bc2b3cc7670fde2a5d093828a203450f4316b123 /docs | |
| parent | 2c6ace04a74458003506befea9291f5e60078bae (diff) | |
| download | catch3-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 'docs')
| -rw-r--r-- | docs/release-notes.md | 3 | ||||
| -rw-r--r-- | docs/test-cases-and-sections.md | 12 |
2 files changed, 13 insertions, 2 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md index c9bc2f70..3939e5af 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -46,6 +46,9 @@ * Previously, a `TEST_CASE("A", "[.foo]")` would be included by asking for `~[bar]`. * `PredicateMatcher` is no longer type erased. * This means that the type of the provided predicate is part of the `PredicateMatcher`'s type +* `SectionInfo` no longer contains section description as a member (#1319) + * You can still write `SECTION("ShortName", "Long and wordy description")`, but the description is thrown away + * The description type now must be a `const char*` or implicitly convertible to it ### Fixes diff --git a/docs/test-cases-and-sections.md b/docs/test-cases-and-sections.md index 53f9e150..c30f9f50 100644 --- a/docs/test-cases-and-sections.md +++ b/docs/test-cases-and-sections.md @@ -15,9 +15,17 @@ Instead Catch provides a powerful mechanism for nesting test case sections withi Test cases and sections are very easy to use in practice: * **TEST_CASE(** _test name_ \[, _tags_ \] **)** -* **SECTION(** _section name_ **)** +* **SECTION(** _section name_, \[, _section description_ \] **)** -_test name_ and _section name_ are free form, quoted, strings. The optional _tags_ argument is a quoted string containing one or more tags enclosed in square brackets. Tags are discussed below. Test names must be unique within the Catch executable. + +_test name_ and _section name_ are free form, quoted, strings. +The optional _tags_ argument is a quoted string containing one or more +tags enclosed in square brackets, and are discussed below. +_section description_ can be used to provide long form description +of a section while keeping the _section name_ short for use with the +[`-c` command line parameter](command-line.md#specify-the-section-to-run). + +**Test names must be unique within the Catch executable.** For examples see the [Tutorial](tutorial.md#top) |