package utils

import (
	"testing"
	"time"
)

func TestMd5(t *testing.T) {
	s := []byte("123456")
	s2 := append(s, []byte("789")...)
	s_ := Md5(s)
	t.Log(s_, string(s2))
}

func TestAsyncWait(t *testing.T) {

	tm := AsyncWait(1*time.Second, func(p interface{}) {
		t.Log("do", p)
	}, 23)

	t.Log(tm)
	time.Sleep(2 * time.Second)
}

func TestSum(t*testing.T) {
	a := []int64{1,2,3,4,5,6,7,8,9,10}

	s := Sum(0, a...)
	t.Log(s)
}