Skip to content

Commit fd42635

Browse files
committed
test(concat): with empty stream
1 parent 0539ba7 commit fd42635

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

concat_test.go

+9
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,12 @@ func TestConcat(t *testing.T) {
1515
assert.NoError(t, err)
1616
assert.Equal(t, source, result)
1717
}
18+
19+
func TestConcatWithEmptyStream(t *testing.T) {
20+
source := []int{1, 2, 3}
21+
empty := EmptyStream[int]()
22+
stream := Concat(empty, SliceStream(source))
23+
result, err := CollectSlice(stream)
24+
assert.NoError(t, err)
25+
assert.Equal(t, source, result)
26+
}

0 commit comments

Comments
 (0)