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

Function TestSlice

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

Source from the content-addressed store, hash-verified

12}
13
14func TestSlice(t *testing.T) {
15 it := Slice([]int{1, 2, 3})
16 equals(t, it.Next().Unwrap(), 1)
17 equals(t, it.Next().Unwrap(), 2)
18 equals(t, it.Next().Unwrap(), 3)
19 equals(t, it.Next().IsNone(), true)
20}
21
22func TestRepeat(t *testing.T) {
23 it := Repeat(5)

Callers

nothing calls this directly

Calls 5

SliceFunction · 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…