mirror of
https://github.com/CPunch/gopenfusion.git
synced 2024-11-21 23:10:06 +00:00
login_test: more stale comments lol
This commit is contained in:
parent
cba01a877d
commit
2bd61dc571
@ -57,16 +57,15 @@ func makeDummyPeer(ctx context.Context, is *is.I, recv chan<- *cnet.PacketEvent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
func sendAndRecv(peer *cnet.Peer, recv chan *cnet.PacketEvent, is *is.I, sID, rID uint32, out, in interface{}) {
|
func sendAndRecv(peer *cnet.Peer, recv chan *cnet.PacketEvent, is *is.I, sID, rID uint32, out, in interface{}) {
|
||||||
// send login request (this should create an account)
|
// send out packet
|
||||||
err := peer.Send(sID, out)
|
err := peer.Send(sID, out)
|
||||||
is.NoErr(err) // peer.Send() should not return an error
|
is.NoErr(err) // peer.Send() should not return an error
|
||||||
|
|
||||||
// receive login response
|
// receive response
|
||||||
evnt := <-recv
|
evnt := <-recv
|
||||||
is.Equal(evnt.PktID, rID) // should receive expected type
|
is.Equal(evnt.PktID, rID) // should receive expected type
|
||||||
|
|
||||||
err = protocol.NewPacket(evnt.Pkt).Decode(in)
|
is.NoErr(protocol.NewPacket(evnt.Pkt).Decode(in)) // packet.Decode() should not return an error
|
||||||
is.NoErr(err) // packet.Decode() should not return an error
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
func TestMain(m *testing.M) {
|
||||||
|
Loading…
Reference in New Issue
Block a user