You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
224 B
Go
13 lines
224 B
Go
2 years ago
|
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)
|
||
|
}
|