github.com/geraldss/go/src@v0.0.0-20210511222824-ac7d0ebfc235/crypto/ecdsa/ecdsa_s390x_test.go (about)

     1  // Copyright 2020 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // +build s390x
     6  
     7  package ecdsa
     8  
     9  import (
    10  	"crypto/elliptic"
    11  	"testing"
    12  )
    13  
    14  func TestNoAsm(t *testing.T) {
    15  	curves := [...]elliptic.Curve{
    16  		elliptic.P256(),
    17  		elliptic.P384(),
    18  		elliptic.P521(),
    19  	}
    20  
    21  	for _, curve := range curves {
    22  		// override the name of the curve to stop the assembly path being taken
    23  		params := *curve.Params()
    24  		name := params.Name
    25  		params.Name = name + "_GENERIC_OVERRIDE"
    26  
    27  		testKeyGeneration(t, &params, name)
    28  		testSignAndVerify(t, &params, name)
    29  		testNonceSafety(t, &params, name)
    30  		testINDCCA(t, &params, name)
    31  		testNegativeInputs(t, &params, name)
    32  	}
    33  }