encoder_test.go 310 Bytes
Newer Older
hujiebin's avatar
hujiebin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
package test

import (
	"hash/crc32"
	"hilo-userProxy/common"
	"testing"
)

func TestEncodeMessage(t *testing.T) {
	msg := common.EncodeMessage(1, 1, []byte("hello"))
	t.Logf("msg:%s", msg)
}

func TestCrc32(t *testing.T) {
	msg := []byte("hello")
	c := crc32.ChecksumIEEE(msg)
	t.Logf("%v", c == 907060870)
}