package util import ( "git.noahlan.cn/noahlan/ntool/ntest/assert" "testing" ) func TestCRC(t *testing.T) { got := Checksum([]byte{0x01, 0x04, 0x02, 0xFF, 0xFF}) expect := uint16(0x80B8) assert.Equal(t, expect, got) }