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

Function TestAll

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

Source from the content-addressed store, hash-verified

177}
178
179func TestAll(t *testing.T) {
180 equals(t,
181 All(
182 Empty[int](),
183 func(n int) bool {
184 return n > 0
185 },
186 ),
187 true,
188 )
189 equals(t,
190 All(
191 Slice([]int{5, 6, 7, 8, 9}),
192 func(n int) bool {
193 return n > 4
194 },
195 ),
196 true,
197 )
198 equals(t,
199 All(
200 Slice([]int{1, 2, 3, 4, 5}),
201 func(n int) bool {
202 return n <= 3
203 },
204 ),
205 false,
206 )
207}
208
209func TestAny(t *testing.T) {
210 equals(t,

Callers

nothing calls this directly

Calls 3

equalsFunction · 0.85
AllFunction · 0.85
SliceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…