summaryrefslogtreecommitdiff
path: root/src/pkg/big/int_test.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-09-13 12:00:31 +0200
committerOndřej Surý <ondrej@sury.org>2011-09-13 12:00:31 +0200
commit04f99b387021a8ce32a8795360cba9beaf986a81 (patch)
treef806c632c5dec5bb83190946d6d8ff8bd33c0e57 /src/pkg/big/int_test.go
parentd9514677ddaa705852cbba5034cb6d284261b53a (diff)
downloadgolang-04f99b387021a8ce32a8795360cba9beaf986a81.tar.gz
Imported Upstream version 2011.09.07upstream-weekly/2011.09.07
Diffstat (limited to 'src/pkg/big/int_test.go')
-rw-r--r--[-rwxr-xr-x]src/pkg/big/int_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkg/big/int_test.go b/src/pkg/big/int_test.go
index 03446d6ae..b2e169217 100755..100644
--- a/src/pkg/big/int_test.go
+++ b/src/pkg/big/int_test.go
@@ -301,6 +301,9 @@ func TestGetString(t *testing.T) {
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)