Skip to content

Commit

Permalink
GODRIVER-2866 Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
qingyang-hu committed Jun 11, 2024
1 parent 295cffe commit f3cf552
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bson/default_value_encoders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1857,8 +1857,8 @@ type testValueMarshalPtr struct {
err error
}

func (tvm *testValueMarshalPtr) MarshalBSONValue() (Type, []byte, error) {
return tvm.t, tvm.buf, tvm.err
func (tvm *testValueMarshalPtr) MarshalBSONValue() (byte, []byte, error) {
return byte(tvm.t), tvm.buf, tvm.err
}

type testMarshalPtr struct {
Expand Down
8 changes: 4 additions & 4 deletions bson/primitive_codecs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1066,8 +1066,8 @@ type testValueMarshaler struct {
err error
}

func (tvm testValueMarshaler) MarshalBSONValue() (Type, []byte, error) {
return tvm.t, tvm.buf, tvm.err
func (tvm testValueMarshaler) MarshalBSONValue() (byte, []byte, error) {
return byte(tvm.t), tvm.buf, tvm.err
}

type testValueUnmarshaler struct {
Expand All @@ -1076,8 +1076,8 @@ type testValueUnmarshaler struct {
err error
}

func (tvu *testValueUnmarshaler) UnmarshalBSONValue(t Type, val []byte) error {
tvu.t, tvu.val = t, val
func (tvu *testValueUnmarshaler) UnmarshalBSONValue(t byte, val []byte) error {
tvu.t, tvu.val = Type(t), val
return tvu.err
}
func (tvu testValueUnmarshaler) Equal(tvu2 testValueUnmarshaler) bool {
Expand Down

0 comments on commit f3cf552

Please sign in to comment.