1
0
mirror of https://github.com/golang/go synced 2024-09-29 12:04:28 -06: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:
Filippo Valsorda 2022-03-30 00:18:48 +02:00
parent eec47d06c1
commit a041a75295

View File

@ -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")
}