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

Function TestToSlice

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

Source from the content-addressed store, hash-verified

69}
70
71func TestToSlice(t *testing.T) {
72 slice1 := ToSlice(Take(Repeat(5), 3))
73 equals(t, slice1, []int{5, 5, 5})
74 slice2 := ToSlice(Empty[int]())
75 equals(t, slice2, []int{})
76}
77
78func TestDrop(t *testing.T) {
79 slice1 := ToSlice(Drop(Slice([]int{1, 2, 3, 4, 5}), 3))

Callers

nothing calls this directly

Calls 4

ToSliceFunction · 0.85
TakeFunction · 0.85
RepeatFunction · 0.85
equalsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…