summaryrefslogtreecommitdiff
path: root/src/pkg/reflect/tostring_test.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2012-01-30 15:38:19 +0100
committerOndřej Surý <ondrej@sury.org>2012-01-30 15:38:19 +0100
commit4cecda6c347bd6902b960c6a35a967add7070b0d (patch)
treea462e224ff41ec9f3eb1a0b6e815806f9e8804ad /src/pkg/reflect/tostring_test.go
parent6c7ca6e4d4e26e4c8cbe0d183966011b3b088a0a (diff)
downloadgolang-4cecda6c347bd6902b960c6a35a967add7070b0d.tar.gz
Imported Upstream version 2012.01.27upstream-weekly/2012.01.27
Diffstat (limited to 'src/pkg/reflect/tostring_test.go')
-rw-r--r--src/pkg/reflect/tostring_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/reflect/tostring_test.go b/src/pkg/reflect/tostring_test.go
index 5f5c52b77..7486a9bfc 100644
--- a/src/pkg/reflect/tostring_test.go
+++ b/src/pkg/reflect/tostring_test.go
@@ -23,14 +23,14 @@ func valueToString(val Value) string {
typ := val.Type()
switch val.Kind() {
case Int, Int8, Int16, Int32, Int64:
- return strconv.Itoa64(val.Int())
+ return strconv.FormatInt(val.Int(), 10)
case Uint, Uint8, Uint16, Uint32, Uint64, Uintptr:
- return strconv.Uitoa64(val.Uint())
+ return strconv.FormatUint(val.Uint(), 10)
case Float32, Float64:
- return strconv.Ftoa64(val.Float(), 'g', -1)
+ return strconv.FormatFloat(val.Float(), 'g', -1, 64)
case Complex64, Complex128:
c := val.Complex()
- return strconv.Ftoa64(real(c), 'g', -1) + "+" + strconv.Ftoa64(imag(c), 'g', -1) + "i"
+ return strconv.FormatFloat(real(c), 'g', -1, 64) + "+" + strconv.FormatFloat(imag(c), 'g', -1, 64) + "i"
case String:
return val.String()
case Bool:
@@ -88,7 +88,7 @@ func valueToString(val Value) string {
return typ.String() + "(" + valueToString(val.Elem()) + ")"
case Func:
v := val
- return typ.String() + "(" + strconv.Uitoa64(uint64(v.Pointer())) + ")"
+ return typ.String() + "(" + strconv.FormatUint(uint64(v.Pointer()), 10) + ")"
default:
panic("valueToString: can't print type " + typ.String())
}