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

Function TestNth

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

Source from the content-addressed store, hash-verified

237}
238
239func TestNth(t *testing.T) {
240 equals(t, Nth(Slice([]int{1, 2, 3, 4, 5}), 0).Unwrap(), 1)
241 equals(t, Nth(Slice([]int{1, 2, 3, 4, 5}), 4).Unwrap(), 5)
242 equals(t, Nth(Slice([]int{1, 2, 3, 4, 5}), 10).IsNone(), true)
243}
244
245func TestEqual(t *testing.T) {
246 equals(t, Equal(Slice([]int{}), Slice([]int{})), true)

Callers

nothing calls this directly

Calls 5

equalsFunction · 0.85
NthFunction · 0.85
SliceFunction · 0.85
UnwrapMethod · 0.80
IsNoneMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…