Skip to content

Commit 10137be

Browse files
committed
refactored a lot of code
1 parent 1ae9468 commit 10137be

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+697
-394
lines changed

cucumber_cpp/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,3 @@ target_include_directories(cucumber_cpp INTERFACE
1818
target_link_libraries(cucumber_cpp INTERFACE
1919
cucumber_cpp.library
2020
)
21-
22-
add_subdirectory(devkit)

cucumber_cpp/acceptance_test/steps/Steps.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ THEN("this should be skipped")
6060

6161
GIVEN("Next block of text enclosed in \"\"\" characters")
6262
{
63-
64-
ASSERT_THAT(docString, testing::Eq("Multiline\nDocstring"));
63+
ASSERT_THAT(docString, testing::IsTrue());
64+
ASSERT_THAT(docString->content, testing::StrEq("Multiline\nDocstring"));
6565
}
6666

6767
WHEN("this step is being used")

cucumber_cpp/devkit/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

cucumber_cpp/devkit/empty/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

cucumber_cpp/devkit/empty/features/empty.feature

Lines changed: 0 additions & 11 deletions
This file was deleted.

cucumber_cpp/devkit/empty/features/empty.ndjson

Lines changed: 0 additions & 9 deletions
This file was deleted.

cucumber_cpp/example/features/2simple.feature

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ Feature: Simple feature file
1313
When I eat <y> cucumbers
1414
Then I should have <z> cucumbers
1515

16+
@ex:1
17+
Examples:
18+
| x | y | z |
19+
| 10 | 5 | 5 |
20+
| 11 | 3 | 8 |
21+
22+
@ex:2
1623
Examples:
1724
| x | y | z |
1825
| 10 | 5 | 5 |

cucumber_cpp/example/features/3simple.feature

Lines changed: 79 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,82 @@ Feature: Simple feature file
55
Background:
66
Given a background step
77

8-
@result:OK @printme
9-
Scenario Outline: Can substract
10-
Given there are <x> cucumbers
11-
| foo | bar | asdasd | ad |
12-
| boz | boo | asd | asdasd |
13-
When I eat <y> cucumbers
14-
Then I should have <z> cucumbers
15-
16-
Examples:
17-
| x | y | z |
18-
| 10 | 5 | 5 |
19-
| 11 | 3 | 8 |
20-
21-
@result:FAILED
22-
Scenario Outline: Is a dingus
23-
Given there are <x> cucumbers
24-
When I eat <y> cucumbers
25-
Then I should have <z> cucumbers
26-
And this step should be skipped
27-
| foo | bar |
28-
| boz | boo |
29-
30-
Examples:
31-
| x | y | z |
32-
| 10 | 4 | 5 |
33-
| 11 | 3 | 6 |
34-
35-
@result:UNDEFINED
36-
Scenario: a scenario with a missing step
37-
Given there are <x> cucumbers
38-
When I eat <y> cucumbers
39-
Then I should have <z> cucumbers left
40-
And this step should be skipped
41-
Examples:
42-
| x | y | z |
43-
| 10 | 5 | 5 |
44-
| 11 | 3 | 8 |
8+
Rule: Scenarios that have a rule applied
9+
10+
@result:OK @printme
11+
Scenario Outline: Can substract
12+
Given there are <x> cucumbers
13+
| foo | bar | asdasd | ad |
14+
| boz | boo | asd | asdasd |
15+
When I eat <y> cucumbers
16+
Then I should have <z> cucumbers
17+
18+
Examples:
19+
| x | y | z |
20+
| 10 | 5 | 5 |
21+
| 11 | 3 | 8 |
22+
23+
@result:FAILED
24+
Scenario Outline: Is a dingus
25+
Given there are <x> cucumbers
26+
When I eat <y> cucumbers
27+
Then I should have <z> cucumbers
28+
And this step should be skipped
29+
| foo | bar |
30+
| boz | boo |
31+
32+
Examples:
33+
| x | y | z |
34+
| 10 | 4 | 5 |
35+
| 11 | 3 | 6 |
36+
37+
@result:UNDEFINED
38+
Scenario: a scenario with a missing step
39+
Given there are <x> cucumbers
40+
When I eat <y> cucumbers
41+
Then I should have <z> cucumbers left
42+
And this step should be skipped
43+
Examples:
44+
| x | y | z |
45+
| 10 | 5 | 5 |
46+
| 11 | 3 | 8 |
47+
48+
Rule: Scenarios that have another rule applied
49+
50+
@result:OK @printme
51+
Scenario Outline: Can substract
52+
Given there are <x> cucumbers
53+
| foo | bar | asdasd | ad |
54+
| boz | boo | asd | asdasd |
55+
When I eat <y> cucumbers
56+
Then I should have <z> cucumbers
57+
58+
Examples:
59+
| x | y | z |
60+
| 10 | 5 | 5 |
61+
| 11 | 3 | 8 |
62+
63+
@result:FAILED
64+
Scenario Outline: Is a dingus
65+
Given there are <x> cucumbers
66+
When I eat <y> cucumbers
67+
Then I should have <z> cucumbers
68+
And this step should be skipped
69+
| foo | bar |
70+
| boz | boo |
71+
72+
Examples:
73+
| x | y | z |
74+
| 10 | 4 | 5 |
75+
| 11 | 3 | 6 |
76+
77+
@result:UNDEFINED
78+
Scenario: a scenario with a missing step
79+
Given there are <x> cucumbers
80+
When I eat <y> cucumbers
81+
Then I should have <z> cucumbers left
82+
And this step should be skipped
83+
Examples:
84+
| x | y | z |
85+
| 10 | 5 | 5 |
86+
| 11 | 3 | 8 |
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1+
@thishasarule
12
Feature: Feature with a rule
23
In order to group related scenarios and rules
34
As a Cucumber user
45
I want a clear, human-readable feature description
56

7+
Scenario: Scenario without a rule
8+
Given a step
9+
610
Rule: Example rule
711
In order to demonstrate rules in Cucumber
812
As a developer
913
I want to see how rules work in feature files
1014

11-
Scenario Outline: Scenario under a rule
15+
Scenario: Scenario under a rule
1216
Given a step
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
@substep
12
Feature: Feature with a step that will call another step
23

34
Scenario: Scenario under a rule
4-
Given call another step
5+
When a step calls another step
6+
Then the called step is executed

0 commit comments

Comments
 (0)