From 4c91c0d07b7da552a57ec2b7a33b1d6b46d4889c Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Fri, 30 Jan 2015 15:57:38 -0800 Subject: math/big: build Float.Format on top of Float.Append Change-Id: I444eec24467f827caa5c88a1c5ae5bce92508b98 Reviewed-on: https://go-review.googlesource.com/3750 Reviewed-by: Alan Donovan --- src/math/big/float_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/math/big/float_test.go') diff --git a/src/math/big/float_test.go b/src/math/big/float_test.go index 3281f2745a..ec67a6d606 100644 --- a/src/math/big/float_test.go +++ b/src/math/big/float_test.go @@ -205,7 +205,7 @@ func TestFloatSetUint64(t *testing.T) { } { f := new(Float).SetUint64(want) if got := f.Uint64(); got != want { - t.Errorf("got %d (%s); want %d", got, f.pstring(), want) + t.Errorf("got %d (%s); want %d", got, f.Format('p', 0), want) } } } @@ -227,7 +227,7 @@ func TestFloatSetInt64(t *testing.T) { } f := new(Float).SetInt64(want) if got := f.Int64(); got != want { - t.Errorf("got %d (%s); want %d", got, f.pstring(), want) + t.Errorf("got %d (%s); want %d", got, f.Format('p', 0), want) } } } @@ -251,7 +251,7 @@ func TestFloatSetFloat64(t *testing.T) { } f := new(Float).SetFloat64(want) if got, _ := f.Float64(); got != want { - t.Errorf("got %g (%s); want %g", got, f.pstring(), want) + t.Errorf("got %g (%s); want %g", got, f.Format('p', 0), want) } } } @@ -677,7 +677,7 @@ func TestFromBits(t *testing.T) { {append([]int{2, 1, 0} /* 7 */, []int{3, 1} /* 10 */ ...), "0x.88p5" /* 17 */}, } { f := fromBits(test.bits...) - if got := f.pstring(); got != test.want { + if got := f.Format('p', 0); got != test.want { t.Errorf("setBits(%v) = %s; want %s", test.bits, got, test.want) } } -- cgit v1.3-5-g45d5