MCPcopy
hub / github.com/duke-git/lancet / TestTakeIterator

Function TestTakeIterator

iterator/operation_test.go:72–83  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

70}
71
72func TestTakeIterator(t *testing.T) {
73 t.Parallel()
74
75 assert := internal.NewAssert(t, "TestTakeIterator")
76
77 var iter Iterator[int] = FromSlice([]int{1, 2, 3, 4, 5})
78
79 iter = Take(iter, 3)
80
81 result := ToSlice(iter)
82 assert.Equal([]int{1, 2, 3}, result)
83}

Callers

nothing calls this directly

Calls 5

EqualMethod · 0.95
NewAssertFunction · 0.92
TakeFunction · 0.85
FromSliceFunction · 0.70
ToSliceFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…