INNER CODE UNIT · Go
TestGTMarshal
cloudflare/bn256 · bn256_test.go:99
func TestGTMarshal(t *testing.T) {
_, Ga, err := RandomGT(rand.Reader)
if err != nil {
t.Fatal(err)
}
ma := Ga.Marshal()
Gb := new(GT)
_, err = Gb.Unmarshal(ma)
if err != nil {
t.Fatal(err)
}
mb := Gb.Marshal()
if !bytes.Equal(ma, mb) {
t.Fatal("bytes are different")
}
}