Skip to content

Commit

Permalink
fix stream decoding tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shamaton committed Aug 10, 2024
1 parent eac8243 commit 0097937
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions internal/stream/decoding/decoding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func Test_decodeWithCode(t *testing.T) {
Code: def.Int8,
Data: []byte{},
ReadCount: 0,
Error: ErrCanNotDecode,
Error: def.ErrCanNotDecode,
MethodAsWithCode: method,
},
{
Expand Down Expand Up @@ -538,7 +538,7 @@ func Test_decodeWithCode(t *testing.T) {
Code: def.Bin8,
Data: []byte{2, 1, 2},
ReadCount: 2,
Error: ErrNotMatchArrayElement,
Error: def.ErrNotMatchArrayElement,
MethodAsWithCode: method,
},
{
Expand Down Expand Up @@ -570,7 +570,7 @@ func Test_decodeWithCode(t *testing.T) {
Code: def.Str8,
Data: []byte{2},
ReadCount: 1,
Error: ErrNotMatchArrayElement,
Error: def.ErrNotMatchArrayElement,
MethodAsWithCode: method,
},
{
Expand Down Expand Up @@ -610,7 +610,7 @@ func Test_decodeWithCode(t *testing.T) {
Code: def.Array16,
Data: []byte{0, 2},
ReadCount: 1,
Error: ErrNotMatchArrayElement,
Error: def.ErrNotMatchArrayElement,
MethodAsWithCode: method,
},
{
Expand Down
2 changes: 1 addition & 1 deletion internal/stream/decoding/int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func Test_asIntWithCode(t *testing.T) {
{
Name: "Unexpected",
Code: def.Array16,
Error: ErrCanNotDecode,
Error: def.ErrCanNotDecode,
MethodAsWithCode: method,
},
}
Expand Down
4 changes: 2 additions & 2 deletions internal/stream/decoding/interface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,15 @@ func Test_asInterfaceWithCode(t *testing.T) {
Code: def.Map16,
Data: []byte{0, 1, def.Array16},
ReadCount: 2,
Error: ErrCanNotSetSliceAsMapKey,
Error: def.ErrCanNotSetSliceAsMapKey,
MethodAsWithCode: method,
},
{
Name: "Map.error.set.can.map",
Code: def.Map16,
Data: []byte{0, 1, def.Map16},
ReadCount: 2,
Error: ErrCanNotSetMapAsMapKey,
Error: def.ErrCanNotSetMapAsMapKey,
MethodAsWithCode: method,
},
{
Expand Down
2 changes: 1 addition & 1 deletion internal/stream/decoding/slice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func Test_sliceLength(t *testing.T) {
{
Name: "Unexpected",
Code: def.Nil,
Error: ErrCanNotDecode,
Error: def.ErrCanNotDecode,
MethodAsWithCode: method,
},
}
Expand Down
2 changes: 1 addition & 1 deletion internal/stream/decoding/string_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func Test_stringByteLength(t *testing.T) {
{
Name: "Unexpected",
Code: def.Array16,
Error: ErrCanNotDecode,
Error: def.ErrCanNotDecode,
MethodAsWithCode: method,
},
}
Expand Down
4 changes: 2 additions & 2 deletions internal/stream/decoding/struct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func Test_setStructFromMap(t *testing.T) {
Code: def.Map16,
Data: []byte{0, 1, def.FixStr + 1, 'v', def.Array16},
ReadCount: 4,
Error: ErrCanNotDecode,
Error: def.ErrCanNotDecode,
MethodAsWithCode: method,
},
{
Expand Down Expand Up @@ -152,7 +152,7 @@ func Test_setStructFromArray(t *testing.T) {
Code: def.Array16,
Data: []byte{0, 1, def.Array16},
ReadCount: 2,
Error: ErrCanNotDecode,
Error: def.ErrCanNotDecode,
MethodAsWithCode: method,
},
{
Expand Down

0 comments on commit 0097937

Please sign in to comment.