summaryrefslogtreecommitdiffstats
path: root/libgo/go/reflect/tostring_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/reflect/tostring_test.go')
-rw-r--r--libgo/go/reflect/tostring_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/libgo/go/reflect/tostring_test.go b/libgo/go/reflect/tostring_test.go
index 5f5c52b778a..7486a9bfca3 100644
--- a/libgo/go/reflect/tostring_test.go
+++ b/libgo/go/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())
}
OpenPOWER on IntegriCloud