mirror of
https://github.com/golang/go
synced 2024-11-17 05:54:46 -07:00
crypto/elliptic: fix BenchmarkMarshalUnmarshal/Compressed
Change-Id: Ifbf4a95e5f315a88633ec0170625cadb087167c0 Reviewed-on: https://go-review.googlesource.com/c/go/+/396934 Run-TryBot: Filippo Valsorda <filippo@golang.org> Trust: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org>
This commit is contained in:
parent
eec47d06c1
commit
a041a75295
@ -364,8 +364,8 @@ func BenchmarkMarshalUnmarshal(b *testing.B) {
|
||||
b.Run("Compressed", func(b *testing.B) {
|
||||
b.ReportAllocs()
|
||||
for i := 0; i < b.N; i++ {
|
||||
buf := Marshal(curve, x, y)
|
||||
xx, yy := Unmarshal(curve, buf)
|
||||
buf := MarshalCompressed(curve, x, y)
|
||||
xx, yy := UnmarshalCompressed(curve, buf)
|
||||
if xx.Cmp(x) != 0 || yy.Cmp(y) != 0 {
|
||||
b.Error("Unmarshal output different from Marshal input")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user