Skip to content

Commit

Permalink
refactorted boost feature file
Browse files Browse the repository at this point in the history
  • Loading branch information
konserw committed Sep 15, 2017
1 parent 92544d2 commit 59a3511
Showing 1 changed file with 10 additions and 55 deletions.
65 changes: 10 additions & 55 deletions features/specific/boost_specific.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,64 +16,19 @@ Feature: Check macros used with boost test driver
#include <boost/test/unit_test.hpp>
#include <cucumber-cpp/autodetect.hpp>
GIVEN("a step") {
<check>(false);
<check>;
}
"""
When Cucumber runs the feature
Then the scenario <passes or fails?>

Examples:
| check | passes or fails? |
| BOOST_WARN | passes |
| BOOST_CHECK | fails |
| BOOST_REQUIRE | fails |


Scenario Outline: <check> macro
Given the following feature:
"""
Feature: Feature name
Scenario: Scenario name
Given a step
"""
And a step definition file with:
"""
#include <boost/test/unit_test.hpp>
#include <cucumber-cpp/autodetect.hpp>
GIVEN("a step") {
<check>(false, "boost message");
}
"""
When Cucumber runs the feature
Then the scenario <passes or fails?>

Examples:
| check | passes or fails? |
| BOOST_WARN_MESSAGE | passes |
| BOOST_CHECK_MESSAGE | fails with message "boost message" |
| BOOST_REQUIRE_MESSAGE | fails with message "boost message" |


Scenario Outline: <check> macro
Given the following feature:
"""
Feature: Feature name
Scenario: Scenario name
Given a step
"""
And a step definition file with:
"""
#include <boost/test/unit_test.hpp>
#include <cucumber-cpp/autodetect.hpp>
GIVEN("a step") {
<check>("boost message");
}
"""
When Cucumber runs the feature
Then the scenario <passes or fails?>

Examples:
| check | passes or fails? |
| BOOST_ERROR | fails with message "boost message" |
| BOOST_FAIL | fails with message "boost message" |

| check | passes or fails? |
| BOOST_CHECK(false) | fails |
| BOOST_CHECK_MESSAGE(false, "boost message") | fails with message "boost message" |
| BOOST_ERROR("boost message") | fails with message "boost message" |
| BOOST_FAIL("boost message") | fails with message "boost message" |
| BOOST_REQUIRE(false) | fails |
| BOOST_REQUIRE_MESSAGE(false, "boost message") | fails with message "boost message" |
| BOOST_WARN(false) | passes |
| BOOST_WARN_MESSAGE(false, "boost message") | passes |

0 comments on commit 59a3511

Please sign in to comment.