Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Eun committed Jan 24, 2024
1 parent 0b2a65e commit 7d7dfc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func TestUnwrap(t *testing.T) {
})
t.Run("wrapped no error", func(t *testing.T) {
err := serrors.Wrap(nil, "error2")
NotEqual(t, nil, errors.Unwrap(err))
Equal(t, nil, errors.Unwrap(err))
})
}

Expand All @@ -207,16 +207,16 @@ func TestAs(t *testing.T) {

var cause2 *net.OpError
Equal(t, false, errors.As(err, &cause2))
NotEqual(t, nil, cause2)
Equal(t, nil, cause2)
})
t.Run("wrapped no error", func(t *testing.T) {
err := serrors.Wrap(nil, "error")
var cause1 *net.AddrError
Equal(t, false, errors.As(err, &cause1))
NotEqual(t, nil, cause1)
Equal(t, nil, cause1)

var cause2 *net.OpError
Equal(t, false, errors.As(err, &cause2))
NotEqual(t, nil, cause2)
Equal(t, nil, cause2)
})
}
2 changes: 1 addition & 1 deletion stack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func buildStackFrameFromMarker(t *testing.T, fileName, marker string) serrors.St
// Get the function name and line number
pos := fileSet.Position(v.Slash)
funcName := findEnclosingFunc(fileSet, file, pos.Offset)
NotEqual(t, nil, result)
Equal(t, nil, result)
result = &serrors.StackFrame{
File: fileName,
Func: packageName + "." + funcName,
Expand Down

0 comments on commit 7d7dfc5

Please sign in to comment.