Skip to content

Commit

Permalink
Add docs for AND_GIVEN macro - see catchorg#1360
Browse files Browse the repository at this point in the history
  • Loading branch information
claremacrae committed Jul 22, 2019
1 parent 80c7590 commit 2787640
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/test-cases-and-sections.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@ This macro maps onto ```TEST_CASE``` and works in the same way, except that the

These macros map onto ```SECTION```s except that the section names are the _something_s prefixed by "given: ", "when: " or "then: " respectively.

* **AND_GIVEN(** _something_ **)**
* **AND_WHEN(** _something_ **)**
* **AND_THEN(** _something_ **)**

Similar to ```WHEN``` and ```THEN``` except that the prefixes start with "and ". These are used to chain ```WHEN```s and ```THEN```s together.
Similar to ```GIVEN```, ```WHEN``` and ```THEN``` except that the prefixes start with "and ". These are used to chain ```GIVEN```s, ```WHEN```s and ```THEN```s together.

When any of these macros are used the console reporter recognises them and formats the test case header such that the Givens, Whens and Thens are aligned to aid readability.

Expand Down

0 comments on commit 2787640

Please sign in to comment.