diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-05-01 17:28:44 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-11-07 16:41:37 +0000 |
commit | fc8c9a6c7bec176299915c6adab120e1bf2ea4e9 (patch) | |
tree | 837426e53f3ec0cd06a6b7c9244c57a7c4229953 /test/fixtures/json | |
parent | Fix the fact I've been spelling persistence wrong this whole time (diff) | |
download | ilt-fc8c9a6c7bec176299915c6adab120e1bf2ea4e9.tar.bz2 ilt-fc8c9a6c7bec176299915c6adab120e1bf2ea4e9.tar.xz ilt-fc8c9a6c7bec176299915c6adab120e1bf2ea4e9.zip |
Lots of test cases, few minor fixes
Diffstat (limited to 'test/fixtures/json')
-rw-r--r-- | test/fixtures/json/bad/bad.json | 1 | ||||
-rw-r--r-- | test/fixtures/json/bad/empty_abs.json (renamed from test/fixtures/json/empty_abs.json) | 0 | ||||
-rw-r--r-- | test/fixtures/json/bad/implicit_abs.json (renamed from test/fixtures/json/implicit_abs.json) | 0 | ||||
-rw-r--r-- | test/fixtures/json/bad/late_type.json | 4 | ||||
-rw-r--r-- | test/fixtures/json/bad/missing_member.json | 3 | ||||
-rw-r--r-- | test/fixtures/json/bad/not.json | 1 | ||||
-rw-r--r-- | test/fixtures/json/bad/unexp_array.json | 3 | ||||
-rw-r--r-- | test/fixtures/json/bad/unexp_bool.json | 3 | ||||
-rw-r--r-- | test/fixtures/json/bad/unexp_float.json | 3 | ||||
-rw-r--r-- | test/fixtures/json/bad/unexp_null.json | 3 | ||||
-rw-r--r-- | test/fixtures/json/bad/unexp_obj.json | 3 | ||||
-rw-r--r-- | test/fixtures/json/bad/unexp_str.json | 3 | ||||
-rw-r--r-- | test/fixtures/json/implicit.json | 3 | ||||
-rw-r--r-- | test/fixtures/json/shared_ptr_null.json | 8 |
14 files changed, 37 insertions, 1 deletions
diff --git a/test/fixtures/json/bad/bad.json b/test/fixtures/json/bad/bad.json new file mode 100644 index 0000000..8c611b1 --- /dev/null +++ b/test/fixtures/json/bad/bad.json @@ -0,0 +1 @@ +{ bad } diff --git a/test/fixtures/json/empty_abs.json b/test/fixtures/json/bad/empty_abs.json index 7d22001..7d22001 100644 --- a/test/fixtures/json/empty_abs.json +++ b/test/fixtures/json/bad/empty_abs.json diff --git a/test/fixtures/json/implicit_abs.json b/test/fixtures/json/bad/implicit_abs.json index 573b323..573b323 100644 --- a/test/fixtures/json/implicit_abs.json +++ b/test/fixtures/json/bad/implicit_abs.json diff --git a/test/fixtures/json/bad/late_type.json b/test/fixtures/json/bad/late_type.json new file mode 100644 index 0000000..171575a --- /dev/null +++ b/test/fixtures/json/bad/late_type.json @@ -0,0 +1,4 @@ +{ + "str": "trigger", + "@typeid": "doesn't matter" +} diff --git a/test/fixtures/json/bad/missing_member.json b/test/fixtures/json/bad/missing_member.json new file mode 100644 index 0000000..0c8a1fd --- /dev/null +++ b/test/fixtures/json/bad/missing_member.json @@ -0,0 +1,3 @@ +{ + "missing": true +} diff --git a/test/fixtures/json/bad/not.json b/test/fixtures/json/bad/not.json new file mode 100644 index 0000000..6b7a9f4 --- /dev/null +++ b/test/fixtures/json/bad/not.json @@ -0,0 +1 @@ +not json diff --git a/test/fixtures/json/bad/unexp_array.json b/test/fixtures/json/bad/unexp_array.json new file mode 100644 index 0000000..399a2bd --- /dev/null +++ b/test/fixtures/json/bad/unexp_array.json @@ -0,0 +1,3 @@ +{ + "bl": [] +} diff --git a/test/fixtures/json/bad/unexp_bool.json b/test/fixtures/json/bad/unexp_bool.json new file mode 100644 index 0000000..85a4bd1 --- /dev/null +++ b/test/fixtures/json/bad/unexp_bool.json @@ -0,0 +1,3 @@ +{ + "str": true +} diff --git a/test/fixtures/json/bad/unexp_float.json b/test/fixtures/json/bad/unexp_float.json new file mode 100644 index 0000000..bd824b6 --- /dev/null +++ b/test/fixtures/json/bad/unexp_float.json @@ -0,0 +1,3 @@ +{ + "bl": 3.14 +} diff --git a/test/fixtures/json/bad/unexp_null.json b/test/fixtures/json/bad/unexp_null.json new file mode 100644 index 0000000..2edc363 --- /dev/null +++ b/test/fixtures/json/bad/unexp_null.json @@ -0,0 +1,3 @@ +{ + "str": null +} diff --git a/test/fixtures/json/bad/unexp_obj.json b/test/fixtures/json/bad/unexp_obj.json new file mode 100644 index 0000000..6331897 --- /dev/null +++ b/test/fixtures/json/bad/unexp_obj.json @@ -0,0 +1,3 @@ +{ + "str": {} +} diff --git a/test/fixtures/json/bad/unexp_str.json b/test/fixtures/json/bad/unexp_str.json new file mode 100644 index 0000000..45ac749 --- /dev/null +++ b/test/fixtures/json/bad/unexp_str.json @@ -0,0 +1,3 @@ +{ + "bl": "3.14" +} diff --git a/test/fixtures/json/implicit.json b/test/fixtures/json/implicit.json index 03dec4b..478cec6 100644 --- a/test/fixtures/json/implicit.json +++ b/test/fixtures/json/implicit.json @@ -2,7 +2,8 @@ "@typeid": "TestObject", "flt": 1, "ptr": { - "str": "trigger" + "str": "trigger", + "bl": false }, "str": "after" } diff --git a/test/fixtures/json/shared_ptr_null.json b/test/fixtures/json/shared_ptr_null.json new file mode 100644 index 0000000..c2461e8 --- /dev/null +++ b/test/fixtures/json/shared_ptr_null.json @@ -0,0 +1,8 @@ +{ + "@typeid": "SharedTestObject", + "sptr": { + "@typeid": "SubObject", + "@id": "someid" + }, + "ssptr": null +} |