-
Notifications
You must be signed in to change notification settings - Fork 902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GODRIVER-3478 Use ExtJSON for BSON binary vector spec tests. #2003
Conversation
API Change ReportNo changes found! |
bson/bson_binary_vector_spec_test.go
Outdated
@@ -82,21 +81,18 @@ func TestBsonBinaryVectorSpec(t *testing.T) { | |||
}) | |||
} | |||
|
|||
func convertSlice[T int8 | float32 | byte](s []interface{}) []T { | |||
func convertSlice[T int8 | float32 | byte](t *testing.T, data []byte) []T { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func convertSlice[T int8 | float32 | byte](t *testing.T, data []byte) []T { | |
func convertSlice[T int8 | float32 | byte](t *testing.T, data []byte) []T { | |
t.Helper() |
Alternatively, this method could be re-written to return an error.
bson/bson_binary_vector_spec_test.go
Outdated
if err != nil { | ||
t.Fatalf("got %q while handling %s", err, string(data)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest using the require
package
if err != nil { | |
t.Fatalf("got %q while handling %s", err, string(data)) | |
} | |
require.NoError(t, err) |
bson/bson_binary_vector_spec_test.go
Outdated
@@ -82,21 +81,18 @@ func TestBsonBinaryVectorSpec(t *testing.T) { | |||
}) | |||
} | |||
|
|||
func convertSlice[T int8 | float32 | byte](s []interface{}) []T { | |||
func convertSlice[T int8 | float32 | byte](t *testing.T, data []byte) []T { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this function be renamed to decodeTestSlice
/ unmarshalTestSlice
?
GODRIVER-3478
Summary
Use ExtJSON for BSON binary vector spec tests.
Background & Motivation
Sync mongodb/specifications@ccd72de