func TestFindSymbols(t *testing.T) {
	type testcase struct {
		query, syms string
		want        []plugin.Sym
	}
	testsyms := `0000000000001000 t lineA001
0000000000001000 t lineA002
0000000000001000 t line1000
0000000000002000 t line200A
0000000000002000 t line2000
0000000000002000 t line200B
0000000000003000 t line3000
0000000000003000 t _ZNK4DumbclEPKc
0000000000003000 t lineB00C
0000000000003000 t line300D
0000000000004000 t _the_end
	`
	testcases := []testcase{
		{
			"line.*[AC]",
			testsyms,
			[]plugin.Sym{
				{Name: []string{"lineA001"}, File: "object.o", Start: 0x1000, End: 0x1FFF},
				{Name: []string{"line200A"}, File: "object.o", Start: 0x2000, End: 0x2FFF},
				{Name: []string{"lineB00C"}, File: "object.o", Start: 0x3000, End: 0x3FFF},
			},
		},
		{
			"Dumb::operator",
			testsyms,
			[]plugin.Sym{
				{Name: []string{"Dumb::operator()(char const*) const"}, File: "object.o", Start: 0x3000, End: 0x3FFF},
			},
		},
	}
	for _, tc := range testcases {
		syms, err := findSymbols([]byte(tc.syms), "object.o", regexp.MustCompile(tc.query), 0)
		if err != nil {
			t.Fatalf("%q: findSymbols: %v", tc.query, err)
		}
		if err := checkSymbol(syms, tc.want); err != nil {
			t.Errorf("%q: %v", tc.query, err)
		}
	}
}
TestFindSymbols tests the FindSymbols routine using a hardcoded nm output.
package binutils
import (
	"fmt"
	"regexp"
	"testing"
	"github.com/google/pprof/internal/plugin"
)