Skip to content

Commit

Permalink
bump to v3.1.9 (fixed a test case)
Browse files Browse the repository at this point in the history
  • Loading branch information
hedzr committed Sep 29, 2023
1 parent 8165d0f commit 1a5e18f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion asisunwrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ func TestErrorCodeIs(t *testing.T) {
//

_, err = strconv.ParseInt("hello", 10, 64)
if Is(err, strconv.ErrSyntax) || Is(err, strconv.ErrRange) {
if !Is(err, strconv.ErrRange) {
t.Logf("'%v' recoganized OK.", err)
} else {
t.Fatalf("'%+v' CANNOT be recoganized", err)
}

// for v1.11, Is(err, strconv.ErrSyntax) should be false
// and for v1.12+, Is(err, strconv.ErrSyntax) must be true
}

// TestErrorsIs _
Expand Down

0 comments on commit 1a5e18f

Please sign in to comment.