mirror of
https://github.com/duke-git/lancet.git
synced 2026-11-16 05:12:11 +08:00
feat: add Concat for stream
This commit is contained in:
1 parent
422022c74d
commit
6bba44dc50
2 files changed
+24
-3
No files matched your search
@@ -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())
|
||||
}
|
||||
Reference in new issue
Block a user