[PATCH v2 8/9] json: Add some more negative test cases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Arun Raghavan <arun at arunraghavan.net>
---
 src/tests/json-test.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/tests/json-test.c b/src/tests/json-test.c
index 4edfa09..08b2ff6 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++) {
-- 
2.5.5



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux