Skip to content

Commit

Permalink
fixed UT
Browse files Browse the repository at this point in the history
  • Loading branch information
val06 committed Oct 16, 2024
1 parent 10c0e75 commit 38b7035
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,14 @@ func TestLoadELF(t *testing.T) {
t.Fatal(err)
}
t.Cleanup(func() { _ = f.Close() })

m := &Manager{
state: reset,
}
if err = m.LoadELF(f); err != nil {
t.Errorf("LoadELF() error = %v, wantErr %v", err, nil)
t.Errorf("LoadELF() error = %v, expected: %v", err, nil)
}
if err = m.LoadELF(f); errors.Is(err, ErrManagerELFLoaded) {
t.Errorf("LoadELF() error = %v, wantErr %v", err, ErrManagerELFLoaded)
if err = m.LoadELF(f); !errors.Is(err, ErrManagerELFLoaded) {
t.Errorf("LoadELF() error = %v, expected: %v", err, ErrManagerELFLoaded)
}
}

0 comments on commit 38b7035

Please sign in to comment.