aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/gob/codec_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoding/gob/codec_test.go')
-rw-r--r--src/encoding/gob/codec_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/encoding/gob/codec_test.go b/src/encoding/gob/codec_test.go
index 8efcdc78ff..b772171f93 100644
--- a/src/encoding/gob/codec_test.go
+++ b/src/encoding/gob/codec_test.go
@@ -970,7 +970,7 @@ func TestBadRecursiveType(t *testing.T) {
err := NewEncoder(b).Encode(&rec)
if err == nil {
t.Error("expected error; got none")
- } else if strings.Index(err.Error(), "recursive") < 0 {
+ } else if !strings.Contains(err.Error(), "recursive") {
t.Error("expected recursive type error; got", err)
}
// Can't test decode easily because we can't encode one, so we can't pass one to a Decoder.