integrate: make tests parallel
MODIFY
integrate/quad/hermite_test.go
integrate/quad/hermite_test.go
@@ -13,6 +13,7 @@ import (
)
func TestHermite(t *testing.T) {
+ t.Parallel()
for cas, test := range []struct {
n int
f func(float64) float64
@@ -70,6 +71,7 @@ func TestHermite(t *testing.T) {
}
func TestHermiteLocations(t *testing.T) {
+ t.Parallel()
// Test the hermite locations and weights against other precomputed table.
// Data from http://dlmf.nist.gov/3.5.
for _, test := range []struct {
@@ -139,6 +141,7 @@ func TestHermiteLocations(t *testing.T) {
}
func TestHermiteInitialGuesses(t *testing.T) {
+ t.Parallel()
for _, test := range []struct {
n int
want []float64
@@ -164,6 +167,7 @@ func TestHermiteInitialGuesses(t *testing.T) {
}
func TestHermiteLocationsAsy0(t *testing.T) {
+ t.Parallel()
for _, test := range []struct {
n int
x []float64
@@ -199,6 +203,7 @@ func TestHermiteLocationsAsy0(t *testing.T) {
}
func TestHermiteAsyAiry(t *testing.T) {
+ t.Parallel()
for _, test := range []struct {
n int
theta []float64

MODIFY
integrate/quad/legendre_test.go
integrate/quad/legendre_test.go
@@ -12,6 +12,7 @@ import (
)
func TestLegendre(t *testing.T) {
+ t.Parallel()
for i, test := range []struct {
f func(float64) float64
min, max float64
@@ -43,6 +44,7 @@ func TestLegendre(t *testing.T) {
}
func TestLegendreSingle(t *testing.T) {
+ t.Parallel()
for c, test := range []struct {
n int
min, max float64

MODIFY
integrate/quad/quad_test.go
integrate/quad/quad_test.go
@@ -13,6 +13,7 @@ import (
)
func TestFixed(t *testing.T) {
+ t.Parallel()
for i, test := range []struct {
f func(float64) float64
min, max float64
@@ -85,6 +86,7 @@ func (l legendreNonSingle) FixedLocations(x, weight []float64, min, max float64)
}
func TestFixedNonSingle(t *testing.T) {
+ t.Parallel()
// TODO(btracey): Add tests with infinite bounds when we have native support
// for indefinite integrals.
for i, test := range []struct {

MODIFY
integrate/romberg_test.go
integrate/romberg_test.go
@@ -13,6 +13,7 @@ import (
)
func TestRomberg(t *testing.T) {
+ t.Parallel()
for i, test := range []struct {
integral testquad.Integral
n int

MODIFY
integrate/simpsons_test.go
integrate/simpsons_test.go
@@ -14,6 +14,7 @@ import (
)
func TestSimpsons(t *testing.T) {
+ t.Parallel()
rnd := rand.New(rand.NewSource(1))
for i, test := range []struct {
integral testquad.Integral

MODIFY
integrate/trapezoidal_test.go
integrate/trapezoidal_test.go
@@ -14,6 +14,7 @@ import (
)
func TestTrapezoidal(t *testing.T) {
+ t.Parallel()
rnd := rand.New(rand.NewSource(1))
for i, test := range []struct {
integral testquad.Integral

integrate: make tests parallel