mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-11 18:49:14 -06:00
Remove types.Describe from asserts (#1691)
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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{}}
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user