File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -168,12 +168,12 @@ private function parseYaml(string $input)
168168 if (isset ($ value ['~generator ' ])) {
169169 $ options = $ value ['~generator ' ];
170170 $ generator = static function (int $ start , int $ step , int $ stop ): Generator {
171- for ($ i = $ start ; $ i < $ stop ; $ i += $ step ) {
171+ for ($ i = $ start ; $ i <= $ stop ; $ i += $ step ) {
172172 yield $ i ;
173173 }
174174 };
175175
176- return $ generator ($ options ['start ' ] ?? 10 , $ options ['step ' ] ?? 1 , $ options ['stop ' ] ?? 10 );
176+ return $ generator ($ options ['start ' ] ?? 0 , $ options ['step ' ] ?? 1 , $ options ['stop ' ] ?? 9 );
177177 }
178178
179179 if (isset ($ value ['~object ' ])) {
Original file line number Diff line number Diff line change @@ -165,10 +165,7 @@ testEvaluate:
165165 maxItems : ~
166166 constraint : ~
167167 other :
168- ~generator :
169- start : 0
170- step : 1
171- stop : 10
168+ ~generator : {}
172169
173170 - minItems : 0
174171 maxItems : ~
@@ -246,10 +243,7 @@ testPreEvaluateFail:
246243 maxItems : 3
247244 constraint : ~
248245 other :
249- ~generator :
250- start : 0
251- step : 1
252- stop : 10
246+ ~generator : { start: 0, step: 1, stop: 9 }
253247 expectedExceptionMessage : Failed asserting that %s is a sequential array with ≤ 3 items.
254248
255249testCountable :
You can’t perform that action at this time.
0 commit comments