-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't workinginvalidThis doesn't seem rightThis doesn't seem right
Description
var _, err = base64.RawURLEncoding.DecodeString("SGVsbG8gV29ybGQK@")
verify.That(t, err).IsNotNil()Current output:
expected: value is not nil
error: value of type 'base64.CorruptInputError' can never be nil
value: 16
Because base64.CorruptInputError is a non-nillable int64 derived type that implements the error interface and returned as an error type by DecodeString(), it should be testable with .IsNil() / .IsNotNil() and be considered not nil. Instead, .IsNotNil() flags this as a programming error because of the underlying type.
Expected behavior:
.IsNotNil(), commonly used for testing that a non-specific error is returned, should pass for any value of a non-nillable types, like numbers and strings.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinginvalidThis doesn't seem rightThis doesn't seem right