mirror of
https://github.com/rjNemo/underscore
synced 2026-06-06 18:46:47 +00:00
* add logo and fix project image description * add difference function * update docs Co-authored-by: Ruidy <rnemausat@newstore.com>
17 lines
298 B
Go
17 lines
298 B
Go
package underscore_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
u "github.com/rjNemo/underscore"
|
|
)
|
|
|
|
func TestDifference(t *testing.T) {
|
|
nums := []int{1, 3, 5, 6, 7, 9}
|
|
reject := []int{9, 7, 5, 4}
|
|
want := []int{1, 3, 6}
|
|
|
|
assert.Equal(t, want, u.Difference(nums, reject))
|
|
}
|