mirror of
https://github.com/rjNemo/underscore
synced 2026-06-06 02:26:42 +00:00
16 lines
271 B
Go
16 lines
271 B
Go
package underscore_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
u "github.com/rjNemo/underscore"
|
|
)
|
|
|
|
func TestSome(t *testing.T) {
|
|
nums := []int{1, 2, 4, 6, 8}
|
|
isEven := func(n int) bool { return n%2 == 0 }
|
|
|
|
assert.True(t, u.Some(nums, isEven))
|
|
}
|