diff --git a/marshal_test.go b/marshal_test.go index d7c8a224b..2f0480afd 100644 --- a/marshal_test.go +++ b/marshal_test.go @@ -10,6 +10,8 @@ import ( "time" ) +var quarter, _ = inf.NewDec(0, 0).SetString("0.25") + var marshalTests = []struct { Info *TypeInfo Data []byte @@ -128,6 +130,16 @@ var marshalTests = []struct { []byte("\x00\x00\x00\x00\x00"), inf.NewDec(0, 0), }, + { + &TypeInfo{Type: TypeDecimal}, + []byte("\x00\x00\x00\x00\x64"), + inf.NewDec(100, 0), + }, + { + &TypeInfo{Type: TypeDecimal}, + []byte("\x00\x00\x00\x02\x19"), + quarter, + }, { &TypeInfo{Type: TypeTimestamp}, []byte("\x00\x00\x01\x40\x77\x16\xe1\xb8"),