feat: add Concat for stream

This commit is contained in:
dudaodong committed 2023-02-07 10:47:28 +08:00
1 parent 422022c74d
commit 6bba44dc50
2 files changed
+24 -3

No files matched your search

+11
View File
@@ -292,3 +292,14 @@ func TestStream_Range(t *testing.T) {
s6 := s.Range(0, 4)
assert.Equal([]int{1, 2, 3}, s6.ToSlice())
}
func TestStream_Concat(t *testing.T) {
assert := internal.NewAssert(t, "TestStream_Concat")
s1 := FromSlice([]int{1, 2, 3})
s2 := FromSlice([]int{4, 5, 6})
s := Concat(s1, s2)
assert.Equal([]int{1, 2, 3, 4, 5, 6}, s.ToSlice())
}