Initial commit

This commit is contained in:
Donny
2019-04-22 20:46:32 +08:00
commit 49ab8aadd1
25441 changed files with 4055000 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
package dao
import (
"testing"
"github.com/smartystreets/goconvey/convey"
)
func TestDaoreverseID(t *testing.T) {
var (
id = "123"
l = int(3)
)
convey.Convey("reverseID", t, func(ctx convey.C) {
p1 := reverseID(id, l)
ctx.Convey("Then p1 should not be nil.", func(ctx convey.C) {
ctx.So(p1, convey.ShouldNotBeNil)
})
})
}
func TestDaocheckIDLen(t *testing.T) {
var (
id = "123"
)
convey.Convey("checkIDLen", t, func(ctx convey.C) {
p1 := checkIDLen(id)
ctx.Convey("Then p1 should not be nil.", func(ctx convey.C) {
ctx.So(p1, convey.ShouldNotBeNil)
})
})
}
func TestDaodiffTs(t *testing.T) {
var (
ts = int64(0)
)
convey.Convey("diffTs", t, func(ctx convey.C) {
p1 := diffTs(ts)
ctx.Convey("Then p1 should not be nil.", func(ctx convey.C) {
ctx.So(p1, convey.ShouldNotBeNil)
})
})
}
func TestDaodiffID(t *testing.T) {
var (
id = int64(0)
)
convey.Convey("diffID", t, func(ctx convey.C) {
p1 := diffID(id)
ctx.Convey("Then p1 should not be nil.", func(ctx convey.C) {
ctx.So(p1, convey.ShouldNotBeNil)
})
})
}