init
This commit is contained in:
commit
c5cc245e25
29 changed files with 926 additions and 0 deletions
20
util/map_test.go
Normal file
20
util/map_test.go
Normal file
|
@ -0,0 +1,20 @@
|
|||
package util_test
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/genudine/saerro-go/util"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestMap(t *testing.T) {
|
||||
dolls := []int64{44203, 41666, 79579, 63741, 57213}
|
||||
|
||||
result := util.Map(dolls, func(doll int64) string {
|
||||
return strconv.FormatInt(doll, 16)
|
||||
})
|
||||
|
||||
assert.Contains(t, result, "acab")
|
||||
assert.Len(t, result, len(dolls))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue