blas/testblas: move test cases for Zher2 to package-level variable
MODIFY
blas/testblas/zher2.go
blas/testblas/zher2.go
@@ -11,12 +11,7 @@ import (
"gonum.org/v1/gonum/blas"
)
-type Zher2er interface {
- Zher2(uplo blas.Uplo, n int, alpha complex128, x []complex128, incX int, y []complex128, incY int, a []complex128, lda int)
-}
-
-func Zher2Test(t *testing.T, impl Zher2er) {
- for tc, test := range []struct {
+var zher2TestCases = []struct {
alpha complex128
incX, incY int
x []complex128
@@ -204,7 +199,14 @@ func Zher2Test(t *testing.T, impl Zher2er) {
10 + 1i, -7 + 5i, 2 + 1i, 18 + 0i,
},
},
- } {
+}
+
+type Zher2er interface {
+ Zher2(uplo blas.Uplo, n int, alpha complex128, x []complex128, incX int, y []complex128, incY int, a []complex128, lda int)
+}
+
+func Zher2Test(t *testing.T, impl Zher2er) {
+ for tc, test := range zher2TestCases {
n := len(test.x)
incX := test.incX
incY := test.incY

blas/testblas: move test cases for Zher2 to package-level variable