aboutsummaryrefslogtreecommitdiff
path: root/src/math/big/ratmarsh_test.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2015-09-25 16:35:54 -0700
committerRobert Griesemer <gri@golang.org>2015-09-29 00:21:45 +0000
commit38c5fd5cf872cf2eabad1361342097e11d292c91 (patch)
treedda8a302101fca4eafc1119bcddc782b5434749c /src/math/big/ratmarsh_test.go
parent02e8ec008ca80e6b7dd93410aa9abac3a906dee4 (diff)
downloadgo-38c5fd5cf872cf2eabad1361342097e11d292c91.tar.gz
go-38c5fd5cf872cf2eabad1361342097e11d292c91.zip
math/big: implement Float.Text(Un)Marshaler
Fixes #12256. Change-Id: Ie4a3337996da5c060b27530b076048ffead85f3b Reviewed-on: https://go-review.googlesource.com/15040 Reviewed-by: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'src/math/big/ratmarsh_test.go')
-rw-r--r--src/math/big/ratmarsh_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/math/big/ratmarsh_test.go b/src/math/big/ratmarsh_test.go
index 2e91e38e11..351d109f8d 100644
--- a/src/math/big/ratmarsh_test.go
+++ b/src/math/big/ratmarsh_test.go
@@ -22,10 +22,12 @@ func TestRatGobEncoding(t *testing.T) {
tx.SetString(test + ".14159265")
if err := enc.Encode(&tx); err != nil {
t.Errorf("encoding of %s failed: %s", &tx, err)
+ continue
}
var rx Rat
if err := dec.Decode(&rx); err != nil {
t.Errorf("decoding of %s failed: %s", &tx, err)
+ continue
}
if rx.Cmp(&tx) != 0 {
t.Errorf("transmission of %s failed: got %s want %s", &tx, &rx, &tx)
@@ -55,7 +57,7 @@ func TestGobEncodingNilRatInSlice(t *testing.T) {
}
var zero Rat
if out[0].Cmp(&zero) != 0 {
- t.Errorf("transmission of (*Int)(nill) failed: got %s want 0", out)
+ t.Fatalf("transmission of (*Int)(nil) failed: got %s want 0", out)
}
}