bson 4.7.1 → 4.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +2 -2
  3. data.tar.gz.sig +0 -0
  4. data/README.md +5 -1
  5. data/ext/bson/bson-native.h +14 -4
  6. data/ext/bson/init.c +25 -2
  7. data/ext/bson/read.c +61 -15
  8. data/ext/bson/util.c +40 -0
  9. data/ext/bson/write.c +17 -13
  10. data/lib/bson.rb +3 -0
  11. data/lib/bson/array.rb +21 -3
  12. data/lib/bson/binary.rb +41 -3
  13. data/lib/bson/boolean.rb +3 -1
  14. data/lib/bson/code.rb +15 -1
  15. data/lib/bson/code_with_scope.rb +17 -3
  16. data/lib/bson/db_pointer.rb +104 -0
  17. data/lib/bson/decimal128.rb +15 -1
  18. data/lib/bson/error.rb +17 -0
  19. data/lib/bson/ext_json.rb +374 -0
  20. data/lib/bson/float.rb +47 -1
  21. data/lib/bson/hash.rb +23 -3
  22. data/lib/bson/int32.rb +21 -1
  23. data/lib/bson/int64.rb +28 -3
  24. data/lib/bson/integer.rb +34 -0
  25. data/lib/bson/max_key.rb +12 -0
  26. data/lib/bson/min_key.rb +12 -0
  27. data/lib/bson/nil_class.rb +3 -1
  28. data/lib/bson/object.rb +27 -0
  29. data/lib/bson/object_id.rb +15 -1
  30. data/lib/bson/regexp.rb +19 -2
  31. data/lib/bson/specialized.rb +3 -1
  32. data/lib/bson/string.rb +3 -1
  33. data/lib/bson/symbol.rb +92 -3
  34. data/lib/bson/time.rb +28 -3
  35. data/lib/bson/timestamp.rb +15 -1
  36. data/lib/bson/undefined.rb +11 -0
  37. data/lib/bson/version.rb +1 -1
  38. data/spec/bson/binary_spec.rb +33 -3
  39. data/spec/bson/ext_json_parse_spec.rb +276 -0
  40. data/spec/bson/float_spec.rb +36 -0
  41. data/spec/bson/hash_spec.rb +70 -0
  42. data/spec/bson/int32_spec.rb +20 -0
  43. data/spec/bson/int64_spec.rb +38 -0
  44. data/spec/bson/integer_spec.rb +26 -0
  45. data/spec/bson/raw_spec.rb +22 -1
  46. data/spec/bson/symbol_raw_spec.rb +45 -0
  47. data/spec/bson/symbol_spec.rb +60 -0
  48. data/spec/{support → runners}/common_driver.rb +0 -0
  49. data/spec/runners/corpus.rb +182 -0
  50. data/spec/{support/corpus.rb → runners/corpus_legacy.rb} +40 -58
  51. data/spec/spec_helper.rb +9 -2
  52. data/spec/{bson/driver_bson_spec.rb → spec_tests/common_driver_spec.rb} +1 -0
  53. data/spec/{bson/corpus_spec.rb → spec_tests/corpus_legacy_spec.rb} +4 -4
  54. data/spec/spec_tests/corpus_spec.rb +124 -0
  55. data/spec/spec_tests/data/corpus/README.md +15 -0
  56. data/spec/spec_tests/data/corpus/array.json +49 -0
  57. data/spec/spec_tests/data/corpus/binary.json +85 -0
  58. data/spec/spec_tests/data/corpus/boolean.json +27 -0
  59. data/spec/spec_tests/data/corpus/code.json +67 -0
  60. data/spec/spec_tests/data/corpus/code_w_scope.json +78 -0
  61. data/spec/spec_tests/data/corpus/datetime.json +42 -0
  62. data/spec/spec_tests/data/corpus/dbpointer.json +56 -0
  63. data/spec/spec_tests/data/corpus/dbref.json +31 -0
  64. data/spec/spec_tests/data/corpus/decimal128-1.json +317 -0
  65. data/spec/spec_tests/data/corpus/decimal128-2.json +793 -0
  66. data/spec/spec_tests/data/corpus/decimal128-3.json +1771 -0
  67. data/spec/spec_tests/data/corpus/decimal128-4.json +117 -0
  68. data/spec/spec_tests/data/corpus/decimal128-5.json +402 -0
  69. data/spec/spec_tests/data/corpus/decimal128-6.json +119 -0
  70. data/spec/spec_tests/data/corpus/decimal128-7.json +323 -0
  71. data/spec/spec_tests/data/corpus/document.json +36 -0
  72. data/spec/spec_tests/data/corpus/double.json +87 -0
  73. data/spec/spec_tests/data/corpus/int32.json +43 -0
  74. data/spec/spec_tests/data/corpus/int64.json +43 -0
  75. data/spec/spec_tests/data/corpus/maxkey.json +12 -0
  76. data/spec/spec_tests/data/corpus/minkey.json +12 -0
  77. data/spec/spec_tests/data/corpus/multi-type-deprecated.json +15 -0
  78. data/spec/spec_tests/data/corpus/multi-type.json +11 -0
  79. data/spec/spec_tests/data/corpus/null.json +12 -0
  80. data/spec/spec_tests/data/corpus/oid.json +28 -0
  81. data/spec/spec_tests/data/corpus/regex.json +65 -0
  82. data/spec/spec_tests/data/corpus/string.json +72 -0
  83. data/spec/spec_tests/data/corpus/symbol.json +80 -0
  84. data/spec/spec_tests/data/corpus/timestamp.json +24 -0
  85. data/spec/spec_tests/data/corpus/top.json +240 -0
  86. data/spec/spec_tests/data/corpus/undefined.json +15 -0
  87. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/array.json +0 -0
  88. data/spec/{support/corpus-tests/failures → spec_tests/data/corpus_legacy}/binary.json +0 -0
  89. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/boolean.json +0 -0
  90. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/code.json +1 -1
  91. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/code_w_scope.json +1 -1
  92. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/document.json +1 -1
  93. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/double.json +1 -1
  94. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/failures/datetime.json +0 -0
  95. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/failures/dbpointer.json +0 -0
  96. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/failures/int64.json +0 -0
  97. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/failures/symbol.json +0 -0
  98. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/int32.json +1 -1
  99. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/maxkey.json +1 -1
  100. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/minkey.json +1 -1
  101. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/null.json +1 -1
  102. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/oid.json +0 -0
  103. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/regex.json +1 -1
  104. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/string.json +0 -0
  105. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/timestamp.json +1 -1
  106. data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/top.json +0 -0
  107. data/spec/{support/corpus-tests/failures → spec_tests/data/corpus_legacy}/undefined.json +0 -0
  108. data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-1.json +0 -0
  109. data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-2.json +0 -0
  110. data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-3.json +0 -0
  111. data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-4.json +0 -0
  112. data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-5.json +0 -0
  113. data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-6.json +0 -0
  114. data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-7.json +0 -0
  115. metadata +170 -95
  116. metadata.gz.sig +2 -4
