(t *testing.T)
| 541 | } |
| 542 | |
| 543 | func TestOpenMalformedELF(t *testing.T) { |
| 544 | // Test that opening a malformed ELF file will report an error containing |
| 545 | // the word "ELF". |
| 546 | bu := &Binutils{} |
| 547 | _, err := bu.Open(filepath.Join("testdata", "malformed_elf"), 0, 0, 0, "") |
| 548 | if err == nil { |
| 549 | t.Fatalf("Open: unexpected success") |
| 550 | } |
| 551 | |
| 552 | if !strings.Contains(err.Error(), "ELF") { |
| 553 | t.Errorf("Open: got %v, want error containing 'ELF'", err) |
| 554 | } |
| 555 | } |
| 556 | |
| 557 | func TestOpenMalformedMachO(t *testing.T) { |
| 558 | // Test that opening a malformed Mach-O file will report an error containing |
nothing calls this directly
no test coverage detected
searching dependent graphs…