Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/projects/SelfTest/BDDTests.cpp
diff options
context:
space:
mode:
authorPhil Nash2015-12-04 10:19:08 +0000
committerPhil Nash2015-12-04 10:19:08 +0000
commitfdc42d0af47f58fa13a42b685bbeaf55a8347673 (patch)
tree779ff3d692eeffd33353d89ad7697a592ab5201e /projects/SelfTest/BDDTests.cpp
parentd758428fe297655e558a86cc6a013fcb1bcc8c7d (diff)
parentd274fc571c3980b5ac04cbe1416cf2205e6c99f7 (diff)
downloadcatch3-1.3.0.tar.gz
Merged from develop branchv1.3.0
- now v1.3.0
Diffstat (limited to 'projects/SelfTest/BDDTests.cpp')
-rw-r--r--projects/SelfTest/BDDTests.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/projects/SelfTest/BDDTests.cpp b/projects/SelfTest/BDDTests.cpp
index 3b5c959d..2c8bc249 100644
--- a/projects/SelfTest/BDDTests.cpp
+++ b/projects/SelfTest/BDDTests.cpp
@@ -30,13 +30,13 @@ SCENARIO( "Vector resizing affects size and capacity", "[vector][bdd][size][capa
GIVEN( "an empty vector" ) {
std::vector<int> v;
REQUIRE( v.size() == 0 );
-
+
WHEN( "it is made larger" ) {
v.resize( 10 );
THEN( "the size and capacity go up" ) {
REQUIRE( v.size() == 10 );
REQUIRE( v.capacity() >= 10 );
-
+
AND_WHEN( "it is made smaller again" ) {
v.resize( 5 );
THEN( "the size goes down but the capacity stays the same" ) {
@@ -46,7 +46,7 @@ SCENARIO( "Vector resizing affects size and capacity", "[vector][bdd][size][capa
}
}
}
-
+
WHEN( "we reserve more space" ) {
v.reserve( 10 );
THEN( "The capacity is increased but the size remains the same" ) {
@@ -76,19 +76,19 @@ struct Fixture
: d_counter(0)
{
}
-
+
int counter()
{
return d_counter++;
}
-
+
int d_counter;
};
-
+
}
SCENARIO_METHOD(Fixture,
- "BDD tests requiring Fixtures to provide commonly-accessed data or methods",
+ "BDD tests requiring Fixtures to provide commonly-accessed data or methods",
"[bdd][fixtures]") {
const int before(counter());
GIVEN("No operations precede me") {