Skip to content

Commit

Permalink
#26
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandr Sokolovskii committed Jan 4, 2019
1 parent 9561946 commit e02fade
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions binary/v1/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,8 @@ func TestWriteOUUID(t *testing.T) {
args: args{
v: v,
},
want: []byte{10, 0xd6, 0x58, 0x9d, 0xa7, 0xf8, 0xb1, 0x46, 0x87, 0xb5,
0xbd, 0x2d, 0xdc, 0x73, 0x62, 0xa4, 0xa4},
want: []byte{10, 0x87, 0x46, 0xb1, 0xf8, 0xa7, 0x9d, 0x58, 0xd6, 0xa4,
0xa4, 0x62, 0x73, 0xdc, 0x2d, 0xbd, 0xb5},
},
}
for _, tt := range tests {
Expand Down Expand Up @@ -961,9 +961,9 @@ func TestWriteOArrayOUUIDs(t *testing.T) {
v: []uuid.UUID{uid1, uid2, uid3},
},
want: []byte{21, 3, 0, 0, 0,
10, 0xa0, 0xc0, 0x7c, 0x4c, 0x7e, 0x2e, 0x43, 0xd3, 0x8e, 0xda, 0x17, 0x68, 0x81, 0x47, 0x7c, 0x81,
10, 0x40, 0x15, 0xb5, 0x5f, 0x72, 0xf0, 0x48, 0xa4, 0x8d, 0x1, 0x64, 0x16, 0x8d, 0x50, 0xf6, 0x27,
10, 0x82, 0x7d, 0x1b, 0xf0, 0xc5, 0xd4, 0x44, 0x43, 0x87, 0x8, 0xd8, 0xb5, 0xde, 0x31, 0xfe, 0x74},
10, 0xd3, 0x43, 0x2e, 0x7e, 0x4c, 0x7c, 0xc0, 0xa0, 0x81, 0x7c, 0x47, 0x81, 0x68, 0x17, 0xda, 0x8e,
10, 0xa4, 0x48, 0xf0, 0x72, 0x5f, 0xb5, 0x15, 0x40, 0x27, 0xf6, 0x50, 0x8d, 0x16, 0x64, 0x1, 0x8d,
10, 0x43, 0x44, 0xd4, 0xc5, 0xf0, 0x1b, 0x7d, 0x82, 0x74, 0xfe, 0x31, 0xde, 0xb5, 0xd8, 0x8, 0x87},
},
}
for _, tt := range tests {
Expand Down Expand Up @@ -1398,16 +1398,16 @@ func TestWriteObject(t *testing.T) {
args: args{
o: uuidVal,
},
want: []byte{10, 0xd6, 0x58, 0x9d, 0xa7, 0xf8, 0xb1, 0x46, 0x87, 0xb5,
0xbd, 0x2d, 0xdc, 0x73, 0x62, 0xa4, 0xa4},
want: []byte{10, 0x87, 0x46, 0xb1, 0xf8, 0xa7, 0x9d, 0x58, 0xd6, 0xa4,
0xa4, 0x62, 0x73, 0xdc, 0x2d, 0xbd, 0xb5},
},
{
name: "pointer to UUID",
args: args{
o: &uuidVal,
},
want: []byte{10, 0xd6, 0x58, 0x9d, 0xa7, 0xf8, 0xb1, 0x46, 0x87, 0xb5,
0xbd, 0x2d, 0xdc, 0x73, 0x62, 0xa4, 0xa4},
want: []byte{10, 0x87, 0x46, 0xb1, 0xf8, 0xa7, 0x9d, 0x58, 0xd6, 0xa4,
0xa4, 0x62, 0x73, 0xdc, 0x2d, 0xbd, 0xb5},
},
{
name: "Date",
Expand Down Expand Up @@ -1577,19 +1577,19 @@ func TestWriteObject(t *testing.T) {
o: []uuid.UUID{uuidVal1, uuidVal2, uuidVal3},
},
want: []byte{21, 3, 0, 0, 0,
10, 0xa0, 0xc0, 0x7c, 0x4c, 0x7e, 0x2e, 0x43, 0xd3, 0x8e, 0xda, 0x17, 0x68, 0x81, 0x47, 0x7c, 0x81,
10, 0x40, 0x15, 0xb5, 0x5f, 0x72, 0xf0, 0x48, 0xa4, 0x8d, 0x1, 0x64, 0x16, 0x8d, 0x50, 0xf6, 0x27,
10, 0x82, 0x7d, 0x1b, 0xf0, 0xc5, 0xd4, 0x44, 0x43, 0x87, 0x8, 0xd8, 0xb5, 0xde, 0x31, 0xfe, 0x74},
10, 0xd3, 0x43, 0x2e, 0x7e, 0x4c, 0x7c, 0xc0, 0xa0, 0x81, 0x7c, 0x47, 0x81, 0x68, 0x17, 0xda, 0x8e,
10, 0xa4, 0x48, 0xf0, 0x72, 0x5f, 0xb5, 0x15, 0x40, 0x27, 0xf6, 0x50, 0x8d, 0x16, 0x64, 0x1, 0x8d,
10, 0x43, 0x44, 0xd4, 0xc5, 0xf0, 0x1b, 0x7d, 0x82, 0x74, 0xfe, 0x31, 0xde, 0xb5, 0xd8, 0x8, 0x87},
},
{
name: "pointer to UUID array",
args: args{
o: &[]uuid.UUID{uuidVal1, uuidVal2, uuidVal3},
},
want: []byte{21, 3, 0, 0, 0,
10, 0xa0, 0xc0, 0x7c, 0x4c, 0x7e, 0x2e, 0x43, 0xd3, 0x8e, 0xda, 0x17, 0x68, 0x81, 0x47, 0x7c, 0x81,
10, 0x40, 0x15, 0xb5, 0x5f, 0x72, 0xf0, 0x48, 0xa4, 0x8d, 0x1, 0x64, 0x16, 0x8d, 0x50, 0xf6, 0x27,
10, 0x82, 0x7d, 0x1b, 0xf0, 0xc5, 0xd4, 0x44, 0x43, 0x87, 0x8, 0xd8, 0xb5, 0xde, 0x31, 0xfe, 0x74},
10, 0xd3, 0x43, 0x2e, 0x7e, 0x4c, 0x7c, 0xc0, 0xa0, 0x81, 0x7c, 0x47, 0x81, 0x68, 0x17, 0xda, 0x8e,
10, 0xa4, 0x48, 0xf0, 0x72, 0x5f, 0xb5, 0x15, 0x40, 0x27, 0xf6, 0x50, 0x8d, 0x16, 0x64, 0x1, 0x8d,
10, 0x43, 0x44, 0xd4, 0xc5, 0xf0, 0x1b, 0x7d, 0x82, 0x74, 0xfe, 0x31, 0xde, 0xb5, 0xd8, 0x8, 0x87},
},
{
name: "date array",
Expand Down Expand Up @@ -1990,8 +1990,8 @@ func Test_response_ReadUUID(t *testing.T) {
{
name: "1",
r: bytes.NewBuffer(
[]byte{0xd6, 0x58, 0x9d, 0xa7, 0xf8, 0xb1, 0x46, 0x87, 0xb5,
0xbd, 0x2d, 0xdc, 0x73, 0x62, 0xa4, 0xa4}),
[]byte{0x87, 0x46, 0xb1, 0xf8, 0xa7, 0x9d, 0x58, 0xd6, 0xa4,
0xa4, 0x62, 0x73, 0xdc, 0x2d, 0xbd, 0xb5}),
want: v,
},
}
Expand Down Expand Up @@ -2303,9 +2303,9 @@ func Test_response_ReadArrayOUUIDs(t *testing.T) {
{
name: "1",
r: bytes.NewBuffer([]byte{3, 0, 0, 0,
10, 0xa0, 0xc0, 0x7c, 0x4c, 0x7e, 0x2e, 0x43, 0xd3, 0x8e, 0xda, 0x17, 0x68, 0x81, 0x47, 0x7c, 0x81,
10, 0x40, 0x15, 0xb5, 0x5f, 0x72, 0xf0, 0x48, 0xa4, 0x8d, 0x1, 0x64, 0x16, 0x8d, 0x50, 0xf6, 0x27,
10, 0x82, 0x7d, 0x1b, 0xf0, 0xc5, 0xd4, 0x44, 0x43, 0x87, 0x8, 0xd8, 0xb5, 0xde, 0x31, 0xfe, 0x74}),
10, 0xd3, 0x43, 0x2e, 0x7e, 0x4c, 0x7c, 0xc0, 0xa0, 0x81, 0x7c, 0x47, 0x81, 0x68, 0x17, 0xda, 0x8e,
10, 0xa4, 0x48, 0xf0, 0x72, 0x5f, 0xb5, 0x15, 0x40, 0x27, 0xf6, 0x50, 0x8d, 0x16, 0x64, 0x1, 0x8d,
10, 0x43, 0x44, 0xd4, 0xc5, 0xf0, 0x1b, 0x7d, 0x82, 0x74, 0xfe, 0x31, 0xde, 0xb5, 0xd8, 0x8, 0x87}),
want: []uuid.UUID{uid1, uid2, uid3},
},
}
Expand Down Expand Up @@ -2557,8 +2557,8 @@ func Test_response_ReadObject(t *testing.T) {
},
{
name: "UUID",
r: bytes.NewBuffer([]byte{10, 0xd6, 0x58, 0x9d, 0xa7, 0xf8, 0xb1, 0x46, 0x87, 0xb5,
0xbd, 0x2d, 0xdc, 0x73, 0x62, 0xa4, 0xa4}),
r: bytes.NewBuffer([]byte{10, 0x87, 0x46, 0xb1, 0xf8, 0xa7, 0x9d, 0x58, 0xd6, 0xa4,
0xa4, 0x62, 0x73, 0xdc, 0x2d, 0xbd, 0xb5}),
want: uid,
},
{
Expand Down Expand Up @@ -2622,9 +2622,9 @@ func Test_response_ReadObject(t *testing.T) {
{
name: "UUID array",
r: bytes.NewBuffer([]byte{21, 3, 0, 0, 0,
10, 0xa0, 0xc0, 0x7c, 0x4c, 0x7e, 0x2e, 0x43, 0xd3, 0x8e, 0xda, 0x17, 0x68, 0x81, 0x47, 0x7c, 0x81,
10, 0x40, 0x15, 0xb5, 0x5f, 0x72, 0xf0, 0x48, 0xa4, 0x8d, 0x1, 0x64, 0x16, 0x8d, 0x50, 0xf6, 0x27,
10, 0x82, 0x7d, 0x1b, 0xf0, 0xc5, 0xd4, 0x44, 0x43, 0x87, 0x8, 0xd8, 0xb5, 0xde, 0x31, 0xfe, 0x74}),
10, 0xd3, 0x43, 0x2e, 0x7e, 0x4c, 0x7c, 0xc0, 0xa0, 0x81, 0x7c, 0x47, 0x81, 0x68, 0x17, 0xda, 0x8e,
10, 0xa4, 0x48, 0xf0, 0x72, 0x5f, 0xb5, 0x15, 0x40, 0x27, 0xf6, 0x50, 0x8d, 0x16, 0x64, 0x1, 0x8d,
10, 0x43, 0x44, 0xd4, 0xc5, 0xf0, 0x1b, 0x7d, 0x82, 0x74, 0xfe, 0x31, 0xde, 0xb5, 0xd8, 0x8, 0x87}),
want: []uuid.UUID{uid1, uid2, uid3},
},
{
Expand Down

0 comments on commit e02fade

Please sign in to comment.