Adding more tests

This commit is contained in:
Daniel Lemire 2019-01-04 17:37:44 -05:00
parent a00df9b992
commit 59b26dd64d
17 changed files with 18 additions and 0 deletions

View File

@ -179,6 +179,7 @@ The parser builds a useful immutable (read-only) DOM (document-object model) whi
To simplify the engineering, we make some assumptions.
- We support UTF-8 (and thus ASCII), nothing else (no Latin, no UTF-16). We do not believe that this is a genuine limitation in the sense that we do not think that there is any serious application that needs to process JSON data without an ASCII or UTF-8 encoding.
- We store strings as NULL terminated C strings. Thus we implicitly assume that you do not include a NULL character within your string, which is allowed technically speaking if you escape it (\u0000).
- We assume AVX2 support which is available in all recent mainstream x86 processors produced by AMD and Intel. No support for non-x86 processors is included though it can be done. We plan to support ARM processors (help is invited).
- In cases of failure, we just report a failure without any indication as to the nature of the problem. (This can be easily improved without affecting performance.)
- As allowed by the specification, we allow repeated keys within an object (other parsers like sajson do the same).

View File

@ -0,0 +1 @@
18446744073709551616

2
jsonchecker/fail42.json Normal file
View File

@ -0,0 +1,2 @@
{"fdfds":
"4332" }

1
jsonchecker/fail43.json Normal file
View File

@ -0,0 +1 @@
[-]

1
jsonchecker/fail44.json Normal file
View File

@ -0,0 +1 @@
[-2.]

1
jsonchecker/fail45.json Normal file
View File

@ -0,0 +1 @@
[0.e1]

1
jsonchecker/fail46.json Normal file
View File

@ -0,0 +1 @@
[2.e+3]

1
jsonchecker/fail47.json Normal file
View File

@ -0,0 +1 @@
[2.e-3]

1
jsonchecker/fail48.json Normal file
View File

@ -0,0 +1 @@
[2.e3]

1
jsonchecker/fail49.json Normal file
View File

@ -0,0 +1 @@
[-.123]

1
jsonchecker/fail50.json Normal file
View File

@ -0,0 +1 @@
[1.]

1
jsonchecker/fail51.json Normal file
View File

@ -0,0 +1 @@
[],

1
jsonchecker/fail52.json Normal file
View File

@ -0,0 +1 @@
[x]]

1
jsonchecker/fail53.json Normal file
View File

@ -0,0 +1 @@
{}}

1
jsonchecker/fail54.json Normal file
View File

@ -0,0 +1 @@
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[(...)

1
jsonchecker/pass12.json Normal file
View File

@ -0,0 +1 @@
2147483648

1
jsonchecker/pass13.json Normal file
View File

@ -0,0 +1 @@
12300