From a4f12baa7ff939a266b4c58536e4de9d99ce649c Mon Sep 17 00:00:00 2001 From: Rafael Weinstein Date: Wed, 1 Jun 2016 12:35:49 -0700 Subject: [PATCH] Remove types.Describe from asserts (#1691) --- types/assert_type.go | 2 +- types/ref.go | 2 +- types/value_encoder.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/assert_type.go b/types/assert_type.go index 7cf305d98b..cb6f1f7627 100644 --- a/types/assert_type.go +++ b/types/assert_type.go @@ -8,7 +8,7 @@ import "github.com/attic-labs/noms/d" func assertSubtype(t *Type, v Value) { if !isSubtype(t, v.Type()) { - d.Chk.Fail("Invalid type", "Expected: %s, found: %s", t.Describe(), v.Type().Describe()) + d.Chk.Fail("Invalid type") } } diff --git a/types/ref.go b/types/ref.go index 7736cdefb6..8ed3ba03ad 100644 --- a/types/ref.go +++ b/types/ref.go @@ -22,7 +22,7 @@ func NewRef(v Value) Ref { // Constructs a Ref directly from struct properties. This should not be used outside decoding and testing within the types package. func constructRef(t *Type, target hash.Hash, height uint64) Ref { - d.Chk.Equal(RefKind, t.Kind(), "Invalid type. Expected: RefKind, found: %s", t.Describe()) + d.Chk.Equal(RefKind, t.Kind()) d.Chk.NotEqual(ValueType, t.Desc.(CompoundDesc).ElemTypes[0]) return Ref{target, height, t, &hash.Hash{}} } diff --git a/types/value_encoder.go b/types/value_encoder.go index 7b4c7dc3d6..fff5d56f5c 100644 --- a/types/value_encoder.go +++ b/types/value_encoder.go @@ -50,7 +50,7 @@ func (w *valueEncoder) writeType(t *Type, parentStructTypes []*Type) { panic("unreached") default: w.writeKind(k) - d.Chk.True(IsPrimitiveKind(k), "Kind: %v Desc: %s\n", t.Kind(), t.Describe()) + d.Chk.True(IsPrimitiveKind(k)) } }