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

Function TestDropWhile

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

Source from the content-addressed store, hash-verified

85}
86
87func TestDropWhile(t *testing.T) {
88 slice := ToSlice(
89 DropWhile(
90 Slice([]int{1, 2, 3, 4, 5}),
91 func(i int) bool {
92 return i < 4
93 },
94 ),
95 )
96 equals(t, slice, []int{4, 5})
97}
98
99func TestTakeWhile(t *testing.T) {
100 slice := ToSlice(

Callers

nothing calls this directly

Calls 4

ToSliceFunction · 0.85
DropWhileFunction · 0.85
SliceFunction · 0.85
equalsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…