aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorthomasmodeneis <thomas.modeneis@gmail.com>2018-04-18 06:53:50 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-04-18 06:53:50 +0800
commitba1030b6b84f810c04a82221a1b1c0a3dbf499a8 (patch)
tree9c3450535acddfec3b1987e0a2e04fa9ca303e38 /crypto
parent7605e63cb9dda7fc5bb619abf1eb1f74ac3f6cc1 (diff)
downloadgo-tangerine-ba1030b6b84f810c04a82221a1b1c0a3dbf499a8.tar
go-tangerine-ba1030b6b84f810c04a82221a1b1c0a3dbf499a8.tar.gz
go-tangerine-ba1030b6b84f810c04a82221a1b1c0a3dbf499a8.tar.bz2
go-tangerine-ba1030b6b84f810c04a82221a1b1c0a3dbf499a8.tar.lz
go-tangerine-ba1030b6b84f810c04a82221a1b1c0a3dbf499a8.tar.xz
go-tangerine-ba1030b6b84f810c04a82221a1b1c0a3dbf499a8.tar.zst
go-tangerine-ba1030b6b84f810c04a82221a1b1c0a3dbf499a8.zip
build: enable goimports and varcheck linters (#16446)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/bn256/cloudflare/example_test.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/crypto/bn256/cloudflare/example_test.go b/crypto/bn256/cloudflare/example_test.go
index b2d19807a..6c285995c 100644
--- a/crypto/bn256/cloudflare/example_test.go
+++ b/crypto/bn256/cloudflare/example_test.go
@@ -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
}