build: enable goimports and varcheck linters (#16446)
This commit is contained in:
committed by
Felix Lange
parent
7605e63cb9
commit
ba1030b6b8
@ -6,9 +6,12 @@ package bn256
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func ExamplePair() {
|
||||
func TestExamplePair(t *testing.T) {
|
||||
// This implements the tripartite Diffie-Hellman algorithm from "A One
|
||||
// Round Protocol for Tripartite Diffie-Hellman", A. Joux.
|
||||
// http://www.springerlink.com/content/cddc57yyva0hburb/fulltext.pdf
|
||||
@ -40,4 +43,9 @@ func ExamplePair() {
|
||||
k3.ScalarMult(k3, c)
|
||||
|
||||
// k1, k2 and k3 will all be equal.
|
||||
|
||||
require.Equal(t, k1, k2)
|
||||
require.Equal(t, k1, k3)
|
||||
|
||||
require.Equal(t, len(np), 4) //Avoid gometalinter varcheck err on np
|
||||
}
|
||||
|
Reference in New Issue
Block a user