29 lines
593 B
Go
29 lines
593 B
Go
package hash
|
|
|
|
import (
|
|
"github.com/tursom/checksum/assert"
|
|
"hash/crc32"
|
|
"hash/crc64"
|
|
"testing"
|
|
)
|
|
|
|
func TestIEEETable(t *testing.T) {
|
|
assert.Equals(t, IEEETable, crc32.IEEETable)
|
|
}
|
|
|
|
func TestCastagnoliTable(t *testing.T) {
|
|
assert.Equals(t, CastagnoliTable, crc32.MakeTable(crc32.Castagnoli))
|
|
}
|
|
|
|
func TestKoopmanTable(t *testing.T) {
|
|
assert.Equals(t, KoopmanTable, crc32.MakeTable(crc32.Koopman))
|
|
}
|
|
|
|
func TestISOTable(t *testing.T) {
|
|
assert.Equals(t, ISOTable, crc64.MakeTable(crc64.ISO))
|
|
}
|
|
|
|
func TestECMATable(t *testing.T) {
|
|
assert.Equals(t, ECMATable, crc64.MakeTable(crc64.ECMA))
|
|
}
|