Scanning "0" with detected base did not actually set the nat to 0.
R=gri
CC=golang-dev
https://golang.org/cl/
4923050
func TestSetString(t *testing.T) {
tmp := new(Int)
for i, test := range stringTests {
+ // initialize to a non-zero value so that issues with parsing
+ // 0 are detected
+ tmp.SetInt64(1234567890)
n1, ok1 := new(Int).SetString(test.in, test.base)
n2, ok2 := tmp.SetString(test.in, test.base)
expected := NewInt(test.val)
}
}
case os.EOF:
- return z, 10, nil
+ return z.make(0), 10, nil
default:
return z, 10, err
}