|
| 1 | +@boost |
| 2 | +Feature: Check macros used with boost test driver |
| 3 | + |
| 4 | + This is just a simple feature meant to test boost's |
| 5 | + specyfic validation macros interop with cucumber. |
| 6 | + |
| 7 | + Scenario Outline: <check> macro |
| 8 | + Given the following feature: |
| 9 | + """ |
| 10 | + Feature: Feature name |
| 11 | + Scenario: Scenario name |
| 12 | + Given a step |
| 13 | + """ |
| 14 | + And a step definition file with: |
| 15 | + """ |
| 16 | + #include <boost/test/unit_test.hpp> |
| 17 | + #include <cucumber-cpp/autodetect.hpp> |
| 18 | + GIVEN("a step") { |
| 19 | + <check>(false); |
| 20 | + } |
| 21 | + """ |
| 22 | + When Cucumber runs the feature |
| 23 | + Then the scenario <passes or fails?> |
| 24 | + |
| 25 | + Examples: |
| 26 | + | check | passes or fails? | |
| 27 | + | BOOST_WARN | passes | |
| 28 | + | BOOST_CHECK | fails | |
| 29 | + | BOOST_REQUIRE | fails | |
| 30 | + |
| 31 | + |
| 32 | + Scenario Outline: <check> macro |
| 33 | + Given the following feature: |
| 34 | + """ |
| 35 | + Feature: Feature name |
| 36 | + Scenario: Scenario name |
| 37 | + Given a step |
| 38 | + """ |
| 39 | + And a step definition file with: |
| 40 | + """ |
| 41 | + #include <boost/test/unit_test.hpp> |
| 42 | + #include <cucumber-cpp/autodetect.hpp> |
| 43 | + GIVEN("a step") { |
| 44 | + <check>(false, "boost message"); |
| 45 | + } |
| 46 | + """ |
| 47 | + When Cucumber runs the feature |
| 48 | + Then the scenario <passes or fails?> |
| 49 | + |
| 50 | + Examples: |
| 51 | + | check | passes or fails? | |
| 52 | + | BOOST_WARN_MESSAGE | passes | |
| 53 | + | BOOST_CHECK_MESSAGE | fails with message "boost message" | |
| 54 | + | BOOST_REQUIRE_MESSAGE | fails with message "boost message" | |
| 55 | + |
| 56 | + |
| 57 | + Scenario Outline: <check> macro |
| 58 | + Given the following feature: |
| 59 | + """ |
| 60 | + Feature: Feature name |
| 61 | + Scenario: Scenario name |
| 62 | + Given a step |
| 63 | + """ |
| 64 | + And a step definition file with: |
| 65 | + """ |
| 66 | + #include <boost/test/unit_test.hpp> |
| 67 | + #include <cucumber-cpp/autodetect.hpp> |
| 68 | + GIVEN("a step") { |
| 69 | + <check>("boost message"); |
| 70 | + } |
| 71 | + """ |
| 72 | + When Cucumber runs the feature |
| 73 | + Then the scenario <passes or fails?> |
| 74 | + |
| 75 | + Examples: |
| 76 | + | check | passes or fails? | |
| 77 | + | BOOST_ERROR | fails with message "boost message" | |
| 78 | + | BOOST_FAIL | fails with message "boost message" | |
| 79 | + |
0 commit comments