diff options
| author | Robert Griesemer <gri@golang.org> | 2015-01-30 15:57:38 -0800 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2015-02-03 18:43:51 +0000 |
| commit | 4c91c0d07b7da552a57ec2b7a33b1d6b46d4889c (patch) | |
| tree | 71a9ab4b0d1bfd262d8b0594b39cde32b4713ad2 /src/math/big/float_test.go | |
| parent | 2e5b065ac24912be82e7082eeb136afd18d9734b (diff) | |
| download | go-4c91c0d07b7da552a57ec2b7a33b1d6b46d4889c.tar.xz | |
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 <adonovan@google.com>
Diffstat (limited to 'src/math/big/float_test.go')
| -rw-r--r-- | src/math/big/float_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
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) } } |
