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 123123
124124 Scenario: Add two numbers
125125 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
127127 And I have entered 30 into the calculator
128128 When I press add
129129 Then The result should be 50
137137 #include < Gunit.h>
138138
139139 GSTEPS ("Calc* ") { // "Calc Addition.Add two numbers"
140- double result{} ;
140+ auto result = 0 ;
141141
142142 Given("I created a calculator with value {n}") =
143- [&](double n) {
143+ [&](int n) {
144144 Calculator calc{n};
145145
146146 Given("I have entered {n} into the calculator") =
147- [&](double n) { calc.push(n); };
147+ [&](int n) { calc.push(n); };
148148
149149 When("I press add") =
150150 [&] { result = calc.add(); };
151151
152152 Then("The result should be {expected}") =
153- [&](double expected) {
153+ [&](int expected) {
154154 EXPECT_EQ(expected, result);
155155 };
156156 };
You can’t perform that action at this time.
0 commit comments