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 "honnef.co/go/tools/internal/passes/buildir"
16 func Test(t *testing.T) {
17 testdata := analysistest.TestData()
18 result := analysistest.Run(t, testdata, buildir.Analyzer, "a")[0].Result
20 irinfo := result.(*buildir.IR)
21 got := fmt.Sprint(irinfo.SrcFuncs)
22 want := `[a.init a.Fib (a.T).fib]`
24 t.Errorf("IR.SrcFuncs = %s, want %s", got, want)
25 for _, f := range irinfo.SrcFuncs {