mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	Remove trailing whitespace from test-cases-and-sections.md
This commit is contained in:
		| @@ -90,25 +90,25 @@ This macro maps onto ```TEST_CASE``` and works in the same way, except that the | ||||
| * **WHEN(** _something_ **)** | ||||
| * **THEN(** _something_ **)** | ||||
|  | ||||
| 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  | ||||
| (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  | ||||
| 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 | ||||
| (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 | ||||
| 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  | ||||
| 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_  | ||||
| clauses -- such as a second `WHEN` clause that should only happen _after_ the previous `WHEN` clause has been  | ||||
| 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 | ||||
| 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 | ||||
| executed and validated -- there are additional macros starting with `AND_`: | ||||
|  | ||||
| * **AND_GIVEN(** _something_ **)** | ||||
| * **AND_WHEN(** _something_ **)** | ||||
| * **AND_THEN(** _something_ **)** | ||||
|  | ||||
| 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_  | ||||
| on a single outer clause.  | ||||
| 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_ | ||||
| on a single outer clause. | ||||
| ```cpp | ||||
| SCENARIO( "vector can be sized and resized" ) { | ||||
|     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_ **)** | ||||
|  | ||||
| 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 | ||||
| TEMPLATE_TEST_CASE_SIG("TemplateTestSig: arrays can be created from NTTP arguments", "[vector][template][nttp]", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský