示例#1
0
func TestHash32CgoShort(t *testing.T) {
	r := C.Checksum32(in)
	if r != expected32 {
		t.Errorf("expected 0x%x, got 0x%x.", expected32, r)
	}
}
示例#2
0
func BenchmarkXxhash32Cgo(b *testing.B) {
	for i := 0; i < b.N; i++ {
		C.Checksum32(in)
	}
}