Go to the source code of this file.
|
| TEST_CASE ("vectors can be sized and resized", "[vector]") |
|
◆ TEST_CASE()
TEST_CASE |
( |
"vectors can be sized and resized" | , |
|
|
"" | [vector] ) |
Definition at line 11 of file 100-Fix-Section.cpp.
11 {
12
13
14
15 std::vector<int> v( 5 );
16
19
20 SECTION(
"resizing bigger changes size and capacity" ) {
21 v.resize( 10 );
22
25 }
26 SECTION(
"resizing smaller changes size but not capacity" ) {
27 v.resize( 0 );
28
31 }
32 SECTION(
"reserving bigger changes capacity but not size" ) {
33 v.reserve( 10 );
34
37 }
38 SECTION(
"reserving smaller does not change size or capacity" ) {
39 v.reserve( 0 );
40
43 }
44}