summaryrefslogtreecommitdiff
path: root/json-glib/tests/invalid.c
Commit message (Collapse)AuthorAgeFilesLines
* tests: Add surrogate pair testsJames Westman2020-11-301-0/+3
|
* Properly detect multiple top level statementsEmmanuele Bassi2020-08-241-0/+1
| | | | | | | | JSON can only have one top level statement. If we get multiple statements, we should error out appropriately, and we should also avoid leaking the node for the previously parsed statement. Fixes: #45
* Allow empty string as object member nameDr. David Alan Gilbert2017-03-111-1/+1
| | | | | | | | | | | Commit 028e540 disallowed empty member names in objects, however they are unfortunately valid JSON. This patch reenables an empty string as a member name. Tests are updated to allow the empty string case, and to test the use of an empty string in generation, iteration etc. https://bugzilla.gnome.org/show_bug.cgi?id=747279
* parser: Detect missing commas in arraysEmmanuele Bassi2016-02-251-0/+31
| | | | | Just like we detect trailing commas, we should also detect missing ones to avoid parsing invalid JSON successfully.
* Remove conditional inclusion of config.hEmmanuele Bassi2014-03-181-2/+0
| | | | All the platforms and build system we support have a config.h header.
* Remove compile time GLib version checkEmmanuele Bassi2013-08-211-3/+0
| | | | | We depend on a new version of GLib, so we can remove a bunch of old version checks.
* tests: Put g_type_init() under conditional compilationEmmanuele Bassi2012-10-271-0/+2
| | | | | | | | Starting from GLib 2.36, g_type_init() is going to be deprecated (the type system will be initialized as soon as libgobject is paged in, using constructors). As I don't want to bump dependencies just for that, the call to g_type_init() should be placed under a compile-time version check, to keep the noise from compiler warnings down.
* tests/invalid: Improve test coverageEmmanuele Bassi2012-10-261-0/+32
|
* tests/invalid: Add more invalid JSON testsEmmanuele Bassi2012-10-251-17/+96
|
* tests/invalid: Check invalid assignmentsEmmanuele Bassi2012-10-251-4/+40
|
* tests: Move the invalid JSON unit to its own fileEmmanuele Bassi2012-10-251-0/+93
Instead of putting it inside the parser unit test.