- task schedule added.
This commit is contained in:
24
business/jxutils/jxutils_cms_test.go
Normal file
24
business/jxutils/jxutils_cms_test.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package jxutils
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
)
|
||||
|
||||
func TestSplitSlice(t *testing.T) {
|
||||
testValue1 := []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
|
||||
list := utils.Interface2Slice(testValue1)
|
||||
result := SplitSlice(list, 3)
|
||||
if !(len(result) == 4 && len(result[3]) == 1) {
|
||||
t.Log("result is not ok")
|
||||
}
|
||||
|
||||
testValue2 := []string{"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}
|
||||
list = utils.Interface2Slice(testValue2)
|
||||
result = SplitSlice(list, 1)
|
||||
if !(len(result) == 10 && len(result[3]) == 1) {
|
||||
t.Log("result is not ok")
|
||||
}
|
||||
t.Log(result)
|
||||
}
|
||||
Reference in New Issue
Block a user