https://github.com/philsquared/Catch
Revision 64fd5b8058c92007933e9cc5051b0c51f31129ad authored by Matthew Parnell on 14 August 2018, 09:49:55 UTC, committed by Martin Hořeňovský on 02 September 2018, 14:53:57 UTC
issue #1360 It is possible to have multple given contexts in a single BDD scenario; if you have to type 'and' in the GIVEN description; it's very likely you need an AND. A generic AND is not possible, thus a AND_GIVEN is added to complement the AND_WHEN and AND_THEN. Can be used without needing to increase indent: SCENARIO("...") { GIVEN("...") AND_GIVEN("...") { WHEN("...") { THEN("...") { // ... } } } } would correctly output, when requested/needed: Given: ... And given: ... When: ... Then: ... The padding had to be increased by a character in the output message, to continue to be uniform.
1 parent ee73989
Tip revision: 64fd5b8058c92007933e9cc5051b0c51f31129ad authored by Matthew Parnell on 14 August 2018, 09:49:55 UTC
Add BDD AND_GIVEN based macros
Add BDD AND_GIVEN based macros
Tip revision: 64fd5b8
File | Mode | Size |
---|---|---|
.github | ||
CMake | ||
artwork | ||
contrib | ||
docs | ||
examples | ||
include | ||
misc | ||
projects | ||
scripts | ||
single_include | ||
test_package | ||
third_party | ||
.gitattributes | -rw-r--r-- | 613 bytes |
.gitignore | -rw-r--r-- | 478 bytes |
.travis.yml | -rw-r--r-- | 6.9 KB |
CMakeLists.txt | -rw-r--r-- | 5.5 KB |
CODE_OF_CONDUCT.md | -rw-r--r-- | 3.1 KB |
LICENSE.txt | -rw-r--r-- | 1.3 KB |
README.md | -rw-r--r-- | 2.2 KB |
appveyor.yml | -rw-r--r-- | 2.5 KB |
codecov.yml | -rw-r--r-- | 400 bytes |
conanfile.py | -rw-r--r-- | 1008 bytes |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...