Skip to content

Commit

Permalink
Add test for 0.25 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
0x6e6562 committed Feb 25, 2014
1 parent cc2dfe7 commit 168ddfa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions marshal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"time"
)

var quarter, _ = inf.NewDec(0, 0).SetString("0.25")

var marshalTests = []struct {
Info *TypeInfo
Data []byte
Expand Down Expand Up @@ -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"),
Expand Down

0 comments on commit 168ddfa

Please sign in to comment.