mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-26 12:43:31 +01:00
Add problems with SECTION
s in loops to documentations
This commit is contained in:
parent
5d6c1f4dd0
commit
626b1d3936
@ -2,6 +2,20 @@
|
||||
|
||||
Catch has some known limitations, that we are not planning to change. Some of these are caused by our desire to support C++98 compilers, some of these are caused by our desire to keep Catch crossplatform, some exist because their priority is seen as low compared to the development effort they would need and some other yet are compiler/runtime bugs.
|
||||
|
||||
## Implementation limits
|
||||
### Sections nested in loops
|
||||
|
||||
If you are using `SECTION`s inside loops, you have to create them with different name per loop's iteration. The recommended way to do so is to incorporate the loop's counter into section's name, like so
|
||||
```cpp
|
||||
TEST_CASE( "Looped section" ) {
|
||||
for (char i = '0'; i < '5'; ++i) {
|
||||
SECTION(std::string("Looped section ") + i) {
|
||||
SUCCEED( "Everything is OK" );
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Features
|
||||
This section outlines some missing features, what is their status and their possible workarounds.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user