26 lines
775 B
Go
26 lines
775 B
Go
package gameserver
|
|||
|
|
|
||
|
|
import (
|
||
|
|
"testing"
|
||
|
|
|
||
|
|
goproto "gac-hkrpg-go/protocol/proto"
|
||
|
|
)
|
||
|
|
|
||
|
|
func TestDispatchMapsRegistered(t *testing.T) {
|
||
|
|
t.Logf("typedHandlers=%d dummyResponses=%d rawHandlers=%d", len(typedHandlers), len(dummyResponses), len(rawHandlers))
|
||
|
|
if len(dummyResponses) == 0 {
|
||
|
|
t.Fatal("dummyResponses is EMPTY - handlers_raw.go init did not run")
|
||
|
|
}
|
||
|
|
if len(rawHandlers) == 0 {
|
||
|
|
t.Fatal("rawHandlers is EMPTY")
|
||
|
|
}
|
||
|
|
if _, ok := dummyResponses[17]; !ok {
|
||
|
|
t.Fatal("GetVideoVersionKeyCsReq (17) not in dummyResponses")
|
||
|
|
}
|
||
|
|
if _, ok := dummyResponses[uint16(goproto.CmdIDByName["GetSecretKeyInfoCsReq"])]; !ok {
|
||
|
|
t.Fatal("GetSecretKeyInfoCsReq not in dummyResponses")
|
||
|
|
}
|
||
|
|
if _, ok := rawHandlers[8115]; !ok {
|
||
|
|
t.Fatal("8115 GetSwitchHandData not in rawHandlers")
|
||
|
|
}
|
||
|
|
}
|