Catch

suggest change

Catch is a header only library that allows you to use both TDD and BDD unit test style.

The following snippet is from the Catch documentation page at this link:

SCENARIO( "vectors can be sized and resized", "[vector]" ) {
```
GIVEN( "A vector with some items" ) {
    std::vector v( 5 );
    
    REQUIRE( v.size() == 5 );
    REQUIRE( v.capacity() >= 5 );
    
    WHEN( "the size is increased" ) {
        v.resize( 10 );
        
        THEN( "the size and capacity change" ) {
            REQUIRE( v.size() == 10 );
            REQUIRE( v.capacity() >= 10 );
        }
    }
    WHEN( "the size is reduced" ) {
        v.resize( 0 );
        
        THEN( "the size changes but not capacity" ) {
            REQUIRE( v.size() == 0 );
            REQUIRE( v.capacity() >= 5 );
        }
    }
    WHEN( "more capacity is reserved" ) {
        v.reserve( 10 );
        
        THEN( "the capacity changes but not the size" ) {
            REQUIRE( v.size() == 5 );
            REQUIRE( v.capacity() >= 10 );
        }
    }
    WHEN( "less capacity is reserved" ) {
        v.reserve( 0 );
        
        THEN( "neither size nor capacity are changed" ) {
            REQUIRE( v.size() == 5 );
            REQUIRE( v.capacity() >= 5 );
        }
    }
}
```
}

Conveniently, these tests will be reported as follows when run:

Scenario: vectors can be sized and resized
```
Given: A vector with some items
 When: more capacity is reserved
 Then: the capacity changes but not the size
```

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Unit testing:
* Catch

Table Of Contents
8 Arrays
11 Loops
39 Streams
51 Unions
56 Lambdas
60 SFINAE
62 RAII
67 Sorting
84 RTTI
87 Scopes
104 Profiling
107 Recursion
117 Iteration
125 Alignment
134 Semaphore
136 Debugging
139 Mutexes
141 Unit testing
142 decltype