Skip to content

Commit

Permalink
#21 Porting test case from TakeLastWhile
Browse files Browse the repository at this point in the history
  • Loading branch information
meian committed Feb 5, 2022
1 parent 2f01135 commit e3b4317
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions take_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,22 @@ func TestTakeWhile(t *testing.T) {
},
want: []int{},
},
{
name: "1 element with filter true",
args: args{
itb: gcf.FromSlice([]int{1}),
whileFunc: func(v int) bool { return true },
},
want: []int{1},
},
{
name: "1 element with filter false",
args: args{
itb: gcf.FromSlice([]int{1}),
whileFunc: func(v int) bool { return false },
},
want: []int{},
},
{
name: "nil func",
args: args{
Expand Down

0 comments on commit e3b4317

Please sign in to comment.