• Martin Möhrmann's avatar
    strconv: fix ParseUint return value on range overflow · fc6b74ce
    Martin Möhrmann authored
    If the value corresponding to the input string cannot be
    represented by an unsigned integer of the given size,
    err.Err = ErrRange and the returned value is the maximum
    magnitude unsigned integer of the appropriate bitSize.
    This is consistent with ParseInt's behavior and the documentation.
    
    Expand tests to test 32 bit test value tables with bitsize 32 set.
    These tests fail without the fix in this CL.
    
    Fixes #21278
    
    Change-Id: I8aab39279ec3e31905fcbf582a916cbf6d9b95da
    Reviewed-on: https://go-review.googlesource.com/55134
    Run-TryBot: Martin Möhrmann <moehrmann@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarJoe Tsai <thebrokentoaster@gmail.com>
    fc6b74ce
Name
Last commit
Last update
..
testdata Loading commit data...
atob.go Loading commit data...
atob_test.go Loading commit data...
atof.go Loading commit data...
atof_test.go Loading commit data...
atoi.go Loading commit data...
atoi_test.go Loading commit data...
decimal.go Loading commit data...
decimal_test.go Loading commit data...
doc.go Loading commit data...
example_test.go Loading commit data...
extfloat.go Loading commit data...
fp_test.go Loading commit data...
ftoa.go Loading commit data...
ftoa_test.go Loading commit data...
internal_test.go Loading commit data...
isprint.go Loading commit data...
itoa.go Loading commit data...
itoa_test.go Loading commit data...
makeisprint.go Loading commit data...
quote.go Loading commit data...
quote_test.go Loading commit data...
strconv_test.go Loading commit data...