(start Num, end Num, step Num)
| 26 | } |
| 27 | } |
| 28 | func inclusiveStep[Num interface{ ~int32 | ~uint32 }](start Num, end Num, step Num) iter.Seq[Num] { |
| 29 | return func(yield func(v Num) bool) { |
| 30 | var next Num = start |
| 31 | for { |
| 32 | if !yield(next) { |
| 33 | return |
| 34 | } |
| 35 | if next == end { |
| 36 | return |
| 37 | } |
| 38 | |
| 39 | if end-step > next { |
| 40 | next += step |
| 41 | } else { |
| 42 | next = end |
| 43 | } |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | func Test_S8Roundtrip(t *testing.T) { |
| 49 | fac, err := NewInstructionsFactory(t.Context()) |
nothing calls this directly
no outgoing calls
no test coverage detected