Remove trailing whitespace from test-cases-and-sections.md

This commit is contained in:
Martin Hořeňovský 2021-03-23 13:02:20 +01:00
parent 9f44bd57f1
commit 4b5812e932
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A

View File

@ -90,25 +90,25 @@ This macro maps onto ```TEST_CASE``` and works in the same way, except that the
* **WHEN(** _something_ **)** * **WHEN(** _something_ **)**
* **THEN(** _something_ **)** * **THEN(** _something_ **)**
These macros map onto ```SECTION```s except that the section names are the _something_ texts prefixed by These macros map onto ```SECTION```s except that the section names are the _something_ texts prefixed by
"given: ", "when: " or "then: " respectively. These macros also map onto the AAA or A<sup>3</sup> test pattern "given: ", "when: " or "then: " respectively. These macros also map onto the AAA or A<sup>3</sup> test pattern
(standing either for [Assemble-Activate-Assert](http://wiki.c2.com/?AssembleActivateAssert) or (standing either for [Assemble-Activate-Assert](http://wiki.c2.com/?AssembleActivateAssert) or
[Arrange-Act-Assert](http://wiki.c2.com/?ArrangeActAssert)), and in this context, the macros provide both code [Arrange-Act-Assert](http://wiki.c2.com/?ArrangeActAssert)), and in this context, the macros provide both code
documentation and reporting of these parts of a test case without the need for extra comments or code to do so. documentation and reporting of these parts of a test case without the need for extra comments or code to do so.
Semantically, a `GIVEN` clause may have multiple _independent_ `WHEN` clauses within it. This allows a test Semantically, a `GIVEN` clause may have multiple _independent_ `WHEN` clauses within it. This allows a test
to have, e.g., one set of "given" objects and multiple subtests using those objects in various ways in each to have, e.g., one set of "given" objects and multiple subtests using those objects in various ways in each
of the `WHEN` clauses without repeating the initialisation from the `GIVEN` clause. When there are _dependent_ of the `WHEN` clauses without repeating the initialisation from the `GIVEN` clause. When there are _dependent_
clauses -- such as a second `WHEN` clause that should only happen _after_ the previous `WHEN` clause has been clauses -- such as a second `WHEN` clause that should only happen _after_ the previous `WHEN` clause has been
executed and validated -- there are additional macros starting with `AND_`: executed and validated -- there are additional macros starting with `AND_`:
* **AND_GIVEN(** _something_ **)** * **AND_GIVEN(** _something_ **)**
* **AND_WHEN(** _something_ **)** * **AND_WHEN(** _something_ **)**
* **AND_THEN(** _something_ **)** * **AND_THEN(** _something_ **)**
These are used to chain ```GIVEN```s, ```WHEN```s and ```THEN```s together. The `AND_*` clause is placed These are used to chain ```GIVEN```s, ```WHEN```s and ```THEN```s together. The `AND_*` clause is placed
_inside_ the clause on which it depends. There can be multiple _independent_ clauses that are all _dependent_ _inside_ the clause on which it depends. There can be multiple _independent_ clauses that are all _dependent_
on a single outer clause. on a single outer clause.
```cpp ```cpp
SCENARIO( "vector can be sized and resized" ) { SCENARIO( "vector can be sized and resized" ) {
GIVEN( "An empty vector" ) { GIVEN( "An empty vector" ) {
@ -301,7 +301,7 @@ Currently Catch2 support up to 11 template parameters in signature
* **TEMPLATE_TEST_CASE_SIG(** _test name_ , _tags_, _signature_, _type1_, _type2_, ..., _typen_ **)** * **TEMPLATE_TEST_CASE_SIG(** _test name_ , _tags_, _signature_, _type1_, _type2_, ..., _typen_ **)**
Inside `TEMPLATE_TEST_CASE_SIG` test case you can use the names of template parameters as defined in _signature_. Inside `TEMPLATE_TEST_CASE_SIG` test case you can use the names of template parameters as defined in _signature_.
```cpp ```cpp
TEMPLATE_TEST_CASE_SIG("TemplateTestSig: arrays can be created from NTTP arguments", "[vector][template][nttp]", TEMPLATE_TEST_CASE_SIG("TemplateTestSig: arrays can be created from NTTP arguments", "[vector][template][nttp]",