Remove types.Describe from asserts (#1691)

This commit is contained in:
Rafael Weinstein
2016-06-01 12:35:49 -07:00
parent ba60df1743
commit a4f12baa7f
3 changed files with 3 additions and 3 deletions

View File

@@ -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")
}
}

View File

@@ -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{}}
}

View File

@@ -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))
}
}