Skip to content

Commit

Permalink
test(withoutempty): missing test
Browse files Browse the repository at this point in the history
  • Loading branch information
samber committed Jan 26, 2025
1 parent f1c3379 commit 6b110b3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions intersect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,11 @@ func TestWithoutEmpty(t *testing.T) {
result1 := WithoutEmpty([]int{0, 1, 2})
result2 := WithoutEmpty([]int{1, 2})
result3 := WithoutEmpty([]int{})
result4 := WithoutEmpty([]*int{ToPtr(0), ToPtr(1), nil, ToPtr(2)})
is.Equal(result1, []int{1, 2})
is.Equal(result2, []int{1, 2})
is.Equal(result3, []int{})
is.Equal(result4, []*int{ToPtr(0), ToPtr(1), ToPtr(2)})

type myStrings []string
allStrings := myStrings{"", "foo", "bar"}
Expand Down

0 comments on commit 6b110b3

Please sign in to comment.