Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Highlight block as C++

C++ syntax highlighting was not enabled on one of the blocks.
Commit
e6ee29a925e7c295dfb75332233ea4abf94bc267
Author
David Beckley ·
Parents
1f1ee3c63d9b

Files · Download .tar.gz

Changes

 docs/tutorial.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/docs/tutorial.md b/docs/tutorial.md
index 2d75dab0..75a1b776 100644
--- a/docs/tutorial.md
+++ b/docs/tutorial.md
@@ -142,6 +142,7 @@ So far so good - this is already an improvement on the setup/ teardown approach
 
 The power of sections really shows, however, when we need to execute a sequence of, checked, operations. Continuing the vector example we might want to verify that after reserving a larger capacity, if we reserve smaller capacity (but still larger than the current size) then the capacity is not, in fact, changed. We can do that, naturally, like so:
 
+```c++
     SECTION( "reserving bigger changes capacity but not size" ) {
         v.reserve( 10 );
         
@@ -154,6 +155,7 @@ The power of sections really shows, however, when we need to execute a sequence
             REQUIRE( v.capacity() >= 10 );
         }
     }
+```
 
 Sections can be nested to an arbitrary depth (limited only by your stack size). Each leaf section (i.e. a section that contains no nested sections) will be executed exactly once, on a separate path of execution from any other leaf section (so no leaf section can interfere with another). Obviously a failure in a parent section will prevent nested sections from running - but that's the idea.