mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-23 09:52:01 +01:00
v0.5: (BREAKING) new syntax for set_headers and hide_headers, updated label parser, error.Nil().String() will now return 'nil', better readme
This commit is contained in:
@@ -19,6 +19,16 @@ func TestErrorIs(t *testing.T) {
|
||||
|
||||
AssertEq(t, Invalid("foo", "bar").Is(ErrInvalid), true)
|
||||
AssertEq(t, Invalid("foo", "bar").Is(ErrFailure), false)
|
||||
|
||||
AssertEq(t, Nil().Is(nil), true)
|
||||
AssertEq(t, Nil().Is(ErrInvalid), false)
|
||||
AssertEq(t, Invalid("foo", "bar").Is(nil), false)
|
||||
}
|
||||
|
||||
func TestNil(t *testing.T) {
|
||||
AssertEq(t, Nil().IsNil(), true)
|
||||
AssertEq(t, Nil().IsNotNil(), false)
|
||||
AssertEq(t, Nil().Error(), "nil")
|
||||
}
|
||||
|
||||
func TestErrorSimple(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user