graph/layout: reduce code duplication in layout tests
MODIFY
graph/layout/eades_test.go
graph/layout/eades_test.go
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package layout
+package layout_test
import (
"path/filepath"
@@ -15,6 +15,8 @@ import (
"gonum.org/v1/gonum/spatial/r2"
"gonum.org/v1/plot"
"gonum.org/v1/plot/vg"
+
+ . "gonum.org/v1/gonum/graph/layout"
)
var eadesR2Tests = []struct {

MODIFY
graph/layout/isomap_386_test.go
graph/layout/isomap_386_test.go
// +build 386
-package layout
+package layout_test
// Change the testdata path for calculations done on 386.
func init() {

MODIFY
graph/layout/isomap_arm64_test.go
graph/layout/isomap_arm64_test.go
// +build arm64
-package layout
+package layout_test
// Change the testdata path for calculations done on arm64.
func init() {

MODIFY
graph/layout/isomap_noasm_test.go
graph/layout/isomap_noasm_test.go
// +build noasm gccgo safe
-package layout
+package layout_test
// Change the testdata path for calculations done without assembly kernels.
func init() {

MODIFY
graph/layout/isomap_test.go
graph/layout/isomap_test.go
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package layout
+package layout_test
import (
"path/filepath"
@@ -13,6 +13,8 @@ import (
"gonum.org/v1/gonum/spatial/r2"
"gonum.org/v1/plot"
"gonum.org/v1/plot/vg"
+
+ . "gonum.org/v1/gonum/graph/layout"
)
var (

MODIFY
graph/layout/layout_test.go
graph/layout/layout_test.go
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package layout
+package layout_test
import (
"bytes"

graph/layout: reduce code duplication in layout tests