(got []*plugin.Sym, want []plugin.Sym)
| 72 | } |
| 73 | |
| 74 | func checkSymbol(got []*plugin.Sym, want []plugin.Sym) error { |
| 75 | if len(got) != len(want) { |
| 76 | return fmt.Errorf("unexpected number of symbols %d (want %d)", len(got), len(want)) |
| 77 | } |
| 78 | |
| 79 | for i, g := range got { |
| 80 | w := want[i] |
| 81 | if len(g.Name) != len(w.Name) { |
| 82 | return fmt.Errorf("names, got %d, want %d", len(g.Name), len(w.Name)) |
| 83 | } |
| 84 | for n := range g.Name { |
| 85 | if g.Name[n] != w.Name[n] { |
| 86 | return fmt.Errorf("name %d, got %q, want %q", n, g.Name[n], w.Name[n]) |
| 87 | } |
| 88 | } |
| 89 | if g.File != w.File { |
| 90 | return fmt.Errorf("filename, got %q, want %q", g.File, w.File) |
| 91 | } |
| 92 | if g.Start != w.Start { |
| 93 | return fmt.Errorf("start address, got %#x, want %#x", g.Start, w.Start) |
| 94 | } |
| 95 | if g.End != w.End { |
| 96 | return fmt.Errorf("end address, got %#x, want %#x", g.End, w.End) |
| 97 | } |
| 98 | } |
| 99 | return nil |
| 100 | } |
| 101 | |
| 102 | // TestFunctionAssembly tests the FunctionAssembly routine by using a |
| 103 | // fake objdump script. |
no outgoing calls
no test coverage detected
searching dependent graphs…