Skip to content

Commit 5389a76

Browse files
committed
SWIFT-1085 Add more spec tests for invalid relaxed extJSON UUIDs
1 parent 7964141 commit 5389a76

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Tests/Specs/bson-corpus/binary.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,20 @@
9494
"string": "{\"x\" : { \"$uuid\" : { \"data\" : \"73ffd264-44b3-4c69-90e8-e7d1dfc035d4\"}}}"
9595
},
9696
{
97-
"description": "$uuid invalid value",
97+
"description": "$uuid invalid value--too short",
9898
"string": "{\"x\" : { \"$uuid\" : \"73ffd264-44b3-90e8-e7d1dfc035d4\"}}"
99+
},
100+
{
101+
"description": "$uuid invalid value--too long",
102+
"string": "{\"x\" : { \"$uuid\" : \"73ffd264-44b3-4c69-90e8-e7d1dfc035d4-789e4\"}}"
103+
},
104+
{
105+
"description": "$uuid invalid value--misplaced hyphens",
106+
"string": "{\"x\" : { \"$uuid\" : \"73ff-d26444b-34c6-990e8e-7d1dfc035d4\"}}"
107+
},
108+
{
109+
"description": "$uuid invalid value--too many hyphens",
110+
"string": "{\"x\" : { \"$uuid\" : \"----d264-44b3-4--9-90e8-e7d1dfc0----\"}}"
99111
}
100112
]
101113
}

0 commit comments

Comments
 (0)