Skip to content

CDRIVER-3877 test BSON string produced #730

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

Merged

Conversation

kevinAlbs
Copy link
Collaborator

@kevinAlbs kevinAlbs commented Jan 26, 2021

The bug fix is part of 4ed2848#diff-40f2bad12fecbb316a142e83953d727ed35c749b920931a18791f8558654aef2R2582

That line will be backported, along with this test, in 1.17.4.

"1;\" }, \"code_w_scope\" : { \"$code\" : \"var x = 1;\", \"$scope\" : { "
"} }, \"int32\" : { \"$numberInt\" : \"1\" }, \"timestamp\" : { "
"\"$timestamp\" : { \"t\" : 2, \"i\" : 3 } }, \"int64\" : { "
"\"$numberLong\" : \"4\" }, \"decimal128\" : { \"$numberDecimal\" : "
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This tests the bug at hand, that an int64 produces { "$numberLong": "4" } with the space before }. But it seemed prudent to test JSON produced of all BSON types while adding this.

@@ -2446,7 +2446,8 @@ test_bson_binary_null_handling (void)
}

static void
test_bson_append_null_from_utf8_or_symbol (void) {
test_bson_append_null_from_utf8_or_symbol (void)
{
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

clang format

@kevinAlbs kevinAlbs marked this pull request as ready for review January 26, 2021 14:37
@kevinAlbs kevinAlbs requested a review from rcsanchez97 January 26, 2021 14:37
Copy link
Contributor

@rcsanchez97 rcsanchez97 left a comment

Choose a reason for hiding this comment

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

LGTM

@kevinAlbs kevinAlbs merged commit 107d094 into mongodb:master Feb 1, 2021
kevinAlbs added a commit that referenced this pull request Feb 1, 2021
chardan pushed a commit to chardan/mongo-c-driver that referenced this pull request Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants