bson 4.2.2 → 4.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/README.md +25 -7
- data/Rakefile +16 -9
- data/ext/bson/{native-endian.h → bson-endian.h} +5 -99
- data/ext/bson/bson-native.h +125 -0
- data/ext/bson/bytebuf.c +133 -0
- data/ext/bson/endian.c +117 -0
- data/ext/bson/init.c +355 -0
- data/ext/bson/libbson-utf8.c +230 -0
- data/ext/bson/read.c +411 -0
- data/ext/bson/util.c +95 -0
- data/ext/bson/write.c +680 -0
- data/lib/bson.rb +6 -3
- data/lib/bson/active_support.rb +17 -0
- data/lib/bson/array.rb +57 -17
- data/lib/bson/binary.rb +185 -13
- data/lib/bson/boolean.rb +12 -3
- data/lib/bson/code.rb +16 -2
- data/lib/bson/code_with_scope.rb +32 -5
- data/lib/bson/config.rb +1 -1
- data/lib/bson/date.rb +12 -2
- data/lib/bson/date_time.rb +2 -2
- data/lib/bson/db_pointer.rb +110 -0
- data/lib/bson/decimal128.rb +17 -3
- data/lib/bson/decimal128/builder.rb +1 -1
- data/lib/bson/document.rb +152 -5
- data/lib/bson/environment.rb +2 -1
- data/lib/bson/error.rb +27 -0
- data/lib/bson/ext_json.rb +383 -0
- data/lib/bson/false_class.rb +1 -1
- data/lib/bson/float.rb +48 -2
- data/lib/bson/hash.rb +68 -17
- data/lib/bson/int32.rb +52 -13
- data/lib/bson/int64.rb +59 -15
- data/lib/bson/integer.rb +36 -2
- data/lib/bson/json.rb +1 -1
- data/lib/bson/max_key.rb +13 -1
- data/lib/bson/min_key.rb +13 -1
- data/lib/bson/nil_class.rb +4 -2
- data/lib/bson/object.rb +28 -1
- data/lib/bson/object_id.rb +16 -2
- data/lib/bson/open_struct.rb +1 -1
- data/lib/bson/regexp.rb +27 -4
- data/lib/bson/registry.rb +3 -3
- data/lib/bson/specialized.rb +4 -2
- data/lib/bson/string.rb +5 -3
- data/lib/bson/symbol.rb +99 -7
- data/lib/bson/time.rb +63 -4
- data/lib/bson/time_with_zone.rb +54 -0
- data/lib/bson/timestamp.rb +44 -6
- data/lib/bson/true_class.rb +1 -1
- data/lib/bson/undefined.rb +12 -1
- data/lib/bson/version.rb +2 -2
- data/spec/bson/array_spec.rb +18 -1
- data/spec/bson/binary_spec.rb +100 -3
- data/spec/bson/binary_uuid_spec.rb +189 -0
- data/spec/bson/boolean_spec.rb +1 -1
- data/spec/bson/byte_buffer_read_spec.rb +197 -0
- data/spec/bson/byte_buffer_spec.rb +121 -381
- data/spec/bson/byte_buffer_write_spec.rb +854 -0
- data/spec/bson/code_spec.rb +1 -1
- data/spec/bson/code_with_scope_spec.rb +1 -1
- data/spec/bson/date_spec.rb +1 -1
- data/spec/bson/date_time_spec.rb +54 -1
- data/spec/bson/decimal128_spec.rb +35 -35
- data/spec/bson/document_as_spec.rb +46 -0
- data/spec/bson/document_spec.rb +197 -30
- data/spec/bson/ext_json_parse_spec.rb +308 -0
- data/spec/bson/false_class_spec.rb +1 -1
- data/spec/bson/float_spec.rb +37 -1
- data/spec/bson/hash_as_spec.rb +57 -0
- data/spec/bson/hash_spec.rb +209 -1
- data/spec/bson/int32_spec.rb +180 -6
- data/spec/bson/int64_spec.rb +199 -6
- data/spec/bson/integer_spec.rb +29 -3
- data/spec/bson/json_spec.rb +1 -1
- data/spec/bson/max_key_spec.rb +1 -1
- data/spec/bson/min_key_spec.rb +1 -1
- data/spec/bson/nil_class_spec.rb +1 -1
- data/spec/bson/object_id_spec.rb +1 -1
- data/spec/bson/object_spec.rb +1 -1
- data/spec/bson/open_struct_spec.rb +1 -1
- data/spec/bson/raw_spec.rb +34 -2
- data/spec/bson/regexp_spec.rb +1 -1
- data/spec/bson/registry_spec.rb +1 -1
- data/spec/bson/string_spec.rb +19 -1
- data/spec/bson/symbol_raw_spec.rb +45 -0
- data/spec/bson/symbol_spec.rb +63 -3
- data/spec/bson/time_spec.rb +205 -2
- data/spec/bson/time_with_zone_spec.rb +68 -0
- data/spec/bson/timestamp_spec.rb +56 -1
- data/spec/bson/true_class_spec.rb +1 -1
- data/spec/bson/undefined_spec.rb +1 -1
- data/spec/bson_spec.rb +1 -1
- data/spec/{support → runners}/common_driver.rb +1 -1
- data/spec/runners/corpus.rb +185 -0
- data/spec/{support/corpus.rb → runners/corpus_legacy.rb} +41 -59
- data/spec/spec_helper.rb +40 -3
- data/spec/{bson/driver_bson_spec.rb → spec_tests/common_driver_spec.rb} +1 -0
- data/spec/{bson/corpus_spec.rb → spec_tests/corpus_legacy_spec.rb} +10 -7
- data/spec/spec_tests/corpus_spec.rb +124 -0
- data/spec/spec_tests/data/corpus/README.md +15 -0
- data/spec/spec_tests/data/corpus/array.json +49 -0
- data/spec/spec_tests/data/corpus/binary.json +113 -0
- data/spec/spec_tests/data/corpus/boolean.json +27 -0
- data/spec/spec_tests/data/corpus/code.json +67 -0
- data/spec/spec_tests/data/corpus/code_w_scope.json +78 -0
- data/spec/spec_tests/data/corpus/datetime.json +42 -0
- data/spec/spec_tests/data/corpus/dbpointer.json +56 -0
- data/spec/spec_tests/data/corpus/dbref.json +31 -0
- data/spec/spec_tests/data/corpus/decimal128-1.json +317 -0
- data/spec/spec_tests/data/corpus/decimal128-2.json +793 -0
- data/spec/spec_tests/data/corpus/decimal128-3.json +1771 -0
- data/spec/spec_tests/data/corpus/decimal128-4.json +117 -0
- data/spec/spec_tests/data/corpus/decimal128-5.json +402 -0
- data/spec/spec_tests/data/corpus/decimal128-6.json +119 -0
- data/spec/spec_tests/data/corpus/decimal128-7.json +323 -0
- data/spec/spec_tests/data/corpus/document.json +36 -0
- data/spec/spec_tests/data/corpus/double.json +87 -0
- data/spec/spec_tests/data/corpus/int32.json +43 -0
- data/spec/spec_tests/data/corpus/int64.json +43 -0
- data/spec/spec_tests/data/corpus/maxkey.json +12 -0
- data/spec/spec_tests/data/corpus/minkey.json +12 -0
- data/spec/spec_tests/data/corpus/multi-type-deprecated.json +15 -0
- data/spec/spec_tests/data/corpus/multi-type.json +11 -0
- data/spec/spec_tests/data/corpus/null.json +12 -0
- data/spec/spec_tests/data/corpus/oid.json +28 -0
- data/spec/spec_tests/data/corpus/regex.json +65 -0
- data/spec/spec_tests/data/corpus/string.json +72 -0
- data/spec/spec_tests/data/corpus/symbol.json +80 -0
- data/spec/spec_tests/data/corpus/timestamp.json +34 -0
- data/spec/spec_tests/data/corpus/top.json +236 -0
- data/spec/spec_tests/data/corpus/undefined.json +15 -0
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/array.json +8 -2
- data/spec/{support/corpus-tests/failures → spec_tests/data/corpus_legacy}/binary.json +0 -0
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/boolean.json +0 -0
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/code.json +1 -1
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/code_w_scope.json +1 -1
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/document.json +1 -1
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/double.json +1 -1
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/failures/datetime.json +0 -0
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/failures/dbpointer.json +0 -0
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/failures/int64.json +0 -0
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/failures/symbol.json +0 -0
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/int32.json +1 -1
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/maxkey.json +1 -1
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/minkey.json +1 -1
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/null.json +1 -1
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/oid.json +0 -0
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/regex.json +1 -1
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/string.json +0 -0
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/timestamp.json +1 -1
- data/spec/{support/corpus-tests → spec_tests/data/corpus_legacy}/top.json +0 -0
- data/spec/{support/corpus-tests/failures → spec_tests/data/corpus_legacy}/undefined.json +0 -0
- data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-1.json +0 -0
- data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-2.json +0 -0
- data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-3.json +0 -0
- data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-4.json +0 -0
- data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-5.json +0 -0
- data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-6.json +0 -0
- data/spec/{support/driver-spec-tests → spec_tests/data}/decimal128/decimal128-7.json +0 -0
- data/spec/support/shared_examples.rb +3 -5
- data/spec/support/spec_config.rb +16 -0
- data/spec/support/utils.rb +10 -0
- metadata +227 -124
- metadata.gz.sig +0 -0
- data/ext/bson/bson_native.c +0 -762
@@ -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
|
+
}
|