File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 123
123
124
124
Scenario: Add two numbers
125
125
Given I created a calculator with value 0
126
- Given I have entered 20 into the calculator
126
+ And I have entered 20 into the calculator
127
127
And I have entered 30 into the calculator
128
128
When I press add
129
129
Then The result should be 50
137
137
#include < Gunit.h>
138
138
139
139
GSTEPS ("Calc* ") { // "Calc Addition.Add two numbers"
140
- double result{} ;
140
+ auto result = 0 ;
141
141
142
142
Given("I created a calculator with value {n}") =
143
- [&](double n) {
143
+ [&](int n) {
144
144
Calculator calc{n};
145
145
146
146
Given("I have entered {n} into the calculator") =
147
- [&](double n) { calc.push(n); };
147
+ [&](int n) { calc.push(n); };
148
148
149
149
When("I press add") =
150
150
[&] { result = calc.add(); };
151
151
152
152
Then("The result should be {expected}") =
153
- [&](double expected) {
153
+ [&](int expected) {
154
154
EXPECT_EQ(expected, result);
155
155
};
156
156
};
You can’t perform that action at this time.
0 commit comments