@litert/typeguard 1.3.0-dev.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.md +7 -1
- package/lib/BuiltInTypeCompiler.d.ts +1 -1
- package/lib/BuiltInTypeCompiler.js +4 -4
- package/lib/BuiltInTypeCompiler.js.map +1 -1
- package/lib/BuiltInTypes.d.ts +1 -1
- package/lib/BuiltInTypes.js +1 -1
- package/lib/Common.d.ts +6 -5
- package/lib/Common.d.ts.map +1 -1
- package/lib/Common.js +1 -1
- package/lib/Compiler.d.ts +1 -1
- package/lib/Compiler.d.ts.map +1 -1
- package/lib/Compiler.js +57 -35
- package/lib/Compiler.js.map +1 -1
- package/lib/Context.d.ts +2 -2
- package/lib/Context.d.ts.map +1 -1
- package/lib/Context.js +2 -2
- package/lib/Context.js.map +1 -1
- package/lib/FilterCompiler.d.ts +3 -3
- package/lib/FilterCompiler.d.ts.map +1 -1
- package/lib/FilterCompiler.js +4 -4
- package/lib/FilterCompiler.js.map +1 -1
- package/lib/InlineCompiler.d.ts +2 -2
- package/lib/InlineCompiler.d.ts.map +1 -1
- package/lib/InlineCompiler.js +5 -7
- package/lib/InlineCompiler.js.map +1 -1
- package/lib/Internal.d.ts +9 -4
- package/lib/Internal.d.ts.map +1 -1
- package/lib/Internal.js +45 -4
- package/lib/Internal.js.map +1 -1
- package/lib/Modifiers.d.ts +2 -1
- package/lib/Modifiers.d.ts.map +1 -1
- package/lib/Modifiers.js +3 -2
- package/lib/Modifiers.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/langs/JavaScript.d.ts +1 -1
- package/lib/langs/JavaScript.js +2 -2
- package/package.json +11 -13
- package/src/examples/quick-start.ts +5 -1
- package/src/lib/BuiltInTypeCompiler.ts +4 -4
- package/src/lib/BuiltInTypes.ts +1 -1
- package/src/lib/Common.ts +5 -4
- package/src/lib/Compiler.ts +66 -39
- package/src/lib/Context.ts +2 -2
- package/src/lib/FilterCompiler.ts +3 -3
- package/src/lib/InlineCompiler.ts +6 -9
- package/src/lib/Internal.ts +73 -4
- package/src/lib/Modifiers.ts +3 -1
- package/src/lib/index.ts +1 -1
- package/src/lib/langs/JavaScript.ts +2 -2
- package/src/test/00-all.ts +1 -1
- package/src/test/01-elemental-types.ts +580 -580
- package/src/test/02-array-and-list.ts +43 -43
- package/src/test/03-tuple.ts +61 -61
- package/src/test/04-from-string.ts +501 -501
- package/src/test/05-string-asserts.ts +203 -203
- package/src/test/06-structure.ts +71 -71
- package/src/test/07-modifiers.ts +297 -48
- package/src/test/08-map-and-dict.ts +11 -11
- package/src/test/09-exceptions.ts +11 -11
- package/src/test/abstracts.ts +57 -29
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-loss-of-precision */
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { createTestDefinition,
|
|
18
|
+
import { createTestDefinition, defaultItems, ITestSuite } from './abstracts';
|
|
19
19
|
|
|
20
20
|
const testItems: ITestSuite = {
|
|
21
21
|
|
|
22
|
-
name: '
|
|
22
|
+
name: 'Elemental Types',
|
|
23
23
|
sections: [
|
|
24
24
|
|
|
25
25
|
{
|
|
@@ -27,13 +27,13 @@ const testItems: ITestSuite = {
|
|
|
27
27
|
'rule': 2113,
|
|
28
28
|
'items': [
|
|
29
29
|
{
|
|
30
|
-
'
|
|
31
|
-
'
|
|
30
|
+
'title': 'number 2113',
|
|
31
|
+
'value': 2113,
|
|
32
32
|
'expect': true
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
'
|
|
36
|
-
'
|
|
35
|
+
'title': 'string \'2113\'',
|
|
36
|
+
'value': '2113',
|
|
37
37
|
'expect': false
|
|
38
38
|
}
|
|
39
39
|
]
|
|
@@ -43,11 +43,11 @@ const testItems: ITestSuite = {
|
|
|
43
43
|
'rule': null,
|
|
44
44
|
'items': [
|
|
45
45
|
{
|
|
46
|
-
'
|
|
47
|
-
'
|
|
46
|
+
'title': 'string \'null\'',
|
|
47
|
+
'value': 'null',
|
|
48
48
|
'expect': false
|
|
49
49
|
},
|
|
50
|
-
...
|
|
50
|
+
...defaultItems({
|
|
51
51
|
'null': true
|
|
52
52
|
})
|
|
53
53
|
]
|
|
@@ -57,11 +57,11 @@ const testItems: ITestSuite = {
|
|
|
57
57
|
'rule': true,
|
|
58
58
|
'items': [
|
|
59
59
|
{
|
|
60
|
-
'
|
|
61
|
-
'
|
|
60
|
+
'title': 'string \'true\'',
|
|
61
|
+
'value': 'true',
|
|
62
62
|
'expect': false
|
|
63
63
|
},
|
|
64
|
-
...
|
|
64
|
+
...defaultItems({
|
|
65
65
|
'true': true
|
|
66
66
|
})
|
|
67
67
|
]
|
|
@@ -71,11 +71,11 @@ const testItems: ITestSuite = {
|
|
|
71
71
|
'rule': false,
|
|
72
72
|
'items': [
|
|
73
73
|
{
|
|
74
|
-
'
|
|
75
|
-
'
|
|
74
|
+
'title': 'string \'true\'',
|
|
75
|
+
'value': 'true',
|
|
76
76
|
'expect': false
|
|
77
77
|
},
|
|
78
|
-
...
|
|
78
|
+
...defaultItems({
|
|
79
79
|
'false': true
|
|
80
80
|
})
|
|
81
81
|
]
|
|
@@ -84,7 +84,7 @@ const testItems: ITestSuite = {
|
|
|
84
84
|
'name': 'String',
|
|
85
85
|
'rule': 'string',
|
|
86
86
|
'items': [
|
|
87
|
-
...
|
|
87
|
+
...defaultItems({
|
|
88
88
|
'string \'hello\'': true,
|
|
89
89
|
'empty string': true
|
|
90
90
|
})
|
|
@@ -95,21 +95,21 @@ const testItems: ITestSuite = {
|
|
|
95
95
|
'rule': 'string(5)',
|
|
96
96
|
'items': [
|
|
97
97
|
{
|
|
98
|
-
'
|
|
99
|
-
'
|
|
98
|
+
'title': 'string \'world\'',
|
|
99
|
+
'value': 'world',
|
|
100
100
|
'expect': true
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
|
-
'
|
|
104
|
-
'
|
|
103
|
+
'title': 'string \'hi\'',
|
|
104
|
+
'value': 'hi',
|
|
105
105
|
'expect': false
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
|
-
'
|
|
109
|
-
'
|
|
108
|
+
'title': 'string \'logical\'',
|
|
109
|
+
'value': 'logical',
|
|
110
110
|
'expect': false
|
|
111
111
|
},
|
|
112
|
-
...
|
|
112
|
+
...defaultItems({
|
|
113
113
|
'string \'hello\'': true,
|
|
114
114
|
'empty string': false
|
|
115
115
|
})
|
|
@@ -120,21 +120,21 @@ const testItems: ITestSuite = {
|
|
|
120
120
|
'rule': 'string(5,)',
|
|
121
121
|
'items': [
|
|
122
122
|
{
|
|
123
|
-
'
|
|
124
|
-
'
|
|
123
|
+
'title': 'string \'world\'',
|
|
124
|
+
'value': 'world',
|
|
125
125
|
'expect': true
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
|
-
'
|
|
129
|
-
'
|
|
128
|
+
'title': 'string \'hihi\'',
|
|
129
|
+
'value': 'hihi',
|
|
130
130
|
'expect': false
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
|
-
'
|
|
134
|
-
'
|
|
133
|
+
'title': 'string \'logical\'',
|
|
134
|
+
'value': 'logical',
|
|
135
135
|
'expect': true
|
|
136
136
|
},
|
|
137
|
-
...
|
|
137
|
+
...defaultItems({
|
|
138
138
|
'string \'hello\'': true,
|
|
139
139
|
'empty string': false
|
|
140
140
|
})
|
|
@@ -145,8 +145,8 @@ const testItems: ITestSuite = {
|
|
|
145
145
|
'rule': 'string(,5)',
|
|
146
146
|
'items': [
|
|
147
147
|
{
|
|
148
|
-
'
|
|
149
|
-
'
|
|
148
|
+
'title': 'string \'any\'',
|
|
149
|
+
'value': 'any',
|
|
150
150
|
'expect': 'throw'
|
|
151
151
|
}
|
|
152
152
|
]
|
|
@@ -156,8 +156,8 @@ const testItems: ITestSuite = {
|
|
|
156
156
|
'rule': 'string(,)',
|
|
157
157
|
'items': [
|
|
158
158
|
{
|
|
159
|
-
'
|
|
160
|
-
'
|
|
159
|
+
'title': 'string \'any\'',
|
|
160
|
+
'value': 'any',
|
|
161
161
|
'expect': 'throw'
|
|
162
162
|
}
|
|
163
163
|
]
|
|
@@ -167,26 +167,26 @@ const testItems: ITestSuite = {
|
|
|
167
167
|
'rule': 'ascii_string',
|
|
168
168
|
'items': [
|
|
169
169
|
{
|
|
170
|
-
'
|
|
171
|
-
'
|
|
170
|
+
'title': 'string \'world\'',
|
|
171
|
+
'value': 'world',
|
|
172
172
|
'expect': true
|
|
173
173
|
},
|
|
174
174
|
{
|
|
175
|
-
'
|
|
176
|
-
'
|
|
175
|
+
'title': 'string \'hi\'',
|
|
176
|
+
'value': 'hi',
|
|
177
177
|
'expect': true
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
|
-
'
|
|
181
|
-
'
|
|
180
|
+
'title': 'string \'proper\'',
|
|
181
|
+
'value': 'proper',
|
|
182
182
|
'expect': true
|
|
183
183
|
},
|
|
184
184
|
{
|
|
185
|
-
'
|
|
186
|
-
'
|
|
185
|
+
'title': 'string \'logical\'',
|
|
186
|
+
'value': 'logical',
|
|
187
187
|
'expect': true
|
|
188
188
|
},
|
|
189
|
-
...
|
|
189
|
+
...defaultItems({
|
|
190
190
|
'string \'hello\'': true,
|
|
191
191
|
'empty string': true
|
|
192
192
|
})
|
|
@@ -197,26 +197,26 @@ const testItems: ITestSuite = {
|
|
|
197
197
|
'rule': 'string(2, 6)',
|
|
198
198
|
'items': [
|
|
199
199
|
{
|
|
200
|
-
'
|
|
201
|
-
'
|
|
200
|
+
'title': 'string \'world\'',
|
|
201
|
+
'value': 'world',
|
|
202
202
|
'expect': true
|
|
203
203
|
},
|
|
204
204
|
{
|
|
205
|
-
'
|
|
206
|
-
'
|
|
205
|
+
'title': 'string \'hi\'',
|
|
206
|
+
'value': 'hi',
|
|
207
207
|
'expect': true
|
|
208
208
|
},
|
|
209
209
|
{
|
|
210
|
-
'
|
|
211
|
-
'
|
|
210
|
+
'title': 'string \'proper\'',
|
|
211
|
+
'value': 'proper',
|
|
212
212
|
'expect': true
|
|
213
213
|
},
|
|
214
214
|
{
|
|
215
|
-
'
|
|
216
|
-
'
|
|
215
|
+
'title': 'string \'logical\'',
|
|
216
|
+
'value': 'logical',
|
|
217
217
|
'expect': false
|
|
218
218
|
},
|
|
219
|
-
...
|
|
219
|
+
...defaultItems({
|
|
220
220
|
'string \'hello\'': true,
|
|
221
221
|
'empty string': false
|
|
222
222
|
})
|
|
@@ -227,26 +227,26 @@ const testItems: ITestSuite = {
|
|
|
227
227
|
'rule': 'latin_string(2, 6)',
|
|
228
228
|
'items': [
|
|
229
229
|
{
|
|
230
|
-
'
|
|
231
|
-
'
|
|
230
|
+
'title': 'string \'ⱠⱡⱢab\'',
|
|
231
|
+
'value': 'ⱠⱡⱢab',
|
|
232
232
|
'expect': true
|
|
233
233
|
},
|
|
234
234
|
{
|
|
235
|
-
'
|
|
236
|
-
'
|
|
235
|
+
'title': 'string \'Ᵽ\'',
|
|
236
|
+
'value': 'Ᵽ',
|
|
237
237
|
'expect': false
|
|
238
238
|
},
|
|
239
239
|
{
|
|
240
|
-
'
|
|
241
|
-
'
|
|
240
|
+
'title': 'string \'proper\'',
|
|
241
|
+
'value': 'proper',
|
|
242
242
|
'expect': true
|
|
243
243
|
},
|
|
244
244
|
{
|
|
245
|
-
'
|
|
246
|
-
'
|
|
245
|
+
'title': 'string \'logical\'',
|
|
246
|
+
'value': 'logical',
|
|
247
247
|
'expect': false
|
|
248
248
|
},
|
|
249
|
-
...
|
|
249
|
+
...defaultItems({
|
|
250
250
|
'string \'hello\'': true,
|
|
251
251
|
'empty string': false
|
|
252
252
|
})
|
|
@@ -257,31 +257,31 @@ const testItems: ITestSuite = {
|
|
|
257
257
|
'rule': 'ascii_string(2, 6)',
|
|
258
258
|
'items': [
|
|
259
259
|
{
|
|
260
|
-
'
|
|
261
|
-
'
|
|
260
|
+
'title': 'string \'proper\'',
|
|
261
|
+
'value': 'proper',
|
|
262
262
|
'expect': true
|
|
263
263
|
},
|
|
264
264
|
{
|
|
265
|
-
'
|
|
266
|
-
'
|
|
265
|
+
'title': 'string \'world\'',
|
|
266
|
+
'value': 'world',
|
|
267
267
|
'expect': true
|
|
268
268
|
},
|
|
269
269
|
{
|
|
270
|
-
'
|
|
271
|
-
'
|
|
270
|
+
'title': 'string \'logical\'',
|
|
271
|
+
'value': 'logical',
|
|
272
272
|
'expect': false
|
|
273
273
|
},
|
|
274
274
|
{
|
|
275
|
-
'
|
|
276
|
-
'
|
|
275
|
+
'title': 'string \'ⱠⱡⱢab\'',
|
|
276
|
+
'value': 'ⱠⱡⱢab',
|
|
277
277
|
'expect': false
|
|
278
278
|
},
|
|
279
279
|
{
|
|
280
|
-
'
|
|
281
|
-
'
|
|
280
|
+
'title': 'string \'Ᵽ\'',
|
|
281
|
+
'value': 'Ᵽ',
|
|
282
282
|
'expect': false
|
|
283
283
|
},
|
|
284
|
-
...
|
|
284
|
+
...defaultItems({
|
|
285
285
|
'string \'hello\'': true,
|
|
286
286
|
'empty string': false
|
|
287
287
|
})
|
|
@@ -292,36 +292,36 @@ const testItems: ITestSuite = {
|
|
|
292
292
|
'rule': 'hex_string(2, 8)',
|
|
293
293
|
'items': [
|
|
294
294
|
{
|
|
295
|
-
'
|
|
296
|
-
'
|
|
295
|
+
'title': 'string \'fffff\'',
|
|
296
|
+
'value': 'fffff',
|
|
297
297
|
'expect': true
|
|
298
298
|
},
|
|
299
299
|
{
|
|
300
|
-
'
|
|
301
|
-
'
|
|
300
|
+
'title': 'string \'1234a\'',
|
|
301
|
+
'value': '1234a',
|
|
302
302
|
'expect': true
|
|
303
303
|
},
|
|
304
304
|
{
|
|
305
|
-
'
|
|
306
|
-
'
|
|
305
|
+
'title': 'string \'fffffffffffff\'',
|
|
306
|
+
'value': 'fffffffffffff',
|
|
307
307
|
'expect': false
|
|
308
308
|
},
|
|
309
309
|
{
|
|
310
|
-
'
|
|
311
|
-
'
|
|
310
|
+
'title': 'string \'logical\'',
|
|
311
|
+
'value': 'logical',
|
|
312
312
|
'expect': false
|
|
313
313
|
},
|
|
314
314
|
{
|
|
315
|
-
'
|
|
316
|
-
'
|
|
315
|
+
'title': 'string \'ⱠⱡⱢab\'',
|
|
316
|
+
'value': 'ⱠⱡⱢab',
|
|
317
317
|
'expect': false
|
|
318
318
|
},
|
|
319
319
|
{
|
|
320
|
-
'
|
|
321
|
-
'
|
|
320
|
+
'title': 'string \'Ᵽ\'',
|
|
321
|
+
'value': 'Ᵽ',
|
|
322
322
|
'expect': false
|
|
323
323
|
},
|
|
324
|
-
...
|
|
324
|
+
...defaultItems({
|
|
325
325
|
'string \'hello\'': false,
|
|
326
326
|
'empty string': false
|
|
327
327
|
})
|
|
@@ -332,16 +332,16 @@ const testItems: ITestSuite = {
|
|
|
332
332
|
'rule': 'boolean',
|
|
333
333
|
'items': [
|
|
334
334
|
{
|
|
335
|
-
'
|
|
336
|
-
'
|
|
335
|
+
'title': 'string \'true\'',
|
|
336
|
+
'value': 'true',
|
|
337
337
|
'expect': false
|
|
338
338
|
},
|
|
339
339
|
{
|
|
340
|
-
'
|
|
341
|
-
'
|
|
340
|
+
'title': 'string \'false\'',
|
|
341
|
+
'value': 'false',
|
|
342
342
|
'expect': false
|
|
343
343
|
},
|
|
344
|
-
...
|
|
344
|
+
...defaultItems({
|
|
345
345
|
'true': true,
|
|
346
346
|
'false': true
|
|
347
347
|
})
|
|
@@ -352,11 +352,11 @@ const testItems: ITestSuite = {
|
|
|
352
352
|
'rule': 'true',
|
|
353
353
|
'items': [
|
|
354
354
|
{
|
|
355
|
-
'
|
|
356
|
-
'
|
|
355
|
+
'title': 'string \'true\'',
|
|
356
|
+
'value': 'true',
|
|
357
357
|
'expect': false
|
|
358
358
|
},
|
|
359
|
-
...
|
|
359
|
+
...defaultItems({
|
|
360
360
|
'true': true,
|
|
361
361
|
'false': false
|
|
362
362
|
})
|
|
@@ -367,11 +367,11 @@ const testItems: ITestSuite = {
|
|
|
367
367
|
'rule': 'false',
|
|
368
368
|
'items': [
|
|
369
369
|
{
|
|
370
|
-
'
|
|
371
|
-
'
|
|
370
|
+
'title': 'string \'false\'',
|
|
371
|
+
'value': 'false',
|
|
372
372
|
'expect': false
|
|
373
373
|
},
|
|
374
|
-
...
|
|
374
|
+
...defaultItems({
|
|
375
375
|
'true': false,
|
|
376
376
|
'false': true
|
|
377
377
|
})
|
|
@@ -382,11 +382,11 @@ const testItems: ITestSuite = {
|
|
|
382
382
|
'rule': 'true_value',
|
|
383
383
|
'items': [
|
|
384
384
|
{
|
|
385
|
-
'
|
|
386
|
-
'
|
|
385
|
+
'title': 'string \'true\'',
|
|
386
|
+
'value': 'true',
|
|
387
387
|
'expect': true
|
|
388
388
|
},
|
|
389
|
-
...
|
|
389
|
+
...defaultItems({
|
|
390
390
|
'true': true,
|
|
391
391
|
'false': false,
|
|
392
392
|
'object': true,
|
|
@@ -401,11 +401,11 @@ const testItems: ITestSuite = {
|
|
|
401
401
|
'rule': 'false_value',
|
|
402
402
|
'items': [
|
|
403
403
|
{
|
|
404
|
-
'
|
|
405
|
-
'
|
|
404
|
+
'title': 'string \'false\'',
|
|
405
|
+
'value': 'false',
|
|
406
406
|
'expect': false
|
|
407
407
|
},
|
|
408
|
-
...
|
|
408
|
+
...defaultItems({
|
|
409
409
|
'true': false,
|
|
410
410
|
'false': true,
|
|
411
411
|
'number 0': true,
|
|
@@ -420,16 +420,16 @@ const testItems: ITestSuite = {
|
|
|
420
420
|
'rule': 'int',
|
|
421
421
|
'items': [
|
|
422
422
|
{
|
|
423
|
-
'
|
|
424
|
-
'
|
|
423
|
+
'title': 'number -1',
|
|
424
|
+
'value': -1,
|
|
425
425
|
'expect': true
|
|
426
426
|
},
|
|
427
427
|
{
|
|
428
|
-
'
|
|
429
|
-
'
|
|
428
|
+
'title': 'number 1.23',
|
|
429
|
+
'value': 1.23,
|
|
430
430
|
'expect': false
|
|
431
431
|
},
|
|
432
|
-
...
|
|
432
|
+
...defaultItems({
|
|
433
433
|
'number 0': true,
|
|
434
434
|
'number 1': true
|
|
435
435
|
})
|
|
@@ -440,8 +440,8 @@ const testItems: ITestSuite = {
|
|
|
440
440
|
'rule': 'int(,)',
|
|
441
441
|
'items': [
|
|
442
442
|
{
|
|
443
|
-
'
|
|
444
|
-
'
|
|
443
|
+
'title': 'any',
|
|
444
|
+
'value': 'any',
|
|
445
445
|
'expect': 'throw'
|
|
446
446
|
}
|
|
447
447
|
]
|
|
@@ -451,31 +451,31 @@ const testItems: ITestSuite = {
|
|
|
451
451
|
'rule': 'int(10,)',
|
|
452
452
|
'items': [
|
|
453
453
|
{
|
|
454
|
-
'
|
|
455
|
-
'
|
|
454
|
+
'title': 'number 11',
|
|
455
|
+
'value': 11,
|
|
456
456
|
'expect': true
|
|
457
457
|
},
|
|
458
458
|
{
|
|
459
|
-
'
|
|
460
|
-
'
|
|
459
|
+
'title': 'number 10',
|
|
460
|
+
'value': 10,
|
|
461
461
|
'expect': true
|
|
462
462
|
},
|
|
463
463
|
{
|
|
464
|
-
'
|
|
465
|
-
'
|
|
464
|
+
'title': 'number -1',
|
|
465
|
+
'value': -1,
|
|
466
466
|
'expect': false
|
|
467
467
|
},
|
|
468
468
|
{
|
|
469
|
-
'
|
|
470
|
-
'
|
|
469
|
+
'title': 'number 9',
|
|
470
|
+
'value': 9,
|
|
471
471
|
'expect': false
|
|
472
472
|
},
|
|
473
473
|
{
|
|
474
|
-
'
|
|
475
|
-
'
|
|
474
|
+
'title': 'number 1.23',
|
|
475
|
+
'value': 1.23,
|
|
476
476
|
'expect': false
|
|
477
477
|
},
|
|
478
|
-
...
|
|
478
|
+
...defaultItems({
|
|
479
479
|
'number 0': false,
|
|
480
480
|
'number 1': false
|
|
481
481
|
})
|
|
@@ -486,31 +486,31 @@ const testItems: ITestSuite = {
|
|
|
486
486
|
'rule': 'int(,10)',
|
|
487
487
|
'items': [
|
|
488
488
|
{
|
|
489
|
-
'
|
|
490
|
-
'
|
|
489
|
+
'title': 'number 11',
|
|
490
|
+
'value': 11,
|
|
491
491
|
'expect': false
|
|
492
492
|
},
|
|
493
493
|
{
|
|
494
|
-
'
|
|
495
|
-
'
|
|
494
|
+
'title': 'number 10',
|
|
495
|
+
'value': 10,
|
|
496
496
|
'expect': true
|
|
497
497
|
},
|
|
498
498
|
{
|
|
499
|
-
'
|
|
500
|
-
'
|
|
499
|
+
'title': 'number -1',
|
|
500
|
+
'value': -1,
|
|
501
501
|
'expect': true
|
|
502
502
|
},
|
|
503
503
|
{
|
|
504
|
-
'
|
|
505
|
-
'
|
|
504
|
+
'title': 'number 9',
|
|
505
|
+
'value': 9,
|
|
506
506
|
'expect': true
|
|
507
507
|
},
|
|
508
508
|
{
|
|
509
|
-
'
|
|
510
|
-
'
|
|
509
|
+
'title': 'number 1.23',
|
|
510
|
+
'value': 1.23,
|
|
511
511
|
'expect': false
|
|
512
512
|
},
|
|
513
|
-
...
|
|
513
|
+
...defaultItems({
|
|
514
514
|
'number 0': true,
|
|
515
515
|
'number 1': true
|
|
516
516
|
})
|
|
@@ -521,41 +521,41 @@ const testItems: ITestSuite = {
|
|
|
521
521
|
'rule': 'int(-12, 25)',
|
|
522
522
|
'items': [
|
|
523
523
|
{
|
|
524
|
-
'
|
|
525
|
-
'
|
|
524
|
+
'title': 'number -1',
|
|
525
|
+
'value': -1,
|
|
526
526
|
'expect': true
|
|
527
527
|
},
|
|
528
528
|
{
|
|
529
|
-
'
|
|
530
|
-
'
|
|
529
|
+
'title': 'number -12',
|
|
530
|
+
'value': -12,
|
|
531
531
|
'expect': true
|
|
532
532
|
},
|
|
533
533
|
{
|
|
534
|
-
'
|
|
535
|
-
'
|
|
534
|
+
'title': 'number 25',
|
|
535
|
+
'value': 25,
|
|
536
536
|
'expect': true
|
|
537
537
|
},
|
|
538
538
|
{
|
|
539
|
-
'
|
|
540
|
-
'
|
|
539
|
+
'title': 'number 26',
|
|
540
|
+
'value': 26,
|
|
541
541
|
'expect': false
|
|
542
542
|
},
|
|
543
543
|
{
|
|
544
|
-
'
|
|
545
|
-
'
|
|
544
|
+
'title': 'number -13',
|
|
545
|
+
'value': -13,
|
|
546
546
|
'expect': false
|
|
547
547
|
},
|
|
548
548
|
{
|
|
549
|
-
'
|
|
550
|
-
'
|
|
549
|
+
'title': 'number -11.5',
|
|
550
|
+
'value': -11.5,
|
|
551
551
|
'expect': false
|
|
552
552
|
},
|
|
553
553
|
{
|
|
554
|
-
'
|
|
555
|
-
'
|
|
554
|
+
'title': 'number 1.23',
|
|
555
|
+
'value': 1.23,
|
|
556
556
|
'expect': false
|
|
557
557
|
},
|
|
558
|
-
...
|
|
558
|
+
...defaultItems({
|
|
559
559
|
'number 0': true,
|
|
560
560
|
'number 1': true
|
|
561
561
|
})
|
|
@@ -566,41 +566,41 @@ const testItems: ITestSuite = {
|
|
|
566
566
|
'rule': 'int8',
|
|
567
567
|
'items': [
|
|
568
568
|
{
|
|
569
|
-
'
|
|
570
|
-
'
|
|
569
|
+
'title': 'number -1',
|
|
570
|
+
'value': -1,
|
|
571
571
|
'expect': true
|
|
572
572
|
},
|
|
573
573
|
{
|
|
574
|
-
'
|
|
575
|
-
'
|
|
574
|
+
'title': 'number -0x80',
|
|
575
|
+
'value': -0x80,
|
|
576
576
|
'expect': true
|
|
577
577
|
},
|
|
578
578
|
{
|
|
579
|
-
'
|
|
580
|
-
'
|
|
579
|
+
'title': 'number 0x7F',
|
|
580
|
+
'value': 0x7F,
|
|
581
581
|
'expect': true
|
|
582
582
|
},
|
|
583
583
|
{
|
|
584
|
-
'
|
|
585
|
-
'
|
|
584
|
+
'title': 'number 0x80',
|
|
585
|
+
'value': 0x80,
|
|
586
586
|
'expect': false
|
|
587
587
|
},
|
|
588
588
|
{
|
|
589
|
-
'
|
|
590
|
-
'
|
|
589
|
+
'title': 'number -0x81',
|
|
590
|
+
'value': -0x81,
|
|
591
591
|
'expect': false
|
|
592
592
|
},
|
|
593
593
|
{
|
|
594
|
-
'
|
|
595
|
-
'
|
|
594
|
+
'title': 'number 1.23',
|
|
595
|
+
'value': 1.23,
|
|
596
596
|
'expect': false
|
|
597
597
|
},
|
|
598
598
|
{
|
|
599
|
-
'
|
|
600
|
-
'
|
|
599
|
+
'title': 'number -1.23',
|
|
600
|
+
'value': -1.23,
|
|
601
601
|
'expect': false
|
|
602
602
|
},
|
|
603
|
-
...
|
|
603
|
+
...defaultItems({
|
|
604
604
|
'number 0': true,
|
|
605
605
|
'number 1': true
|
|
606
606
|
})
|
|
@@ -611,41 +611,41 @@ const testItems: ITestSuite = {
|
|
|
611
611
|
'rule': 'int16',
|
|
612
612
|
'items': [
|
|
613
613
|
{
|
|
614
|
-
'
|
|
615
|
-
'
|
|
614
|
+
'title': 'number -1',
|
|
615
|
+
'value': -1,
|
|
616
616
|
'expect': true
|
|
617
617
|
},
|
|
618
618
|
{
|
|
619
|
-
'
|
|
620
|
-
'
|
|
619
|
+
'title': 'number -0x8000',
|
|
620
|
+
'value': -0x8000,
|
|
621
621
|
'expect': true
|
|
622
622
|
},
|
|
623
623
|
{
|
|
624
|
-
'
|
|
625
|
-
'
|
|
624
|
+
'title': 'number 0x7FFF',
|
|
625
|
+
'value': 0x7FFF,
|
|
626
626
|
'expect': true
|
|
627
627
|
},
|
|
628
628
|
{
|
|
629
|
-
'
|
|
630
|
-
'
|
|
629
|
+
'title': 'number 0x8000',
|
|
630
|
+
'value': 0x8000,
|
|
631
631
|
'expect': false
|
|
632
632
|
},
|
|
633
633
|
{
|
|
634
|
-
'
|
|
635
|
-
'
|
|
634
|
+
'title': 'number -0x8001',
|
|
635
|
+
'value': -0x8001,
|
|
636
636
|
'expect': false
|
|
637
637
|
},
|
|
638
638
|
{
|
|
639
|
-
'
|
|
640
|
-
'
|
|
639
|
+
'title': 'number 1.23',
|
|
640
|
+
'value': 1.23,
|
|
641
641
|
'expect': false
|
|
642
642
|
},
|
|
643
643
|
{
|
|
644
|
-
'
|
|
645
|
-
'
|
|
644
|
+
'title': 'number -1.23',
|
|
645
|
+
'value': -1.23,
|
|
646
646
|
'expect': false
|
|
647
647
|
},
|
|
648
|
-
...
|
|
648
|
+
...defaultItems({
|
|
649
649
|
'number 0': true,
|
|
650
650
|
'number 1': true
|
|
651
651
|
})
|
|
@@ -656,41 +656,41 @@ const testItems: ITestSuite = {
|
|
|
656
656
|
'rule': 'int32',
|
|
657
657
|
'items': [
|
|
658
658
|
{
|
|
659
|
-
'
|
|
660
|
-
'
|
|
659
|
+
'title': 'number -1',
|
|
660
|
+
'value': -1,
|
|
661
661
|
'expect': true
|
|
662
662
|
},
|
|
663
663
|
{
|
|
664
|
-
'
|
|
665
|
-
'
|
|
664
|
+
'title': 'number -0x80000000',
|
|
665
|
+
'value': -0x80000000,
|
|
666
666
|
'expect': true
|
|
667
667
|
},
|
|
668
668
|
{
|
|
669
|
-
'
|
|
670
|
-
'
|
|
669
|
+
'title': 'number 0x7FFFFFFF',
|
|
670
|
+
'value': 0x7FFFFFFF,
|
|
671
671
|
'expect': true
|
|
672
672
|
},
|
|
673
673
|
{
|
|
674
|
-
'
|
|
675
|
-
'
|
|
674
|
+
'title': 'number 0x80000000',
|
|
675
|
+
'value': 0x80000000,
|
|
676
676
|
'expect': false
|
|
677
677
|
},
|
|
678
678
|
{
|
|
679
|
-
'
|
|
680
|
-
'
|
|
679
|
+
'title': 'number -0x80000001',
|
|
680
|
+
'value': -0x80000001,
|
|
681
681
|
'expect': false
|
|
682
682
|
},
|
|
683
683
|
{
|
|
684
|
-
'
|
|
685
|
-
'
|
|
684
|
+
'title': 'number 1.23',
|
|
685
|
+
'value': 1.23,
|
|
686
686
|
'expect': false
|
|
687
687
|
},
|
|
688
688
|
{
|
|
689
|
-
'
|
|
690
|
-
'
|
|
689
|
+
'title': 'number -1.23',
|
|
690
|
+
'value': -1.23,
|
|
691
691
|
'expect': false
|
|
692
692
|
},
|
|
693
|
-
...
|
|
693
|
+
...defaultItems({
|
|
694
694
|
'number 0': true,
|
|
695
695
|
'number 1': true
|
|
696
696
|
})
|
|
@@ -701,36 +701,36 @@ const testItems: ITestSuite = {
|
|
|
701
701
|
'rule': 'int64',
|
|
702
702
|
'items': [
|
|
703
703
|
{
|
|
704
|
-
'
|
|
705
|
-
'
|
|
704
|
+
'title': 'number -1',
|
|
705
|
+
'value': -1,
|
|
706
706
|
'expect': true
|
|
707
707
|
},
|
|
708
708
|
{
|
|
709
|
-
'
|
|
710
|
-
'
|
|
709
|
+
'title': 'number -0x8000000000000000',
|
|
710
|
+
'value': -0x8000000000000000,
|
|
711
711
|
'expect': true
|
|
712
712
|
},
|
|
713
713
|
{
|
|
714
|
-
'
|
|
715
|
-
'
|
|
714
|
+
'title': 'number 0x7FFFFFFF',
|
|
715
|
+
'value': 0x7FFFFFFF,
|
|
716
716
|
'expect': true
|
|
717
717
|
},
|
|
718
718
|
{
|
|
719
|
-
'
|
|
720
|
-
'
|
|
719
|
+
'title': 'number 0x7FFFFFFFFFFFFFFF',
|
|
720
|
+
'value': 0x7FFFFFFFFFFFFFFF,
|
|
721
721
|
'expect': true
|
|
722
722
|
},
|
|
723
723
|
{
|
|
724
|
-
'
|
|
725
|
-
'
|
|
724
|
+
'title': 'number 1.23',
|
|
725
|
+
'value': 1.23,
|
|
726
726
|
'expect': false
|
|
727
727
|
},
|
|
728
728
|
{
|
|
729
|
-
'
|
|
730
|
-
'
|
|
729
|
+
'title': 'number -1.23',
|
|
730
|
+
'value': -1.23,
|
|
731
731
|
'expect': false
|
|
732
732
|
},
|
|
733
|
-
...
|
|
733
|
+
...defaultItems({
|
|
734
734
|
'number 0': true,
|
|
735
735
|
'number 1': true
|
|
736
736
|
})
|
|
@@ -741,16 +741,16 @@ const testItems: ITestSuite = {
|
|
|
741
741
|
'rule': 'uint',
|
|
742
742
|
'items': [
|
|
743
743
|
{
|
|
744
|
-
'
|
|
745
|
-
'
|
|
744
|
+
'title': 'number -1',
|
|
745
|
+
'value': -1,
|
|
746
746
|
'expect': false
|
|
747
747
|
},
|
|
748
748
|
{
|
|
749
|
-
'
|
|
750
|
-
'
|
|
749
|
+
'title': 'number 1.23',
|
|
750
|
+
'value': 1.23,
|
|
751
751
|
'expect': false
|
|
752
752
|
},
|
|
753
|
-
...
|
|
753
|
+
...defaultItems({
|
|
754
754
|
'number 0': true,
|
|
755
755
|
'number 1': true
|
|
756
756
|
})
|
|
@@ -761,31 +761,31 @@ const testItems: ITestSuite = {
|
|
|
761
761
|
'rule': 'uint8',
|
|
762
762
|
'items': [
|
|
763
763
|
{
|
|
764
|
-
'
|
|
765
|
-
'
|
|
764
|
+
'title': 'number -1',
|
|
765
|
+
'value': -1,
|
|
766
766
|
'expect': false
|
|
767
767
|
},
|
|
768
768
|
{
|
|
769
|
-
'
|
|
770
|
-
'
|
|
769
|
+
'title': 'number 0xFF',
|
|
770
|
+
'value': 0xFF,
|
|
771
771
|
'expect': true
|
|
772
772
|
},
|
|
773
773
|
{
|
|
774
|
-
'
|
|
775
|
-
'
|
|
774
|
+
'title': 'number 0x100',
|
|
775
|
+
'value': 0x100,
|
|
776
776
|
'expect': false
|
|
777
777
|
},
|
|
778
778
|
{
|
|
779
|
-
'
|
|
780
|
-
'
|
|
779
|
+
'title': 'number 1.23',
|
|
780
|
+
'value': 1.23,
|
|
781
781
|
'expect': false
|
|
782
782
|
},
|
|
783
783
|
{
|
|
784
|
-
'
|
|
785
|
-
'
|
|
784
|
+
'title': 'number -1.23',
|
|
785
|
+
'value': -1.23,
|
|
786
786
|
'expect': false
|
|
787
787
|
},
|
|
788
|
-
...
|
|
788
|
+
...defaultItems({
|
|
789
789
|
'number 0': true,
|
|
790
790
|
'number 1': true
|
|
791
791
|
})
|
|
@@ -796,31 +796,31 @@ const testItems: ITestSuite = {
|
|
|
796
796
|
'rule': 'uint16',
|
|
797
797
|
'items': [
|
|
798
798
|
{
|
|
799
|
-
'
|
|
800
|
-
'
|
|
799
|
+
'title': 'number -1',
|
|
800
|
+
'value': -1,
|
|
801
801
|
'expect': false
|
|
802
802
|
},
|
|
803
803
|
{
|
|
804
|
-
'
|
|
805
|
-
'
|
|
804
|
+
'title': 'number 0xFFFF',
|
|
805
|
+
'value': 0xFFFF,
|
|
806
806
|
'expect': true
|
|
807
807
|
},
|
|
808
808
|
{
|
|
809
|
-
'
|
|
810
|
-
'
|
|
809
|
+
'title': 'number 0x10000',
|
|
810
|
+
'value': 0x10000,
|
|
811
811
|
'expect': false
|
|
812
812
|
},
|
|
813
813
|
{
|
|
814
|
-
'
|
|
815
|
-
'
|
|
814
|
+
'title': 'number 1.23',
|
|
815
|
+
'value': 1.23,
|
|
816
816
|
'expect': false
|
|
817
817
|
},
|
|
818
818
|
{
|
|
819
|
-
'
|
|
820
|
-
'
|
|
819
|
+
'title': 'number -1.23',
|
|
820
|
+
'value': -1.23,
|
|
821
821
|
'expect': false
|
|
822
822
|
},
|
|
823
|
-
...
|
|
823
|
+
...defaultItems({
|
|
824
824
|
'number 0': true,
|
|
825
825
|
'number 1': true
|
|
826
826
|
})
|
|
@@ -831,31 +831,31 @@ const testItems: ITestSuite = {
|
|
|
831
831
|
'rule': 'uint32',
|
|
832
832
|
'items': [
|
|
833
833
|
{
|
|
834
|
-
'
|
|
835
|
-
'
|
|
834
|
+
'title': 'number -1',
|
|
835
|
+
'value': -1,
|
|
836
836
|
'expect': false
|
|
837
837
|
},
|
|
838
838
|
{
|
|
839
|
-
'
|
|
840
|
-
'
|
|
839
|
+
'title': 'number 0xFFFFFFFF',
|
|
840
|
+
'value': 0xFFFFFFFF,
|
|
841
841
|
'expect': true
|
|
842
842
|
},
|
|
843
843
|
{
|
|
844
|
-
'
|
|
845
|
-
'
|
|
844
|
+
'title': 'number 0x100000000',
|
|
845
|
+
'value': 0x100000000,
|
|
846
846
|
'expect': false
|
|
847
847
|
},
|
|
848
848
|
{
|
|
849
|
-
'
|
|
850
|
-
'
|
|
849
|
+
'title': 'number 1.23',
|
|
850
|
+
'value': 1.23,
|
|
851
851
|
'expect': false
|
|
852
852
|
},
|
|
853
853
|
{
|
|
854
|
-
'
|
|
855
|
-
'
|
|
854
|
+
'title': 'number -1.23',
|
|
855
|
+
'value': -1.23,
|
|
856
856
|
'expect': false
|
|
857
857
|
},
|
|
858
|
-
...
|
|
858
|
+
...defaultItems({
|
|
859
859
|
'number 0': true,
|
|
860
860
|
'number 1': true
|
|
861
861
|
})
|
|
@@ -866,31 +866,31 @@ const testItems: ITestSuite = {
|
|
|
866
866
|
'rule': 'uint64',
|
|
867
867
|
'items': [
|
|
868
868
|
{
|
|
869
|
-
'
|
|
870
|
-
'
|
|
869
|
+
'title': 'number -1',
|
|
870
|
+
'value': -1,
|
|
871
871
|
'expect': false
|
|
872
872
|
},
|
|
873
873
|
{
|
|
874
|
-
'
|
|
875
|
-
'
|
|
874
|
+
'title': 'number 0xFFFFFFFFFFFFFFFF',
|
|
875
|
+
'value': 0xFFFFFFFFFFFFFFFF,
|
|
876
876
|
'expect': true
|
|
877
877
|
},
|
|
878
878
|
{
|
|
879
|
-
'
|
|
880
|
-
'
|
|
879
|
+
'title': 'number 0x7FFFFFFF',
|
|
880
|
+
'value': 0x7FFFFFFF,
|
|
881
881
|
'expect': true
|
|
882
882
|
},
|
|
883
883
|
{
|
|
884
|
-
'
|
|
885
|
-
'
|
|
884
|
+
'title': 'number 1.23',
|
|
885
|
+
'value': 1.23,
|
|
886
886
|
'expect': false
|
|
887
887
|
},
|
|
888
888
|
{
|
|
889
|
-
'
|
|
890
|
-
'
|
|
889
|
+
'title': 'number -1.23',
|
|
890
|
+
'value': -1.23,
|
|
891
891
|
'expect': false
|
|
892
892
|
},
|
|
893
|
-
...
|
|
893
|
+
...defaultItems({
|
|
894
894
|
'number 0': true,
|
|
895
895
|
'number 1': true
|
|
896
896
|
})
|
|
@@ -901,41 +901,41 @@ const testItems: ITestSuite = {
|
|
|
901
901
|
'rule': 'safe_int',
|
|
902
902
|
'items': [
|
|
903
903
|
{
|
|
904
|
-
'
|
|
905
|
-
'
|
|
904
|
+
'title': 'number -1',
|
|
905
|
+
'value': -1,
|
|
906
906
|
'expect': true
|
|
907
907
|
},
|
|
908
908
|
{
|
|
909
|
-
'
|
|
910
|
-
'
|
|
909
|
+
'title': 'number 9007199254740991',
|
|
910
|
+
'value': 9007199254740991,
|
|
911
911
|
'expect': true
|
|
912
912
|
},
|
|
913
913
|
{
|
|
914
|
-
'
|
|
915
|
-
'
|
|
914
|
+
'title': 'number -9007199254740991',
|
|
915
|
+
'value': -9007199254740991,
|
|
916
916
|
'expect': true
|
|
917
917
|
},
|
|
918
918
|
{
|
|
919
|
-
'
|
|
920
|
-
'
|
|
919
|
+
'title': 'number 9007199254740992',
|
|
920
|
+
'value': 9007199254740992,
|
|
921
921
|
'expect': false
|
|
922
922
|
},
|
|
923
923
|
{
|
|
924
|
-
'
|
|
925
|
-
'
|
|
924
|
+
'title': 'number -9007199254740992',
|
|
925
|
+
'value': -9007199254740992,
|
|
926
926
|
'expect': false
|
|
927
927
|
},
|
|
928
928
|
{
|
|
929
|
-
'
|
|
930
|
-
'
|
|
929
|
+
'title': 'number 1.23',
|
|
930
|
+
'value': 1.23,
|
|
931
931
|
'expect': false
|
|
932
932
|
},
|
|
933
933
|
{
|
|
934
|
-
'
|
|
935
|
-
'
|
|
934
|
+
'title': 'number -1.23',
|
|
935
|
+
'value': -1.23,
|
|
936
936
|
'expect': false
|
|
937
937
|
},
|
|
938
|
-
...
|
|
938
|
+
...defaultItems({
|
|
939
939
|
'number 0': true,
|
|
940
940
|
'number 1': true
|
|
941
941
|
})
|
|
@@ -946,31 +946,31 @@ const testItems: ITestSuite = {
|
|
|
946
946
|
'rule': 'safe_uint',
|
|
947
947
|
'items': [
|
|
948
948
|
{
|
|
949
|
-
'
|
|
950
|
-
'
|
|
949
|
+
'title': 'number -1',
|
|
950
|
+
'value': -1,
|
|
951
951
|
'expect': false
|
|
952
952
|
},
|
|
953
953
|
{
|
|
954
|
-
'
|
|
955
|
-
'
|
|
954
|
+
'title': 'number 9007199254740991',
|
|
955
|
+
'value': 9007199254740991,
|
|
956
956
|
'expect': true
|
|
957
957
|
},
|
|
958
958
|
{
|
|
959
|
-
'
|
|
960
|
-
'
|
|
959
|
+
'title': 'number 9007199254740992',
|
|
960
|
+
'value': 9007199254740992,
|
|
961
961
|
'expect': false
|
|
962
962
|
},
|
|
963
963
|
{
|
|
964
|
-
'
|
|
965
|
-
'
|
|
964
|
+
'title': 'number 1.23',
|
|
965
|
+
'value': 1.23,
|
|
966
966
|
'expect': false
|
|
967
967
|
},
|
|
968
968
|
{
|
|
969
|
-
'
|
|
970
|
-
'
|
|
969
|
+
'title': 'number -1.23',
|
|
970
|
+
'value': -1.23,
|
|
971
971
|
'expect': false
|
|
972
972
|
},
|
|
973
|
-
...
|
|
973
|
+
...defaultItems({
|
|
974
974
|
'number 0': true,
|
|
975
975
|
'number 1': true
|
|
976
976
|
})
|
|
@@ -981,26 +981,26 @@ const testItems: ITestSuite = {
|
|
|
981
981
|
'rule': 'float',
|
|
982
982
|
'items': [
|
|
983
983
|
{
|
|
984
|
-
'
|
|
985
|
-
'
|
|
984
|
+
'title': 'number -1',
|
|
985
|
+
'value': -1,
|
|
986
986
|
'expect': true
|
|
987
987
|
},
|
|
988
988
|
{
|
|
989
|
-
'
|
|
990
|
-
'
|
|
989
|
+
'title': 'number 120312',
|
|
990
|
+
'value': 120312,
|
|
991
991
|
'expect': true
|
|
992
992
|
},
|
|
993
993
|
{
|
|
994
|
-
'
|
|
995
|
-
'
|
|
994
|
+
'title': 'number 1.23',
|
|
995
|
+
'value': 1.23,
|
|
996
996
|
'expect': true
|
|
997
997
|
},
|
|
998
998
|
{
|
|
999
|
-
'
|
|
1000
|
-
'
|
|
999
|
+
'title': 'number -1.23',
|
|
1000
|
+
'value': -1.23,
|
|
1001
1001
|
'expect': true
|
|
1002
1002
|
},
|
|
1003
|
-
...
|
|
1003
|
+
...defaultItems({
|
|
1004
1004
|
'number 0': true,
|
|
1005
1005
|
'number 1': true
|
|
1006
1006
|
})
|
|
@@ -1011,26 +1011,26 @@ const testItems: ITestSuite = {
|
|
|
1011
1011
|
'rule': 'ufloat',
|
|
1012
1012
|
'items': [
|
|
1013
1013
|
{
|
|
1014
|
-
'
|
|
1015
|
-
'
|
|
1014
|
+
'title': 'number -1',
|
|
1015
|
+
'value': -1,
|
|
1016
1016
|
'expect': false
|
|
1017
1017
|
},
|
|
1018
1018
|
{
|
|
1019
|
-
'
|
|
1020
|
-
'
|
|
1019
|
+
'title': 'number 120312',
|
|
1020
|
+
'value': 120312,
|
|
1021
1021
|
'expect': true
|
|
1022
1022
|
},
|
|
1023
1023
|
{
|
|
1024
|
-
'
|
|
1025
|
-
'
|
|
1024
|
+
'title': 'number 1.23',
|
|
1025
|
+
'value': 1.23,
|
|
1026
1026
|
'expect': true
|
|
1027
1027
|
},
|
|
1028
1028
|
{
|
|
1029
|
-
'
|
|
1030
|
-
'
|
|
1029
|
+
'title': 'number -1.23',
|
|
1030
|
+
'value': -1.23,
|
|
1031
1031
|
'expect': false
|
|
1032
1032
|
},
|
|
1033
|
-
...
|
|
1033
|
+
...defaultItems({
|
|
1034
1034
|
'number 0': true,
|
|
1035
1035
|
'number 1': true
|
|
1036
1036
|
})
|
|
@@ -1041,26 +1041,26 @@ const testItems: ITestSuite = {
|
|
|
1041
1041
|
'rule': 'number',
|
|
1042
1042
|
'items': [
|
|
1043
1043
|
{
|
|
1044
|
-
'
|
|
1045
|
-
'
|
|
1044
|
+
'title': 'number -1',
|
|
1045
|
+
'value': -1,
|
|
1046
1046
|
'expect': true
|
|
1047
1047
|
},
|
|
1048
1048
|
{
|
|
1049
|
-
'
|
|
1050
|
-
'
|
|
1049
|
+
'title': 'number 120312',
|
|
1050
|
+
'value': 120312,
|
|
1051
1051
|
'expect': true
|
|
1052
1052
|
},
|
|
1053
1053
|
{
|
|
1054
|
-
'
|
|
1055
|
-
'
|
|
1054
|
+
'title': 'number 1.23',
|
|
1055
|
+
'value': 1.23,
|
|
1056
1056
|
'expect': true
|
|
1057
1057
|
},
|
|
1058
1058
|
{
|
|
1059
|
-
'
|
|
1060
|
-
'
|
|
1059
|
+
'title': 'number -1.23',
|
|
1060
|
+
'value': -1.23,
|
|
1061
1061
|
'expect': true
|
|
1062
1062
|
},
|
|
1063
|
-
...
|
|
1063
|
+
...defaultItems({
|
|
1064
1064
|
'number 0': true,
|
|
1065
1065
|
'number 1': true
|
|
1066
1066
|
})
|
|
@@ -1071,41 +1071,41 @@ const testItems: ITestSuite = {
|
|
|
1071
1071
|
'rule': 'number(1.0, 10.0)',
|
|
1072
1072
|
'items': [
|
|
1073
1073
|
{
|
|
1074
|
-
'
|
|
1075
|
-
'
|
|
1074
|
+
'title': 'number -1',
|
|
1075
|
+
'value': -1,
|
|
1076
1076
|
'expect': false
|
|
1077
1077
|
},
|
|
1078
1078
|
{
|
|
1079
|
-
'
|
|
1080
|
-
'
|
|
1079
|
+
'title': 'number 1',
|
|
1080
|
+
'value': 1,
|
|
1081
1081
|
'expect': true
|
|
1082
1082
|
},
|
|
1083
1083
|
{
|
|
1084
|
-
'
|
|
1085
|
-
'
|
|
1084
|
+
'title': 'number 10',
|
|
1085
|
+
'value': 10,
|
|
1086
1086
|
'expect': true
|
|
1087
1087
|
},
|
|
1088
1088
|
{
|
|
1089
|
-
'
|
|
1090
|
-
'
|
|
1089
|
+
'title': 'number 11',
|
|
1090
|
+
'value': 11,
|
|
1091
1091
|
'expect': false
|
|
1092
1092
|
},
|
|
1093
1093
|
{
|
|
1094
|
-
'
|
|
1095
|
-
'
|
|
1094
|
+
'title': 'number 0',
|
|
1095
|
+
'value': 0,
|
|
1096
1096
|
'expect': false
|
|
1097
1097
|
},
|
|
1098
1098
|
{
|
|
1099
|
-
'
|
|
1100
|
-
'
|
|
1099
|
+
'title': 'number 1.23',
|
|
1100
|
+
'value': 1.23,
|
|
1101
1101
|
'expect': true
|
|
1102
1102
|
},
|
|
1103
1103
|
{
|
|
1104
|
-
'
|
|
1105
|
-
'
|
|
1104
|
+
'title': 'number -1.23',
|
|
1105
|
+
'value': -1.23,
|
|
1106
1106
|
'expect': false
|
|
1107
1107
|
},
|
|
1108
|
-
...
|
|
1108
|
+
...defaultItems({
|
|
1109
1109
|
'number 0': false,
|
|
1110
1110
|
'number 1': true
|
|
1111
1111
|
})
|
|
@@ -1116,41 +1116,41 @@ const testItems: ITestSuite = {
|
|
|
1116
1116
|
'rule': 'number(1, )',
|
|
1117
1117
|
'items': [
|
|
1118
1118
|
{
|
|
1119
|
-
'
|
|
1120
|
-
'
|
|
1119
|
+
'title': 'number -1',
|
|
1120
|
+
'value': -1,
|
|
1121
1121
|
'expect': false
|
|
1122
1122
|
},
|
|
1123
1123
|
{
|
|
1124
|
-
'
|
|
1125
|
-
'
|
|
1124
|
+
'title': 'number 1',
|
|
1125
|
+
'value': 1,
|
|
1126
1126
|
'expect': true
|
|
1127
1127
|
},
|
|
1128
1128
|
{
|
|
1129
|
-
'
|
|
1130
|
-
'
|
|
1129
|
+
'title': 'number 10',
|
|
1130
|
+
'value': 10,
|
|
1131
1131
|
'expect': true
|
|
1132
1132
|
},
|
|
1133
1133
|
{
|
|
1134
|
-
'
|
|
1135
|
-
'
|
|
1134
|
+
'title': 'number 11',
|
|
1135
|
+
'value': 11,
|
|
1136
1136
|
'expect': true
|
|
1137
1137
|
},
|
|
1138
1138
|
{
|
|
1139
|
-
'
|
|
1140
|
-
'
|
|
1139
|
+
'title': 'number 0',
|
|
1140
|
+
'value': 0,
|
|
1141
1141
|
'expect': false
|
|
1142
1142
|
},
|
|
1143
1143
|
{
|
|
1144
|
-
'
|
|
1145
|
-
'
|
|
1144
|
+
'title': 'number 1.23',
|
|
1145
|
+
'value': 1.23,
|
|
1146
1146
|
'expect': true
|
|
1147
1147
|
},
|
|
1148
1148
|
{
|
|
1149
|
-
'
|
|
1150
|
-
'
|
|
1149
|
+
'title': 'number -1.23',
|
|
1150
|
+
'value': -1.23,
|
|
1151
1151
|
'expect': false
|
|
1152
1152
|
},
|
|
1153
|
-
...
|
|
1153
|
+
...defaultItems({
|
|
1154
1154
|
'number 0': false,
|
|
1155
1155
|
'number 1': true
|
|
1156
1156
|
})
|
|
@@ -1161,8 +1161,8 @@ const testItems: ITestSuite = {
|
|
|
1161
1161
|
'rule': 'number(,)',
|
|
1162
1162
|
'items': [
|
|
1163
1163
|
{
|
|
1164
|
-
'
|
|
1165
|
-
'
|
|
1164
|
+
'title': 'any',
|
|
1165
|
+
'value': 'any',
|
|
1166
1166
|
'expect': 'throw'
|
|
1167
1167
|
},
|
|
1168
1168
|
]
|
|
@@ -1172,36 +1172,36 @@ const testItems: ITestSuite = {
|
|
|
1172
1172
|
'rule': 'number(, -1)',
|
|
1173
1173
|
'items': [
|
|
1174
1174
|
{
|
|
1175
|
-
'
|
|
1176
|
-
'
|
|
1175
|
+
'title': 'number -1',
|
|
1176
|
+
'value': -1,
|
|
1177
1177
|
'expect': true
|
|
1178
1178
|
},
|
|
1179
1179
|
{
|
|
1180
|
-
'
|
|
1181
|
-
'
|
|
1180
|
+
'title': 'number 1',
|
|
1181
|
+
'value': 1,
|
|
1182
1182
|
'expect': false
|
|
1183
1183
|
},
|
|
1184
1184
|
{
|
|
1185
|
-
'
|
|
1186
|
-
'
|
|
1185
|
+
'title': 'number -0.3',
|
|
1186
|
+
'value': -0.3,
|
|
1187
1187
|
'expect': false
|
|
1188
1188
|
},
|
|
1189
1189
|
{
|
|
1190
|
-
'
|
|
1191
|
-
'
|
|
1190
|
+
'title': 'number -11',
|
|
1191
|
+
'value': -11,
|
|
1192
1192
|
'expect': true
|
|
1193
1193
|
},
|
|
1194
1194
|
{
|
|
1195
|
-
'
|
|
1196
|
-
'
|
|
1195
|
+
'title': 'number 0',
|
|
1196
|
+
'value': 0,
|
|
1197
1197
|
'expect': false
|
|
1198
1198
|
},
|
|
1199
1199
|
{
|
|
1200
|
-
'
|
|
1201
|
-
'
|
|
1200
|
+
'title': 'number -1.23',
|
|
1201
|
+
'value': -1.23,
|
|
1202
1202
|
'expect': true
|
|
1203
1203
|
},
|
|
1204
|
-
...
|
|
1204
|
+
...defaultItems({
|
|
1205
1205
|
'number 0': false,
|
|
1206
1206
|
'number 1': false
|
|
1207
1207
|
})
|
|
@@ -1212,41 +1212,41 @@ const testItems: ITestSuite = {
|
|
|
1212
1212
|
'rule': 'numeric',
|
|
1213
1213
|
'items': [
|
|
1214
1214
|
{
|
|
1215
|
-
'
|
|
1216
|
-
'
|
|
1215
|
+
'title': 'string \'120312\'',
|
|
1216
|
+
'value': '120312',
|
|
1217
1217
|
'expect': true
|
|
1218
1218
|
},
|
|
1219
1219
|
{
|
|
1220
|
-
'
|
|
1221
|
-
'
|
|
1220
|
+
'title': 'string \'2.23\'',
|
|
1221
|
+
'value': '2.23',
|
|
1222
1222
|
'expect': true
|
|
1223
1223
|
},
|
|
1224
1224
|
{
|
|
1225
|
-
'
|
|
1226
|
-
'
|
|
1225
|
+
'title': 'string \'2.23.4\'',
|
|
1226
|
+
'value': '2.23.4',
|
|
1227
1227
|
'expect': false
|
|
1228
1228
|
},
|
|
1229
1229
|
{
|
|
1230
|
-
'
|
|
1231
|
-
'
|
|
1230
|
+
'title': 'number -1',
|
|
1231
|
+
'value': -1,
|
|
1232
1232
|
'expect': true
|
|
1233
1233
|
},
|
|
1234
1234
|
{
|
|
1235
|
-
'
|
|
1236
|
-
'
|
|
1235
|
+
'title': 'number 120312',
|
|
1236
|
+
'value': 120312,
|
|
1237
1237
|
'expect': true
|
|
1238
1238
|
},
|
|
1239
1239
|
{
|
|
1240
|
-
'
|
|
1241
|
-
'
|
|
1240
|
+
'title': 'number 1.23',
|
|
1241
|
+
'value': 1.23,
|
|
1242
1242
|
'expect': true
|
|
1243
1243
|
},
|
|
1244
1244
|
{
|
|
1245
|
-
'
|
|
1246
|
-
'
|
|
1245
|
+
'title': 'number -1.23',
|
|
1246
|
+
'value': -1.23,
|
|
1247
1247
|
'expect': true
|
|
1248
1248
|
},
|
|
1249
|
-
...
|
|
1249
|
+
...defaultItems({
|
|
1250
1250
|
'number 0': true,
|
|
1251
1251
|
'number 1': true
|
|
1252
1252
|
})
|
|
@@ -1257,41 +1257,41 @@ const testItems: ITestSuite = {
|
|
|
1257
1257
|
'rule': 'numeric(10,100)',
|
|
1258
1258
|
'items': [
|
|
1259
1259
|
{
|
|
1260
|
-
'
|
|
1261
|
-
'
|
|
1260
|
+
'title': 'string \'50\'',
|
|
1261
|
+
'value': '50',
|
|
1262
1262
|
'expect': true
|
|
1263
1263
|
},
|
|
1264
1264
|
{
|
|
1265
|
-
'
|
|
1266
|
-
'
|
|
1265
|
+
'title': 'string \'22.23\'',
|
|
1266
|
+
'value': '22.23',
|
|
1267
1267
|
'expect': true
|
|
1268
1268
|
},
|
|
1269
1269
|
{
|
|
1270
|
-
'
|
|
1271
|
-
'
|
|
1270
|
+
'title': 'string \'2.23.4\'',
|
|
1271
|
+
'value': '2.23.4',
|
|
1272
1272
|
'expect': false
|
|
1273
1273
|
},
|
|
1274
1274
|
{
|
|
1275
|
-
'
|
|
1276
|
-
'
|
|
1275
|
+
'title': 'number -1',
|
|
1276
|
+
'value': -1,
|
|
1277
1277
|
'expect': false
|
|
1278
1278
|
},
|
|
1279
1279
|
{
|
|
1280
|
-
'
|
|
1281
|
-
'
|
|
1280
|
+
'title': 'number 120312',
|
|
1281
|
+
'value': 120312,
|
|
1282
1282
|
'expect': false
|
|
1283
1283
|
},
|
|
1284
1284
|
{
|
|
1285
|
-
'
|
|
1286
|
-
'
|
|
1285
|
+
'title': 'number 11.23',
|
|
1286
|
+
'value': 11.23,
|
|
1287
1287
|
'expect': true
|
|
1288
1288
|
},
|
|
1289
1289
|
{
|
|
1290
|
-
'
|
|
1291
|
-
'
|
|
1290
|
+
'title': 'number -1.23',
|
|
1291
|
+
'value': -1.23,
|
|
1292
1292
|
'expect': false
|
|
1293
1293
|
},
|
|
1294
|
-
...
|
|
1294
|
+
...defaultItems({
|
|
1295
1295
|
'number 0': false,
|
|
1296
1296
|
'number 1': false
|
|
1297
1297
|
})
|
|
@@ -1302,41 +1302,41 @@ const testItems: ITestSuite = {
|
|
|
1302
1302
|
'rule': 'numeric(10,)',
|
|
1303
1303
|
'items': [
|
|
1304
1304
|
{
|
|
1305
|
-
'
|
|
1306
|
-
'
|
|
1305
|
+
'title': 'string \'50\'',
|
|
1306
|
+
'value': '50',
|
|
1307
1307
|
'expect': true
|
|
1308
1308
|
},
|
|
1309
1309
|
{
|
|
1310
|
-
'
|
|
1311
|
-
'
|
|
1310
|
+
'title': 'string \'22.23\'',
|
|
1311
|
+
'value': '22.23',
|
|
1312
1312
|
'expect': true
|
|
1313
1313
|
},
|
|
1314
1314
|
{
|
|
1315
|
-
'
|
|
1316
|
-
'
|
|
1315
|
+
'title': 'string \'2.23.4\'',
|
|
1316
|
+
'value': '2.23.4',
|
|
1317
1317
|
'expect': false
|
|
1318
1318
|
},
|
|
1319
1319
|
{
|
|
1320
|
-
'
|
|
1321
|
-
'
|
|
1320
|
+
'title': 'number -1',
|
|
1321
|
+
'value': -1,
|
|
1322
1322
|
'expect': false
|
|
1323
1323
|
},
|
|
1324
1324
|
{
|
|
1325
|
-
'
|
|
1326
|
-
'
|
|
1325
|
+
'title': 'number 120312',
|
|
1326
|
+
'value': 120312,
|
|
1327
1327
|
'expect': true
|
|
1328
1328
|
},
|
|
1329
1329
|
{
|
|
1330
|
-
'
|
|
1331
|
-
'
|
|
1330
|
+
'title': 'number 11.23',
|
|
1331
|
+
'value': 11.23,
|
|
1332
1332
|
'expect': true
|
|
1333
1333
|
},
|
|
1334
1334
|
{
|
|
1335
|
-
'
|
|
1336
|
-
'
|
|
1335
|
+
'title': 'number -1.23',
|
|
1336
|
+
'value': -1.23,
|
|
1337
1337
|
'expect': false
|
|
1338
1338
|
},
|
|
1339
|
-
...
|
|
1339
|
+
...defaultItems({
|
|
1340
1340
|
'number 0': false,
|
|
1341
1341
|
'number 1': false
|
|
1342
1342
|
})
|
|
@@ -1347,41 +1347,41 @@ const testItems: ITestSuite = {
|
|
|
1347
1347
|
'rule': 'numeric(,100)',
|
|
1348
1348
|
'items': [
|
|
1349
1349
|
{
|
|
1350
|
-
'
|
|
1351
|
-
'
|
|
1350
|
+
'title': 'string \'50\'',
|
|
1351
|
+
'value': '50',
|
|
1352
1352
|
'expect': true
|
|
1353
1353
|
},
|
|
1354
1354
|
{
|
|
1355
|
-
'
|
|
1356
|
-
'
|
|
1355
|
+
'title': 'string \'22.23\'',
|
|
1356
|
+
'value': '22.23',
|
|
1357
1357
|
'expect': true
|
|
1358
1358
|
},
|
|
1359
1359
|
{
|
|
1360
|
-
'
|
|
1361
|
-
'
|
|
1360
|
+
'title': 'string \'2.23.4\'',
|
|
1361
|
+
'value': '2.23.4',
|
|
1362
1362
|
'expect': false
|
|
1363
1363
|
},
|
|
1364
1364
|
{
|
|
1365
|
-
'
|
|
1366
|
-
'
|
|
1365
|
+
'title': 'number -1',
|
|
1366
|
+
'value': -1,
|
|
1367
1367
|
'expect': true
|
|
1368
1368
|
},
|
|
1369
1369
|
{
|
|
1370
|
-
'
|
|
1371
|
-
'
|
|
1370
|
+
'title': 'number 120312',
|
|
1371
|
+
'value': 120312,
|
|
1372
1372
|
'expect': false
|
|
1373
1373
|
},
|
|
1374
1374
|
{
|
|
1375
|
-
'
|
|
1376
|
-
'
|
|
1375
|
+
'title': 'number 11.23',
|
|
1376
|
+
'value': 11.23,
|
|
1377
1377
|
'expect': true
|
|
1378
1378
|
},
|
|
1379
1379
|
{
|
|
1380
|
-
'
|
|
1381
|
-
'
|
|
1380
|
+
'title': 'number -1.23',
|
|
1381
|
+
'value': -1.23,
|
|
1382
1382
|
'expect': true
|
|
1383
1383
|
},
|
|
1384
|
-
...
|
|
1384
|
+
...defaultItems({
|
|
1385
1385
|
'number 0': true,
|
|
1386
1386
|
'number 1': true
|
|
1387
1387
|
})
|
|
@@ -1391,7 +1391,7 @@ const testItems: ITestSuite = {
|
|
|
1391
1391
|
'name': 'Void',
|
|
1392
1392
|
'rule': 'void',
|
|
1393
1393
|
'items': [
|
|
1394
|
-
...
|
|
1394
|
+
...defaultItems({
|
|
1395
1395
|
'undefined': true
|
|
1396
1396
|
})
|
|
1397
1397
|
]
|
|
@@ -1400,7 +1400,7 @@ const testItems: ITestSuite = {
|
|
|
1400
1400
|
'name': 'Optional',
|
|
1401
1401
|
'rule': 'optional',
|
|
1402
1402
|
'items': [
|
|
1403
|
-
...
|
|
1403
|
+
...defaultItems({
|
|
1404
1404
|
'undefined': true
|
|
1405
1405
|
})
|
|
1406
1406
|
]
|
|
@@ -1409,7 +1409,7 @@ const testItems: ITestSuite = {
|
|
|
1409
1409
|
'name': 'Undefined',
|
|
1410
1410
|
'rule': 'undefined',
|
|
1411
1411
|
'items': [
|
|
1412
|
-
...
|
|
1412
|
+
...defaultItems({
|
|
1413
1413
|
'undefined': true
|
|
1414
1414
|
})
|
|
1415
1415
|
]
|
|
@@ -1418,7 +1418,7 @@ const testItems: ITestSuite = {
|
|
|
1418
1418
|
'name': 'Required',
|
|
1419
1419
|
'rule': 'required',
|
|
1420
1420
|
'items': [
|
|
1421
|
-
...
|
|
1421
|
+
...defaultItems({
|
|
1422
1422
|
'true': true,
|
|
1423
1423
|
'false': true,
|
|
1424
1424
|
'null': true,
|
|
@@ -1435,7 +1435,7 @@ const testItems: ITestSuite = {
|
|
|
1435
1435
|
'name': 'Null',
|
|
1436
1436
|
'rule': 'null',
|
|
1437
1437
|
'items': [
|
|
1438
|
-
...
|
|
1438
|
+
...defaultItems({
|
|
1439
1439
|
'null': true
|
|
1440
1440
|
})
|
|
1441
1441
|
]
|
|
@@ -1445,11 +1445,11 @@ const testItems: ITestSuite = {
|
|
|
1445
1445
|
'rule': 'array',
|
|
1446
1446
|
'items': [
|
|
1447
1447
|
{
|
|
1448
|
-
'
|
|
1449
|
-
'
|
|
1448
|
+
'title': '[string, number]',
|
|
1449
|
+
'value': ['-1.23', 123123],
|
|
1450
1450
|
'expect': true
|
|
1451
1451
|
},
|
|
1452
|
-
...
|
|
1452
|
+
...defaultItems({
|
|
1453
1453
|
'empty array': true
|
|
1454
1454
|
})
|
|
1455
1455
|
]
|
|
@@ -1459,16 +1459,16 @@ const testItems: ITestSuite = {
|
|
|
1459
1459
|
'rule': 'array(1)',
|
|
1460
1460
|
'items': [
|
|
1461
1461
|
{
|
|
1462
|
-
'
|
|
1463
|
-
'
|
|
1462
|
+
'title': '[string, number]',
|
|
1463
|
+
'value': ['-1.23', 123123],
|
|
1464
1464
|
'expect': false
|
|
1465
1465
|
},
|
|
1466
1466
|
{
|
|
1467
|
-
'
|
|
1468
|
-
'
|
|
1467
|
+
'title': '[string]',
|
|
1468
|
+
'value': ['-1.23'],
|
|
1469
1469
|
'expect': true
|
|
1470
1470
|
},
|
|
1471
|
-
...
|
|
1471
|
+
...defaultItems({
|
|
1472
1472
|
'empty array': false
|
|
1473
1473
|
})
|
|
1474
1474
|
]
|
|
@@ -1478,26 +1478,26 @@ const testItems: ITestSuite = {
|
|
|
1478
1478
|
'rule': 'array(1,3)',
|
|
1479
1479
|
'items': [
|
|
1480
1480
|
{
|
|
1481
|
-
'
|
|
1482
|
-
'
|
|
1481
|
+
'title': '[string, number, boolean]',
|
|
1482
|
+
'value': ['-1.23', 123123, true],
|
|
1483
1483
|
'expect': true
|
|
1484
1484
|
},
|
|
1485
1485
|
{
|
|
1486
|
-
'
|
|
1487
|
-
'
|
|
1486
|
+
'title': '[string, number]',
|
|
1487
|
+
'value': ['-1.23', 123123],
|
|
1488
1488
|
'expect': true
|
|
1489
1489
|
},
|
|
1490
1490
|
{
|
|
1491
|
-
'
|
|
1492
|
-
'
|
|
1491
|
+
'title': '[string]',
|
|
1492
|
+
'value': ['-1.23'],
|
|
1493
1493
|
'expect': true
|
|
1494
1494
|
},
|
|
1495
1495
|
{
|
|
1496
|
-
'
|
|
1497
|
-
'
|
|
1496
|
+
'title': '[string, number, boolean, string]',
|
|
1497
|
+
'value': ['-1.23', 123123, true, 'fff'],
|
|
1498
1498
|
'expect': false
|
|
1499
1499
|
},
|
|
1500
|
-
...
|
|
1500
|
+
...defaultItems({
|
|
1501
1501
|
'empty array': false
|
|
1502
1502
|
})
|
|
1503
1503
|
]
|
|
@@ -1507,16 +1507,16 @@ const testItems: ITestSuite = {
|
|
|
1507
1507
|
'rule': 'array(1,)',
|
|
1508
1508
|
'items': [
|
|
1509
1509
|
{
|
|
1510
|
-
'
|
|
1511
|
-
'
|
|
1510
|
+
'title': '[string, number]',
|
|
1511
|
+
'value': ['-1.23', 123123],
|
|
1512
1512
|
'expect': true
|
|
1513
1513
|
},
|
|
1514
1514
|
{
|
|
1515
|
-
'
|
|
1516
|
-
'
|
|
1515
|
+
'title': '[string]',
|
|
1516
|
+
'value': ['-1.23'],
|
|
1517
1517
|
'expect': true
|
|
1518
1518
|
},
|
|
1519
|
-
...
|
|
1519
|
+
...defaultItems({
|
|
1520
1520
|
'empty array': false
|
|
1521
1521
|
})
|
|
1522
1522
|
]
|
|
@@ -1526,8 +1526,8 @@ const testItems: ITestSuite = {
|
|
|
1526
1526
|
'rule': 'array(,)',
|
|
1527
1527
|
'items': [
|
|
1528
1528
|
{
|
|
1529
|
-
'
|
|
1530
|
-
'
|
|
1529
|
+
'title': 'any',
|
|
1530
|
+
'value': 'any',
|
|
1531
1531
|
'expect': 'throw'
|
|
1532
1532
|
},
|
|
1533
1533
|
]
|
|
@@ -1536,7 +1536,7 @@ const testItems: ITestSuite = {
|
|
|
1536
1536
|
'name': 'Struct',
|
|
1537
1537
|
'rule': 'struct',
|
|
1538
1538
|
'items': [
|
|
1539
|
-
...
|
|
1539
|
+
...defaultItems({
|
|
1540
1540
|
'object': true
|
|
1541
1541
|
})
|
|
1542
1542
|
]
|
|
@@ -1546,56 +1546,56 @@ const testItems: ITestSuite = {
|
|
|
1546
1546
|
'rule': 'decimal',
|
|
1547
1547
|
'items': [
|
|
1548
1548
|
{
|
|
1549
|
-
'
|
|
1550
|
-
'
|
|
1549
|
+
'title': 'number 1.00',
|
|
1550
|
+
'value': 1.00,
|
|
1551
1551
|
'expect': false
|
|
1552
1552
|
},
|
|
1553
1553
|
{
|
|
1554
|
-
'
|
|
1555
|
-
'
|
|
1554
|
+
'title': 'string \'1.00\'',
|
|
1555
|
+
'value': '1.00',
|
|
1556
1556
|
'expect': true
|
|
1557
1557
|
},
|
|
1558
1558
|
{
|
|
1559
|
-
'
|
|
1560
|
-
'
|
|
1559
|
+
'title': 'string \'+1.00\'',
|
|
1560
|
+
'value': '+1.00',
|
|
1561
1561
|
'expect': true
|
|
1562
1562
|
},
|
|
1563
1563
|
{
|
|
1564
|
-
'
|
|
1565
|
-
'
|
|
1564
|
+
'title': 'string \'0.00\'',
|
|
1565
|
+
'value': '0.00',
|
|
1566
1566
|
'expect': true
|
|
1567
1567
|
},
|
|
1568
1568
|
{
|
|
1569
|
-
'
|
|
1570
|
-
'
|
|
1569
|
+
'title': 'string \'10.00\'',
|
|
1570
|
+
'value': '10.00',
|
|
1571
1571
|
'expect': true
|
|
1572
1572
|
},
|
|
1573
1573
|
{
|
|
1574
|
-
'
|
|
1575
|
-
'
|
|
1574
|
+
'title': 'string \'-10.00\'',
|
|
1575
|
+
'value': '-10.00',
|
|
1576
1576
|
'expect': true
|
|
1577
1577
|
},
|
|
1578
1578
|
{
|
|
1579
|
-
'
|
|
1580
|
-
'
|
|
1579
|
+
'title': 'string \'010.00\'',
|
|
1580
|
+
'value': '010.00',
|
|
1581
1581
|
'expect': false
|
|
1582
1582
|
},
|
|
1583
1583
|
{
|
|
1584
|
-
'
|
|
1585
|
-
'
|
|
1584
|
+
'title': 'string \'.00\'',
|
|
1585
|
+
'value': '.00',
|
|
1586
1586
|
'expect': false
|
|
1587
1587
|
},
|
|
1588
1588
|
{
|
|
1589
|
-
'
|
|
1590
|
-
'
|
|
1589
|
+
'title': 'string \'0.\'',
|
|
1590
|
+
'value': '0.',
|
|
1591
1591
|
'expect': false
|
|
1592
1592
|
},
|
|
1593
1593
|
{
|
|
1594
|
-
'
|
|
1595
|
-
'
|
|
1594
|
+
'title': 'string \'0.00.0\'',
|
|
1595
|
+
'value': '0.00.0',
|
|
1596
1596
|
'expect': false
|
|
1597
1597
|
},
|
|
1598
|
-
...
|
|
1598
|
+
...defaultItems({})
|
|
1599
1599
|
]
|
|
1600
1600
|
},
|
|
1601
1601
|
{
|
|
@@ -1603,71 +1603,71 @@ const testItems: ITestSuite = {
|
|
|
1603
1603
|
'rule': 'decimal(5)',
|
|
1604
1604
|
'items': [
|
|
1605
1605
|
{
|
|
1606
|
-
'
|
|
1607
|
-
'
|
|
1606
|
+
'title': 'number 1.00',
|
|
1607
|
+
'value': 1.00,
|
|
1608
1608
|
'expect': false
|
|
1609
1609
|
},
|
|
1610
1610
|
{
|
|
1611
|
-
'
|
|
1612
|
-
'
|
|
1611
|
+
'title': 'string \'1.00\'',
|
|
1612
|
+
'value': '1.00',
|
|
1613
1613
|
'expect': true
|
|
1614
1614
|
},
|
|
1615
1615
|
{
|
|
1616
|
-
'
|
|
1617
|
-
'
|
|
1616
|
+
'title': 'string \'0.00\'',
|
|
1617
|
+
'value': '0.00',
|
|
1618
1618
|
'expect': true
|
|
1619
1619
|
},
|
|
1620
1620
|
{
|
|
1621
|
-
'
|
|
1622
|
-
'
|
|
1621
|
+
'title': 'string \'10.00\'',
|
|
1622
|
+
'value': '10.00',
|
|
1623
1623
|
'expect': true
|
|
1624
1624
|
},
|
|
1625
1625
|
{
|
|
1626
|
-
'
|
|
1627
|
-
'
|
|
1626
|
+
'title': 'string \'-10.00\'',
|
|
1627
|
+
'value': '-10.00',
|
|
1628
1628
|
'expect': true
|
|
1629
1629
|
},
|
|
1630
1630
|
{
|
|
1631
|
-
'
|
|
1632
|
-
'
|
|
1631
|
+
'title': 'string \'10000\'',
|
|
1632
|
+
'value': '10000',
|
|
1633
1633
|
'expect': true
|
|
1634
1634
|
},
|
|
1635
1635
|
{
|
|
1636
|
-
'
|
|
1637
|
-
'
|
|
1636
|
+
'title': 'string \'100000\'',
|
|
1637
|
+
'value': '100000',
|
|
1638
1638
|
'expect': false
|
|
1639
1639
|
},
|
|
1640
1640
|
{
|
|
1641
|
-
'
|
|
1642
|
-
'
|
|
1641
|
+
'title': 'string \'00001.0\'',
|
|
1642
|
+
'value': '00001.0',
|
|
1643
1643
|
'expect': false
|
|
1644
1644
|
},
|
|
1645
1645
|
{
|
|
1646
|
-
'
|
|
1647
|
-
'
|
|
1646
|
+
'title': 'string \'1.00123\'',
|
|
1647
|
+
'value': '1.00123',
|
|
1648
1648
|
'expect': false
|
|
1649
1649
|
},
|
|
1650
1650
|
{
|
|
1651
|
-
'
|
|
1652
|
-
'
|
|
1651
|
+
'title': 'string \'010.00\'',
|
|
1652
|
+
'value': '010.00',
|
|
1653
1653
|
'expect': false
|
|
1654
1654
|
},
|
|
1655
1655
|
{
|
|
1656
|
-
'
|
|
1657
|
-
'
|
|
1656
|
+
'title': 'string \'.00\'',
|
|
1657
|
+
'value': '.00',
|
|
1658
1658
|
'expect': false
|
|
1659
1659
|
},
|
|
1660
1660
|
{
|
|
1661
|
-
'
|
|
1662
|
-
'
|
|
1661
|
+
'title': 'string \'0.\'',
|
|
1662
|
+
'value': '0.',
|
|
1663
1663
|
'expect': false
|
|
1664
1664
|
},
|
|
1665
1665
|
{
|
|
1666
|
-
'
|
|
1667
|
-
'
|
|
1666
|
+
'title': 'string \'0.00.0\'',
|
|
1667
|
+
'value': '0.00.0',
|
|
1668
1668
|
'expect': false
|
|
1669
1669
|
},
|
|
1670
|
-
...
|
|
1670
|
+
...defaultItems({})
|
|
1671
1671
|
]
|
|
1672
1672
|
},
|
|
1673
1673
|
{
|
|
@@ -1675,86 +1675,86 @@ const testItems: ITestSuite = {
|
|
|
1675
1675
|
'rule': 'decimal(5, 2)',
|
|
1676
1676
|
'items': [
|
|
1677
1677
|
{
|
|
1678
|
-
'
|
|
1679
|
-
'
|
|
1678
|
+
'title': 'number 1.00',
|
|
1679
|
+
'value': 1.00,
|
|
1680
1680
|
'expect': false
|
|
1681
1681
|
},
|
|
1682
1682
|
{
|
|
1683
|
-
'
|
|
1684
|
-
'
|
|
1683
|
+
'title': 'string \'1.00\'',
|
|
1684
|
+
'value': '1.00',
|
|
1685
1685
|
'expect': true
|
|
1686
1686
|
},
|
|
1687
1687
|
{
|
|
1688
|
-
'
|
|
1689
|
-
'
|
|
1688
|
+
'title': 'string \'0.00\'',
|
|
1689
|
+
'value': '0.00',
|
|
1690
1690
|
'expect': true
|
|
1691
1691
|
},
|
|
1692
1692
|
{
|
|
1693
|
-
'
|
|
1694
|
-
'
|
|
1693
|
+
'title': 'string \'10.00\'',
|
|
1694
|
+
'value': '10.00',
|
|
1695
1695
|
'expect': true
|
|
1696
1696
|
},
|
|
1697
1697
|
{
|
|
1698
|
-
'
|
|
1699
|
-
'
|
|
1698
|
+
'title': 'string \'+10.00\'',
|
|
1699
|
+
'value': '+10.00',
|
|
1700
1700
|
'expect': true
|
|
1701
1701
|
},
|
|
1702
1702
|
{
|
|
1703
|
-
'
|
|
1704
|
-
'
|
|
1703
|
+
'title': 'string \'100.12\'',
|
|
1704
|
+
'value': '100.12',
|
|
1705
1705
|
'expect': true
|
|
1706
1706
|
},
|
|
1707
1707
|
{
|
|
1708
|
-
'
|
|
1709
|
-
'
|
|
1708
|
+
'title': 'string \'-100.12\'',
|
|
1709
|
+
'value': '-100.12',
|
|
1710
1710
|
'expect': true
|
|
1711
1711
|
},
|
|
1712
1712
|
{
|
|
1713
|
-
'
|
|
1714
|
-
'
|
|
1713
|
+
'title': 'string \'1100.1\'',
|
|
1714
|
+
'value': '1100.1',
|
|
1715
1715
|
'expect': false
|
|
1716
1716
|
},
|
|
1717
1717
|
{
|
|
1718
|
-
'
|
|
1719
|
-
'
|
|
1718
|
+
'title': 'string \'11.123\'',
|
|
1719
|
+
'value': '10.123',
|
|
1720
1720
|
'expect': false
|
|
1721
1721
|
},
|
|
1722
1722
|
{
|
|
1723
|
-
'
|
|
1724
|
-
'
|
|
1723
|
+
'title': 'string \'100000\'',
|
|
1724
|
+
'value': '100000',
|
|
1725
1725
|
'expect': false
|
|
1726
1726
|
},
|
|
1727
1727
|
{
|
|
1728
|
-
'
|
|
1729
|
-
'
|
|
1728
|
+
'title': 'string \'00001.0\'',
|
|
1729
|
+
'value': '00001.0',
|
|
1730
1730
|
'expect': false
|
|
1731
1731
|
},
|
|
1732
1732
|
{
|
|
1733
|
-
'
|
|
1734
|
-
'
|
|
1733
|
+
'title': 'string \'1.00123\'',
|
|
1734
|
+
'value': '1.00123',
|
|
1735
1735
|
'expect': false
|
|
1736
1736
|
},
|
|
1737
1737
|
{
|
|
1738
|
-
'
|
|
1739
|
-
'
|
|
1738
|
+
'title': 'string \'010.00\'',
|
|
1739
|
+
'value': '010.00',
|
|
1740
1740
|
'expect': false
|
|
1741
1741
|
},
|
|
1742
1742
|
{
|
|
1743
|
-
'
|
|
1744
|
-
'
|
|
1743
|
+
'title': 'string \'.00\'',
|
|
1744
|
+
'value': '.00',
|
|
1745
1745
|
'expect': false
|
|
1746
1746
|
},
|
|
1747
1747
|
{
|
|
1748
|
-
'
|
|
1749
|
-
'
|
|
1748
|
+
'title': 'string \'0.\'',
|
|
1749
|
+
'value': '0.',
|
|
1750
1750
|
'expect': false
|
|
1751
1751
|
},
|
|
1752
1752
|
{
|
|
1753
|
-
'
|
|
1754
|
-
'
|
|
1753
|
+
'title': 'string \'0.00.0\'',
|
|
1754
|
+
'value': '0.00.0',
|
|
1755
1755
|
'expect': false
|
|
1756
1756
|
},
|
|
1757
|
-
...
|
|
1757
|
+
...defaultItems({})
|
|
1758
1758
|
]
|
|
1759
1759
|
},
|
|
1760
1760
|
{
|
|
@@ -1762,33 +1762,33 @@ const testItems: ITestSuite = {
|
|
|
1762
1762
|
'rule': 'string{}',
|
|
1763
1763
|
'items': [
|
|
1764
1764
|
{
|
|
1765
|
-
'
|
|
1765
|
+
'title': JSON.stringify({
|
|
1766
1766
|
'a': 'bbbb',
|
|
1767
1767
|
'b': 'ccccc'
|
|
1768
1768
|
}),
|
|
1769
|
-
'
|
|
1769
|
+
'value': {
|
|
1770
1770
|
'a': 'bbbb',
|
|
1771
1771
|
'b': 'ccccc'
|
|
1772
1772
|
},
|
|
1773
1773
|
'expect': true
|
|
1774
1774
|
},
|
|
1775
1775
|
{
|
|
1776
|
-
'
|
|
1776
|
+
'title': JSON.stringify({
|
|
1777
1777
|
'a': 'bbbb',
|
|
1778
1778
|
'b': 321
|
|
1779
1779
|
}),
|
|
1780
|
-
'
|
|
1780
|
+
'value': {
|
|
1781
1781
|
'a': 'bbbb',
|
|
1782
1782
|
'b': 321
|
|
1783
1783
|
},
|
|
1784
1784
|
'expect': false
|
|
1785
1785
|
},
|
|
1786
1786
|
{
|
|
1787
|
-
'
|
|
1788
|
-
'
|
|
1787
|
+
'title': '[string, string, string]',
|
|
1788
|
+
'value': ['a', 'b', 'c'],
|
|
1789
1789
|
'expect': false
|
|
1790
1790
|
},
|
|
1791
|
-
...
|
|
1791
|
+
...defaultItems({
|
|
1792
1792
|
'object': true
|
|
1793
1793
|
})
|
|
1794
1794
|
]
|
|
@@ -1798,21 +1798,21 @@ const testItems: ITestSuite = {
|
|
|
1798
1798
|
'rule': 'string[]',
|
|
1799
1799
|
'items': [
|
|
1800
1800
|
{
|
|
1801
|
-
'
|
|
1802
|
-
'
|
|
1801
|
+
'title': '[string, string]',
|
|
1802
|
+
'value': ['a', '123'],
|
|
1803
1803
|
'expect': true
|
|
1804
1804
|
},
|
|
1805
1805
|
{
|
|
1806
|
-
'
|
|
1807
|
-
'
|
|
1806
|
+
'title': '[string]',
|
|
1807
|
+
'value': ['a'],
|
|
1808
1808
|
'expect': true
|
|
1809
1809
|
},
|
|
1810
1810
|
{
|
|
1811
|
-
'
|
|
1812
|
-
'
|
|
1811
|
+
'title': '[string, number]',
|
|
1812
|
+
'value': ['a', 123],
|
|
1813
1813
|
'expect': false
|
|
1814
1814
|
},
|
|
1815
|
-
...
|
|
1815
|
+
...defaultItems({
|
|
1816
1816
|
'empty array': true
|
|
1817
1817
|
})
|
|
1818
1818
|
]
|
|
@@ -1822,16 +1822,16 @@ const testItems: ITestSuite = {
|
|
|
1822
1822
|
'rule': 'string[0]',
|
|
1823
1823
|
'items': [
|
|
1824
1824
|
{
|
|
1825
|
-
'
|
|
1826
|
-
'
|
|
1825
|
+
'title': '[string]',
|
|
1826
|
+
'value': ['a'],
|
|
1827
1827
|
'expect': false
|
|
1828
1828
|
},
|
|
1829
1829
|
{
|
|
1830
|
-
'
|
|
1831
|
-
'
|
|
1830
|
+
'title': '[string, number]',
|
|
1831
|
+
'value': ['a', 123],
|
|
1832
1832
|
'expect': false
|
|
1833
1833
|
},
|
|
1834
|
-
...
|
|
1834
|
+
...defaultItems({
|
|
1835
1835
|
'empty array': true
|
|
1836
1836
|
})
|
|
1837
1837
|
]
|
|
@@ -1841,31 +1841,31 @@ const testItems: ITestSuite = {
|
|
|
1841
1841
|
'rule': 'string[3]',
|
|
1842
1842
|
'items': [
|
|
1843
1843
|
{
|
|
1844
|
-
'
|
|
1845
|
-
'
|
|
1844
|
+
'title': '[string, string, string]',
|
|
1845
|
+
'value': ['a', 'b', 'c'],
|
|
1846
1846
|
'expect': true
|
|
1847
1847
|
},
|
|
1848
1848
|
{
|
|
1849
|
-
'
|
|
1850
|
-
'
|
|
1849
|
+
'title': '[string, string, number]',
|
|
1850
|
+
'value': ['a', 'b', 123],
|
|
1851
1851
|
'expect': false
|
|
1852
1852
|
},
|
|
1853
1853
|
{
|
|
1854
|
-
'
|
|
1855
|
-
'
|
|
1854
|
+
'title': '[string, string]',
|
|
1855
|
+
'value': ['a', 'b'],
|
|
1856
1856
|
'expect': false
|
|
1857
1857
|
},
|
|
1858
1858
|
{
|
|
1859
|
-
'
|
|
1860
|
-
'
|
|
1859
|
+
'title': '[string]',
|
|
1860
|
+
'value': ['a'],
|
|
1861
1861
|
'expect': false
|
|
1862
1862
|
},
|
|
1863
1863
|
{
|
|
1864
|
-
'
|
|
1865
|
-
'
|
|
1864
|
+
'title': '[string, number]',
|
|
1865
|
+
'value': ['a', 123],
|
|
1866
1866
|
'expect': false
|
|
1867
1867
|
},
|
|
1868
|
-
...
|
|
1868
|
+
...defaultItems({})
|
|
1869
1869
|
]
|
|
1870
1870
|
},
|
|
1871
1871
|
{
|
|
@@ -1873,31 +1873,31 @@ const testItems: ITestSuite = {
|
|
|
1873
1873
|
'rule': 'string[0,3]',
|
|
1874
1874
|
'items': [
|
|
1875
1875
|
{
|
|
1876
|
-
'
|
|
1877
|
-
'
|
|
1876
|
+
'title': '[string, string, string]',
|
|
1877
|
+
'value': ['a', 'b', 'c'],
|
|
1878
1878
|
'expect': true
|
|
1879
1879
|
},
|
|
1880
1880
|
{
|
|
1881
|
-
'
|
|
1882
|
-
'
|
|
1881
|
+
'title': '[string, string, number]',
|
|
1882
|
+
'value': ['a', 'b', 123],
|
|
1883
1883
|
'expect': false
|
|
1884
1884
|
},
|
|
1885
1885
|
{
|
|
1886
|
-
'
|
|
1887
|
-
'
|
|
1886
|
+
'title': '[string, string]',
|
|
1887
|
+
'value': ['a', 'b'],
|
|
1888
1888
|
'expect': true
|
|
1889
1889
|
},
|
|
1890
1890
|
{
|
|
1891
|
-
'
|
|
1892
|
-
'
|
|
1891
|
+
'title': '[string]',
|
|
1892
|
+
'value': ['a'],
|
|
1893
1893
|
'expect': true
|
|
1894
1894
|
},
|
|
1895
1895
|
{
|
|
1896
|
-
'
|
|
1897
|
-
'
|
|
1896
|
+
'title': '[string, number]',
|
|
1897
|
+
'value': ['a', 123],
|
|
1898
1898
|
'expect': false
|
|
1899
1899
|
},
|
|
1900
|
-
...
|
|
1900
|
+
...defaultItems({
|
|
1901
1901
|
'empty array': true
|
|
1902
1902
|
})
|
|
1903
1903
|
]
|
|
@@ -1907,36 +1907,36 @@ const testItems: ITestSuite = {
|
|
|
1907
1907
|
'rule': 'string(1,5)[0,3]',
|
|
1908
1908
|
'items': [
|
|
1909
1909
|
{
|
|
1910
|
-
'
|
|
1911
|
-
'
|
|
1910
|
+
'title': '[string, string, string]',
|
|
1911
|
+
'value': ['a', 'b', 'c'],
|
|
1912
1912
|
'expect': true
|
|
1913
1913
|
},
|
|
1914
1914
|
{
|
|
1915
|
-
'
|
|
1916
|
-
'
|
|
1915
|
+
'title': '[string, string, number]',
|
|
1916
|
+
'value': ['a', 'b', 123],
|
|
1917
1917
|
'expect': false
|
|
1918
1918
|
},
|
|
1919
1919
|
{
|
|
1920
|
-
'
|
|
1921
|
-
'
|
|
1920
|
+
'title': '[string, string]',
|
|
1921
|
+
'value': ['a', 'b'],
|
|
1922
1922
|
'expect': true
|
|
1923
1923
|
},
|
|
1924
1924
|
{
|
|
1925
|
-
'
|
|
1926
|
-
'
|
|
1925
|
+
'title': '[string, string, string(7)]',
|
|
1926
|
+
'value': ['a', 'b', 'aaabbbc'],
|
|
1927
1927
|
'expect': false
|
|
1928
1928
|
},
|
|
1929
1929
|
{
|
|
1930
|
-
'
|
|
1931
|
-
'
|
|
1930
|
+
'title': '[string]',
|
|
1931
|
+
'value': ['a'],
|
|
1932
1932
|
'expect': true
|
|
1933
1933
|
},
|
|
1934
1934
|
{
|
|
1935
|
-
'
|
|
1936
|
-
'
|
|
1935
|
+
'title': '[string, number]',
|
|
1936
|
+
'value': ['a', 123],
|
|
1937
1937
|
'expect': false
|
|
1938
1938
|
},
|
|
1939
|
-
...
|
|
1939
|
+
...defaultItems({
|
|
1940
1940
|
'empty array': true
|
|
1941
1941
|
})
|
|
1942
1942
|
]
|
|
@@ -1946,11 +1946,11 @@ const testItems: ITestSuite = {
|
|
|
1946
1946
|
'rule': '?string',
|
|
1947
1947
|
'items': [
|
|
1948
1948
|
{
|
|
1949
|
-
'
|
|
1950
|
-
'
|
|
1949
|
+
'title': 'string \'fine\'',
|
|
1950
|
+
'value': 'fine',
|
|
1951
1951
|
'expect': true
|
|
1952
1952
|
},
|
|
1953
|
-
...
|
|
1953
|
+
...defaultItems({
|
|
1954
1954
|
'undefined': true,
|
|
1955
1955
|
'empty string': true,
|
|
1956
1956
|
'string \'hello\'': true
|