From: Filippo Valsorda Date: Tue, 29 Mar 2022 22:18:48 +0000 (+0200) Subject: crypto/elliptic: fix BenchmarkMarshalUnmarshal/Compressed X-Git-Tag: go1.19beta1~763 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a041a752955d772a3b5e1080ee7951a66c2be12b;p=gostls13.git crypto/elliptic: fix BenchmarkMarshalUnmarshal/Compressed Change-Id: Ifbf4a95e5f315a88633ec0170625cadb087167c0 Reviewed-on: https://go-review.googlesource.com/c/go/+/396934 Run-TryBot: Filippo Valsorda Trust: Filippo Valsorda TryBot-Result: Gopher Robot Reviewed-by: Roland Shoemaker --- diff --git a/src/crypto/elliptic/elliptic_test.go b/src/crypto/elliptic/elliptic_test.go index 5481929db1..eb5f0546c4 100644 --- a/src/crypto/elliptic/elliptic_test.go +++ b/src/crypto/elliptic/elliptic_test.go @@ -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") }