Create & Init Project...

This commit is contained in:
2019-04-22 18:49:16 +08:00
commit fc4fa37393
25440 changed files with 4054998 additions and 0 deletions

View File

@ -0,0 +1,27 @@
package model
import (
"testing"
"github.com/smartystreets/goconvey/convey"
)
func TestDispatchState(t *testing.T) {
convey.Convey("UpState", t, func() {
dispatchState := int32(0x3a4b5c6d)
role := int8(1)
result, _ := DispatchState(dispatchState, role)
convey.So(result, convey.ShouldEqual, uint32(0x6))
})
}
func TestSetDispatchState(t *testing.T) {
convey.Convey("UpState", t, func() {
dispatchState := int32(0x3a4b5c6d)
state := int8(0x1)
role := int8(1)
result, err := SetDispatchState(dispatchState, role, state)
convey.ShouldBeNil(err)
convey.So(result, convey.ShouldEqual, uint32(0x3a4b5c1d))
})
}