Skip to content

Commit e430a9b

Browse files
authored
CDRIVER-4122 Add BSON corpus test for binary subtype 7 (mongodb#859)
1 parent 8fcceb5 commit e430a9b

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/libbson/doc/bson_subtype_t.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Synopsis
2020
BSON_SUBTYPE_UUID_DEPRECATED = 0x03,
2121
BSON_SUBTYPE_UUID = 0x04,
2222
BSON_SUBTYPE_MD5 = 0x05,
23+
BSON_SUBTYPE_COLUMN = 0x07,
2324
BSON_SUBTYPE_USER = 0x80,
2425
} bson_subtype_t;
2526

src/libbson/src/bson/bson-types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ typedef enum {
282282
BSON_SUBTYPE_UUID = 0x04,
283283
BSON_SUBTYPE_MD5 = 0x05,
284284
BSON_SUBTYPE_ENCRYPTED = 0x06,
285+
BSON_SUBTYPE_COLUMN = 0x07,
285286
BSON_SUBTYPE_USER = 0x80,
286287
} bson_subtype_t;
287288

src/libbson/tests/json/bson_corpus/binary.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
"canonical_bson": "1D000000057800100000000573FFD26444B34C6990E8E7D1DFC035D400",
5151
"canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"05\"}}}"
5252
},
53+
{
54+
"description": "subtype 0x07",
55+
"canonical_bson": "1D000000057800100000000773FFD26444B34C6990E8E7D1DFC035D400",
56+
"canonical_extjson": "{\"x\" : { \"$binary\" : {\"base64\" : \"c//SZESzTGmQ6OfR38A11A==\", \"subType\" : \"07\"}}}"
57+
},
5358
{
5459
"description": "subtype 0x80",
5560
"canonical_bson": "0F0000000578000200000080FFFF00",

0 commit comments

Comments
 (0)