graph/layout: handle difference between pure go and asm kernels

This commit is contained in:
Dan Kortschak
2019-08-08 14:26:45 +09:30
parent 2dfa205328
commit 99e48c9b02
8 changed files with 17 additions and 1 deletions

View File

@@ -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)