Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gagliardetto committed Jan 5, 2022
1 parent 605c0a5 commit 70c0384
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ func TestDecoder_Decode_No_Ptr(t *testing.T) {
}

func TestDecoder_BinaryTestStructWithTags(t *testing.T) {
cnt, err := hex.DecodeString("ffb50063ffffff19000003e7ffffffffffffcc51000000000001869fc1b90a3d400f5c28f5c28f5c0100000000")
cnt, err := hex.DecodeString("ffb50063ffffff19000003e7ffffffffffffcc51000000000001869fc1b90a3d400f5c28f5c28f5c010000000000000000")
require.NoError(t, err)

s := &binaryTestStructWithTags{}
Expand Down
3 changes: 2 additions & 1 deletion encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ func TestEncoder_BinaryTestStructWithTags(t *testing.T) {
F8: -23.13,
F9: 3.92,
F10: true,
F12: []int64{99, 33},
}

buf := new(bytes.Buffer)
Expand All @@ -511,7 +512,7 @@ func TestEncoder_BinaryTestStructWithTags(t *testing.T) {
assert.NoError(t, err)

assert.Equal(t,
"ffb50063ffffff19000003e7ffffffffffffcc51000000000001869fc1b90a3d400f5c28f5c28f5c0100000000",
"ffb50063ffffff19000003e7ffffffffffffcc51000000000001869fc1b90a3d400f5c28f5c28f5c01000000000100000002010000006300000000000000010000002100000000000000",
hex.EncodeToString(buf.Bytes()),
)
}
Expand Down
3 changes: 2 additions & 1 deletion init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ type binaryTestStructWithTags struct {
F8 float32 `bin:"big"`
F9 float64 `bin:"big"`
F10 bool
F11 *Int64 `bin:"optional"`
F11 *Int64 `bin:"optional"`
F12 []int64 `bin:"optional"`
}

func setupBench(b *testing.B) {
Expand Down

0 comments on commit 70c0384

Please sign in to comment.