@@ -0,0 +1,119 @@
1
+ {
2
+ "description": "Decimal128",
3
+ "bson_type": "0x13",
4
+ "test_key": "d",
5
+ "parseErrors": [
6
+ {
7
+ "description": "Incomplete Exponent",
8
+ "string": "1e"
9
+ },
10
+ {
11
+ "description": "Exponent at the beginning",
12
+ "string": "E01"
13
+ },
14
+ {
15
+ "description": "Just a decimal place",
16
+ "string": "."
17
+ },
18
+ {
19
+ "description": "2 decimal places",
20
+ "string": "..3"
21
+ },
22
+ {
23
+ "description": "2 decimal places",
24
+ "string": ".13.3"
25
+ },
26
+ {
27
+ "description": "2 decimal places",
28
+ "string": "1..3"
29
+ },
30
+ {
31
+ "description": "2 decimal places",
32
+ "string": "1.3.4"
33
+ },
34
+ {
35
+ "description": "2 decimal places",
36
+ "string": "1.34."
37
+ },
38
+ {
39
+ "description": "Decimal with no digits",
40
+ "string": ".e"
41
+ },
42
+ {
43
+ "description": "2 signs",
44
+ "string": "+-32.4"
45
+ },
46
+ {
47
+ "description": "2 signs",
48
+ "string": "-+32.4"
49
+ },
50
+ {
51
+ "description": "2 negative signs",
52
+ "string": "--32.4"
53
+ },
54
+ {
55
+ "description": "2 negative signs",
56
+ "string": "-32.-4"
57
+ },
58
+ {
59
+ "description": "End in negative sign",
60
+ "string": "32.0-"
61
+ },
62
+ {
63
+ "description": "2 negative signs",
64
+ "string": "32.4E--21"
65
+ },
66
+ {
67
+ "description": "2 negative signs",
68
+ "string": "32.4E-2-1"
69
+ },
70
+ {
71
+ "description": "2 signs",
72
+ "string": "32.4E+-21"
73
+ },
74
+ {
75
+ "description": "Empty string",
76
+ "string": ""
77
+ },
78
+ {
79
+ "description": "Invalid",
80
+ "string": "E"
81
+ },
82
+ {
83
+ "description": "Invalid",
84
+ "string": "invalid"
85
+ },
86
+ {
87
+ "description": "Invalid",
88
+ "string": "i"
89
+ },
90
+ {
91
+ "description": "Invalid",
92
+ "string": "in"
93
+ },
94
+ {
95
+ "description": "Invalid",
96
+ "string": "-in"
97
+ },
98
+ {
99
+ "description": "Invalid",
100
+ "string": "Na"
101
+ },
102
+ {
103
+ "description": "Invalid",
104
+ "string": "-Na"
105
+ },
106
+ {
107
+ "description": "Invalid",
108
+ "string": "1.23abc"
109
+ },
110
+ {
111
+ "description": "Invalid",
112
+ "string": "1.23abcE+02"
113
+ },
114
+ {
115
+ "description": "Invalid",
116
+ "string": "1.23E+0aabs2"
117
+ }
118
+ ]
119
+ }
@@ -0,0 +1,323 @@
1
+ {
2
+ "description": "Decimal128",
3
+ "bson_type": "0x13",
4
+ "test_key": "d",
5
+ "parseErrors": [
6
+ {
7
+ "description": "[basx572] Near-specials (Conversion_syntax)",
8
+ "string": "-9Inf"
9
+ },
10
+ {
11
+ "description": "[basx516] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
12
+ "string": "-1-"
13
+ },
14
+ {
15
+ "description": "[basx533] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
16
+ "string": "0000.."
17
+ },
18
+ {
19
+ "description": "[basx534] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
20
+ "string": ".0000."
21
+ },
22
+ {
23
+ "description": "[basx535] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
24
+ "string": "00..00"
25
+ },
26
+ {
27
+ "description": "[basx569] Near-specials (Conversion_syntax)",
28
+ "string": "0Inf"
29
+ },
30
+ {
31
+ "description": "[basx571] Near-specials (Conversion_syntax)",
32
+ "string": "-0Inf"
33
+ },
34
+ {
35
+ "description": "[basx575] Near-specials (Conversion_syntax)",
36
+ "string": "0sNaN"
37
+ },
38
+ {
39
+ "description": "[basx503] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
40
+ "string": "++1"
41
+ },
42
+ {
43
+ "description": "[basx504] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
44
+ "string": "--1"
45
+ },
46
+ {
47
+ "description": "[basx505] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
48
+ "string": "-+1"
49
+ },
50
+ {
51
+ "description": "[basx506] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
52
+ "string": "+-1"
53
+ },
54
+ {
55
+ "description": "[basx510] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
56
+ "string": " +1"
57
+ },
58
+ {
59
+ "description": "[basx513] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
60
+ "string": " + 1"
61
+ },
62
+ {
63
+ "description": "[basx514] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
64
+ "string": " - 1"
65
+ },
66
+ {
67
+ "description": "[basx501] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
68
+ "string": "."
69
+ },
70
+ {
71
+ "description": "[basx502] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
72
+ "string": ".."
73
+ },
74
+ {
75
+ "description": "[basx519] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
76
+ "string": ""
77
+ },
78
+ {
79
+ "description": "[basx525] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
80
+ "string": "e100"
81
+ },
82
+ {
83
+ "description": "[basx549] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
84
+ "string": "e+1"
85
+ },
86
+ {
87
+ "description": "[basx577] some baddies with dots and Es and dots and specials (Conversion_syntax)",
88
+ "string": ".e+1"
89
+ },
90
+ {
91
+ "description": "[basx578] some baddies with dots and Es and dots and specials (Conversion_syntax)",
92
+ "string": "+.e+1"
93
+ },
94
+ {
95
+ "description": "[basx581] some baddies with dots and Es and dots and specials (Conversion_syntax)",
96
+ "string": "E+1"
97
+ },
98
+ {
99
+ "description": "[basx582] some baddies with dots and Es and dots and specials (Conversion_syntax)",
100
+ "string": ".E+1"
101
+ },
102
+ {
103
+ "description": "[basx583] some baddies with dots and Es and dots and specials (Conversion_syntax)",
104
+ "string": "+.E+1"
105
+ },
106
+ {
107
+ "description": "[basx579] some baddies with dots and Es and dots and specials (Conversion_syntax)",
108
+ "string": "-.e+"
109
+ },
110
+ {
111
+ "description": "[basx580] some baddies with dots and Es and dots and specials (Conversion_syntax)",
112
+ "string": "-.e"
113
+ },
114
+ {
115
+ "description": "[basx584] some baddies with dots and Es and dots and specials (Conversion_syntax)",
116
+ "string": "-.E+"
117
+ },
118
+ {
119
+ "description": "[basx585] some baddies with dots and Es and dots and specials (Conversion_syntax)",
120
+ "string": "-.E"
121
+ },
122
+ {
123
+ "description": "[basx589] some baddies with dots and Es and dots and specials (Conversion_syntax)",
124
+ "string": "+.Inf"
125
+ },
126
+ {
127
+ "description": "[basx586] some baddies with dots and Es and dots and specials (Conversion_syntax)",
128
+ "string": ".NaN"
129
+ },
130
+ {
131
+ "description": "[basx587] some baddies with dots and Es and dots and specials (Conversion_syntax)",
132
+ "string": "-.NaN"
133
+ },
134
+ {
135
+ "description": "[basx545] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
136
+ "string": "ONE"
137
+ },
138
+ {
139
+ "description": "[basx561] Near-specials (Conversion_syntax)",
140
+ "string": "qNaN"
141
+ },
142
+ {
143
+ "description": "[basx573] Near-specials (Conversion_syntax)",
144
+ "string": "-sNa"
145
+ },
146
+ {
147
+ "description": "[basx588] some baddies with dots and Es and dots and specials (Conversion_syntax)",
148
+ "string": "+.sNaN"
149
+ },
150
+ {
151
+ "description": "[basx544] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
152
+ "string": "ten"
153
+ },
154
+ {
155
+ "description": "[basx527] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
156
+ "string": "u0b65"
157
+ },
158
+ {
159
+ "description": "[basx526] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
160
+ "string": "u0e5a"
161
+ },
162
+ {
163
+ "description": "[basx515] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
164
+ "string": "x"
165
+ },
166
+ {
167
+ "description": "[basx574] Near-specials (Conversion_syntax)",
168
+ "string": "xNaN"
169
+ },
170
+ {
171
+ "description": "[basx530] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
172
+ "string": ".123.5"
173
+ },
174
+ {
175
+ "description": "[basx500] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
176
+ "string": "1..2"
177
+ },
178
+ {
179
+ "description": "[basx542] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
180
+ "string": "1e1.0"
181
+ },
182
+ {
183
+ "description": "[basx553] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
184
+ "string": "1E+1.2.3"
185
+ },
186
+ {
187
+ "description": "[basx543] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
188
+ "string": "1e123e"
189
+ },
190
+ {
191
+ "description": "[basx552] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
192
+ "string": "1E+1.2"
193
+ },
194
+ {
195
+ "description": "[basx546] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
196
+ "string": "1e.1"
197
+ },
198
+ {
199
+ "description": "[basx547] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
200
+ "string": "1e1."
201
+ },
202
+ {
203
+ "description": "[basx554] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
204
+ "string": "1E++1"
205
+ },
206
+ {
207
+ "description": "[basx555] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
208
+ "string": "1E--1"
209
+ },
210
+ {
211
+ "description": "[basx556] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
212
+ "string": "1E+-1"
213
+ },
214
+ {
215
+ "description": "[basx557] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
216
+ "string": "1E-+1"
217
+ },
218
+ {
219
+ "description": "[basx558] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
220
+ "string": "1E'1"
221
+ },
222
+ {
223
+ "description": "[basx559] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
224
+ "string": "1E\"1"
225
+ },
226
+ {
227
+ "description": "[basx520] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
228
+ "string": "1e-"
229
+ },
230
+ {
231
+ "description": "[basx560] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
232
+ "string": "1E"
233
+ },
234
+ {
235
+ "description": "[basx548] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
236
+ "string": "1ee"
237
+ },
238
+ {
239
+ "description": "[basx551] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
240
+ "string": "1.2.1"
241
+ },
242
+ {
243
+ "description": "[basx550] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
244
+ "string": "1.23.4"
245
+ },
246
+ {
247
+ "description": "[basx529] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
248
+ "string": "1.34.5"
249
+ },
250
+ {
251
+ "description": "[basx531] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
252
+ "string": "01.35."
253
+ },
254
+ {
255
+ "description": "[basx532] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
256
+ "string": "01.35-"
257
+ },
258
+ {
259
+ "description": "[basx518] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
260
+ "string": "3+"
261
+ },
262
+ {
263
+ "description": "[basx521] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
264
+ "string": "7e99999a"
265
+ },
266
+ {
267
+ "description": "[basx570] Near-specials (Conversion_syntax)",
268
+ "string": "9Inf"
269
+ },
270
+ {
271
+ "description": "[basx517] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
272
+ "string": "12-"
273
+ },
274
+ {
275
+ "description": "[basx507] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
276
+ "string": "12e"
277
+ },
278
+ {
279
+ "description": "[basx508] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
280
+ "string": "12e++"
281
+ },
282
+ {
283
+ "description": "[basx509] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
284
+ "string": "12f4"
285
+ },
286
+ {
287
+ "description": "[basx536] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
288
+ "string": "111e*123"
289
+ },
290
+ {
291
+ "description": "[basx537] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
292
+ "string": "111e123-"
293
+ },
294
+ {
295
+ "description": "[basx540] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
296
+ "string": "111e1*23"
297
+ },
298
+ {
299
+ "description": "[basx538] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
300
+ "string": "111e+12+"
301
+ },
302
+ {
303
+ "description": "[basx539] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
304
+ "string": "111e1-3-"
305
+ },
306
+ {
307
+ "description": "[basx541] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
308
+ "string": "111E1e+3"
309
+ },
310
+ {
311
+ "description": "[basx528] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
312
+ "string": "123,65"
313
+ },
314
+ {
315
+ "description": "[basx523] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
316
+ "string": "7e12356789012x"
317
+ },
318
+ {
319
+ "description": "[basx522] The 'baddies' tests from DiagBigDecimal, plus some new ones (Conversion_syntax)",
320
+ "string": "7e123567890x"
321
+ }
322
+ ]
323
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "description": "Document type (sub-documents)",
3
+ "bson_type": "0x03",
4
+ "test_key": "x",
5
+ "valid": [
6
+ {
7
+ "description": "Empty subdoc",
8
+ "canonical_bson": "0D000000037800050000000000",
9
+ "canonical_extjson": "{\"x\" : {}}"
10
+ },
11
+ {
12
+ "description": "Empty-string key subdoc",
13
+ "canonical_bson": "150000000378000D00000002000200000062000000",
14
+ "canonical_extjson": "{\"x\" : {\"\" : \"b\"}}"
15
+ },
16
+ {
17
+ "description": "Single-character key subdoc",
18
+ "canonical_bson": "160000000378000E0000000261000200000062000000",
19
+ "canonical_extjson": "{\"x\" : {\"a\" : \"b\"}}"
20
+ }
21
+ ],
22
+ "decodeErrors": [
23
+ {
24
+ "description": "Subdocument length too long: eats outer terminator",
25
+ "bson": "1800000003666F6F000F0000001062617200FFFFFF7F0000"
26
+ },
27
+ {
28
+ "description": "Subdocument length too short: leaks terminator",
29
+ "bson": "1500000003666F6F000A0000000862617200010000"
30
+ },
31
+ {
32
+ "description": "Invalid subdocument: bad string length in field",
33
+ "bson": "1C00000003666F6F001200000002626172000500000062617A000000"
34
+ }
35
+ ]
36
+ }