Skip to content

Commit 8f638fd

Browse files
committed
📚 [README] Use ints instead of double in GSteps example
1 parent f53fd8d commit 8f638fd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
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
@@ -137,20 +137,20 @@
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
};

0 commit comments

Comments
 (0)