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

Function TestJoinIterator

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

Source from the content-addressed store, hash-verified

43}
44
45func TestJoinIterator(t *testing.T) {
46 t.Parallel()
47
48 assert := internal.NewAssert(t, "TestJoinIterator")
49
50 var iter1 Iterator[int] = FromSlice([]int{1, 2})
51 var iter2 Iterator[int] = FromSlice([]int{3, 4})
52
53 var iter Iterator[int] = Join(iter1, iter2)
54
55 item, ok := iter.Next()
56 assert.Equal(1, item)
57 assert.Equal(true, ok)
58
59 assert.Equal([]int{2, 3, 4}, ToSlice(iter))
60}
61
62func TestReduce(t *testing.T) {
63 t.Parallel()

Callers

nothing calls this directly

Calls 6

EqualMethod · 0.95
NewAssertFunction · 0.92
FromSliceFunction · 0.70
JoinFunction · 0.70
ToSliceFunction · 0.70
NextMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…