1 // Copyright 2018 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.
12 "golang.org/x/tools/go/analysis/analysistest"
13 "golang.org/x/tools/go/analysis/passes/buildssa"
16 func Test(t *testing.T) {
17 testdata := analysistest.TestData()
18 result := analysistest.Run(t, testdata, buildssa.Analyzer, "a")[0].Result
20 ssainfo := result.(*buildssa.SSA)
21 got := fmt.Sprint(ssainfo.SrcFuncs)
22 want := `[a.Fib (a.T).fib]`
24 t.Errorf("SSA.SrcFuncs = %s, want %s", got, want)
25 for _, f := range ssainfo.SrcFuncs {