Home | History | Annotate | Download | only in big
      1 // Copyright 2016 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,!math_big_pure_go
      6 
      7 package big
      8 
      9 import (
     10 	"testing"
     11 )
     12 
     13 // Tests whether the non vector routines are working, even when the tests are run on a
     14 // vector-capable machine
     15 
     16 func TestFunVVnovec(t *testing.T) {
     17 	if hasVX == true {
     18 		for _, a := range sumVV {
     19 			arg := a
     20 			testFunVV(t, "addVV_novec", addVV_novec, arg)
     21 
     22 			arg = argVV{a.z, a.y, a.x, a.c}
     23 			testFunVV(t, "addVV_novec symmetric", addVV_novec, arg)
     24 
     25 			arg = argVV{a.x, a.z, a.y, a.c}
     26 			testFunVV(t, "subVV_novec", subVV_novec, arg)
     27 
     28 			arg = argVV{a.y, a.z, a.x, a.c}
     29 			testFunVV(t, "subVV_novec symmetric", subVV_novec, arg)
     30 		}
     31 	}
     32 }
     33 
     34 func TestFunVWnovec(t *testing.T) {
     35 	if hasVX == true {
     36 		for _, a := range sumVW {
     37 			arg := a
     38 			testFunVW(t, "addVW_novec", addVW_novec, arg)
     39 
     40 			arg = argVW{a.x, a.z, a.y, a.c}
     41 			testFunVW(t, "subVW_novec", subVW_novec, arg)
     42 		}
     43 	}
     44 }
     45