- task schedule added.

This commit is contained in:
gazebo
2018-09-15 18:53:39 +08:00
parent b2d365e36f
commit af5038e8a7
7 changed files with 444 additions and 1 deletions

View 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)
}