Skip to content

Conversation

@qingyang-hu
Copy link
Collaborator

GODRIVER-3478

Summary

Use ExtJSON for BSON binary vector spec tests.

Background & Motivation

Sync mongodb/specifications@ccd72de

@mongodb-drivers-pr-bot mongodb-drivers-pr-bot bot added the review-priority-low Low Priority PR for Review: within 3 business days label Mar 28, 2025
@mongodb-drivers-pr-bot
Copy link
Contributor

API Change Report

No changes found!

@qingyang-hu qingyang-hu marked this pull request as ready for review March 28, 2025 21:28
}

func convertSlice[T int8 | float32 | byte](s []interface{}) []T {
func convertSlice[T int8 | float32 | byte](t *testing.T, data []byte) []T {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Comment on lines 90 to 92
if err != nil {
t.Fatalf("got %q while handling %s", err, string(data))
}
Copy link
Member

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

Suggested change
if err != nil {
t.Fatalf("got %q while handling %s", err, string(data))
}
require.NoError(t, err)

}

func convertSlice[T int8 | float32 | byte](s []interface{}) []T {
func convertSlice[T int8 | float32 | byte](t *testing.T, data []byte) []T {
Copy link
Member

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?

@qingyang-hu qingyang-hu merged commit 2cd7f73 into mongodb:master Apr 11, 2025
30 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-priority-low Low Priority PR for Review: within 3 business days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants