summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArun Raghavan <arun@arunraghavan.net>2016-06-01 17:18:38 +0530
committerArun Raghavan <arun@arunraghavan.net>2016-06-22 21:04:47 +0530
commit8f45d83bdbf823f499b022571b5f724ab1f3fdad (patch)
treeef6f9a940f05df35d7d9c111ba8e92eb1a6b14ef /src
parent1879beab87db51ab29116eb5ffb2b0201f0ecfda (diff)
json: Add some more negative test cases
Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
Diffstat (limited to 'src')
-rw-r--r--src/tests/json-test.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tests/json-test.c b/src/tests/json-test.c
index 4edfa0940..08b2ff6e8 100644
--- a/src/tests/json-test.c
+++ b/src/tests/json-test.c
@@ -242,6 +242,9 @@ START_TEST(bad_test) {
"-" /* Bad number string */,
"{ \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { \"a\": { } } } } } } } } } } } } } } } } } } } } } }" /* Nested too deep */,
"[ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ { \"a\": \"b\" } ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ]" /* Nested too deep */,
+ "asdf" /* Unquoted string */,
+ "{ a: true }" /* Unquoted key in object */,
+ "\" \a\"" /* Alarm is not a valid character */
};
for (i = 0; i < PA_ELEMENTSOF(bad_parse); i++) {