Esempio n. 1
0
func BenchmarkXxhash64CgoMultiWrites(b *testing.B) {
	h := C.New64()
	for i := 0; i < b.N; i++ {
		h.Write(in)
	}
	_ = h.Sum64()
}
Esempio n. 2
0
func TestHash64Cgo(t *testing.T) {
	h := C.New64()
	h.Write(in)
	r := h.Sum64()
	if r != expected64 {
		t.Errorf("expected 0x%x, got 0x%x.", expected64, r)
	}
}