mirror of
https://github.com/gonum/gonum.git
synced 2025-10-06 23:52:47 +08:00
graph/layout: handle difference between pure go and asm kernels
This commit is contained in:
12
graph/layout/isomap_noasm_test.go
Normal file
12
graph/layout/isomap_noasm_test.go
Normal file
@@ -0,0 +1,12 @@
|
||||
// Copyright ©2019 The Gonum Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build noasm appengine safe
|
||||
|
||||
package layout
|
||||
|
||||
// Change the testdata path for calculations done without assembly kernels.
|
||||
func init() {
|
||||
tag = "_noasm"
|
||||
}
|
@@ -15,6 +15,10 @@ import (
|
||||
"gonum.org/v1/plot/vg"
|
||||
)
|
||||
|
||||
// tag is modified in isomap_noasm_test.go to "_noasm" when any
|
||||
// build tag prevents use of the assembly numerical kernels.
|
||||
var tag string
|
||||
|
||||
var isomapR2Tests = []struct {
|
||||
name string
|
||||
g graph.Graph
|
||||
@@ -160,7 +164,7 @@ func TestIsomapR2(t *testing.T) {
|
||||
}
|
||||
p.Add(render{o})
|
||||
p.HideAxes()
|
||||
path := filepath.Join("testdata", test.name+".png")
|
||||
path := filepath.Join("testdata", test.name+tag+".png")
|
||||
err = p.Save(10*vg.Centimeter, 10*vg.Centimeter, path)
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error: %v", err)
|
||||
|
BIN
graph/layout/testdata/line_isomap_noasm_golden.png
vendored
Normal file
BIN
graph/layout/testdata/line_isomap_noasm_golden.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
BIN
graph/layout/testdata/sheet_isomap_noasm_golden.png
vendored
Normal file
BIN
graph/layout/testdata/sheet_isomap_noasm_golden.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
BIN
graph/layout/testdata/square_isomap_noasm_golden.png
vendored
Normal file
BIN
graph/layout/testdata/square_isomap_noasm_golden.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.4 KiB |
BIN
graph/layout/testdata/tetrahedron_isomap_noasm_golden.png
vendored
Normal file
BIN
graph/layout/testdata/tetrahedron_isomap_noasm_golden.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
graph/layout/testdata/tube_isomap_noasm_golden.png
vendored
Normal file
BIN
graph/layout/testdata/tube_isomap_noasm_golden.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
BIN
graph/layout/testdata/wp_page_isomap_noasm_golden.png
vendored
Normal file
BIN
graph/layout/testdata/wp_page_isomap_noasm_golden.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
Reference in New Issue
Block a user