package modbus import ( "git.noahlan.cn/noahlan/nnet/protocol/modbus/internal" "testing" ) func TestCRC(t *testing.T) { got := crcModbus([]byte{0x01, 0x04, 0x02, 0xFF, 0xFF}) expect := uint16(0x80B8) assert := internal.NewAssert(t, "TestCRC") assert.Equal(expect, got) }