mirror of
https://github.com/rjNemo/underscore
synced 2026-06-06 02:26:42 +00:00
15 lines
270 B
Go
15 lines
270 B
Go
package underscore_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
u "github.com/rjNemo/underscore"
|
|
)
|
|
|
|
func TestEvery(t *testing.T) {
|
|
nums := []int{1, 3, 5, 7, 9}
|
|
isOdd := func(n int) bool { return n%2 != 0 }
|
|
assert.True(t, u.Every(nums, isOdd))
|
|
}
|