MCPcopy Create free account
hub / github.com/Soft/iter / TestFuse

Function TestFuse

iterator_test.go:128–143  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

126}
127
128func TestFuse(t *testing.T) {
129 state := true
130 it := Fuse(
131 Func(func() Option[int] {
132 ret := None[int]()
133 if state {
134 ret = Some(1)
135 }
136 state = !state
137 return ret
138 }),
139 )
140 equals(t, it.Next().Unwrap(), 1)
141 equals(t, it.Next().IsNone(), true)
142 equals(t, it.Next().IsNone(), true)
143}
144
145func TestChain(t *testing.T) {
146 it := Chain(

Callers

nothing calls this directly

Calls 7

FuseFunction · 0.85
FuncFunction · 0.85
SomeFunction · 0.85
equalsFunction · 0.85
UnwrapMethod · 0.80
IsNoneMethod · 0.80
NextMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…