From c51b1189e3d5353e842991f5859ddcea0f73e426 Mon Sep 17 00:00:00 2001 From: theuni Date: Mon, 24 Jan 2011 16:05:21 -0500 Subject: Merged cptspiff's code-reshuffle branch. Squashed commit due to build breakage during code-reshuffle history. Conflicts: xbmc/Util.cpp xbmc/cdrip/CDDARipper.cpp xbmc/filesystem/Directory.cpp xbmc/filesystem/File.cpp --- lib/jsoncpp/test/cleantests.py | 10 ++ lib/jsoncpp/test/data/test_array_01.expected | 1 + lib/jsoncpp/test/data/test_array_01.json | 1 + lib/jsoncpp/test/data/test_array_02.expected | 2 + lib/jsoncpp/test/data/test_array_02.json | 1 + lib/jsoncpp/test/data/test_array_03.expected | 6 + lib/jsoncpp/test/data/test_array_03.json | 1 + lib/jsoncpp/test/data/test_array_04.expected | 5 + lib/jsoncpp/test/data/test_array_04.json | 1 + lib/jsoncpp/test/data/test_array_05.expected | 100 ++++++++++++++++ lib/jsoncpp/test/data/test_array_05.json | 1 + lib/jsoncpp/test/data/test_array_06.expected | 5 + lib/jsoncpp/test/data/test_array_06.json | 4 + lib/jsoncpp/test/data/test_basic_01.expected | 1 + lib/jsoncpp/test/data/test_basic_01.json | 1 + lib/jsoncpp/test/data/test_basic_02.expected | 1 + lib/jsoncpp/test/data/test_basic_02.json | 1 + lib/jsoncpp/test/data/test_basic_03.expected | 3 + lib/jsoncpp/test/data/test_basic_03.json | 3 + lib/jsoncpp/test/data/test_basic_04.expected | 2 + lib/jsoncpp/test/data/test_basic_04.json | 2 + lib/jsoncpp/test/data/test_basic_05.expected | 2 + lib/jsoncpp/test/data/test_basic_05.json | 2 + lib/jsoncpp/test/data/test_basic_06.expected | 2 + lib/jsoncpp/test/data/test_basic_06.json | 2 + lib/jsoncpp/test/data/test_basic_07.expected | 2 + lib/jsoncpp/test/data/test_basic_07.json | 2 + lib/jsoncpp/test/data/test_basic_08.expected | 2 + lib/jsoncpp/test/data/test_basic_08.json | 3 + lib/jsoncpp/test/data/test_basic_09.expected | 2 + lib/jsoncpp/test/data/test_basic_09.json | 4 + lib/jsoncpp/test/data/test_comment_01.expected | 8 ++ lib/jsoncpp/test/data/test_comment_01.json | 8 ++ lib/jsoncpp/test/data/test_complex_01.expected | 20 ++++ lib/jsoncpp/test/data/test_complex_01.json | 17 +++ lib/jsoncpp/test/data/test_integer_01.expected | 1 + lib/jsoncpp/test/data/test_integer_01.json | 2 + lib/jsoncpp/test/data/test_integer_02.expected | 1 + lib/jsoncpp/test/data/test_integer_02.json | 2 + lib/jsoncpp/test/data/test_integer_03.expected | 1 + lib/jsoncpp/test/data/test_integer_03.json | 2 + lib/jsoncpp/test/data/test_integer_04.expected | 2 + lib/jsoncpp/test/data/test_integer_04.json | 3 + lib/jsoncpp/test/data/test_integer_05.expected | 2 + lib/jsoncpp/test/data/test_integer_05.json | 2 + lib/jsoncpp/test/data/test_object_01.expected | 1 + lib/jsoncpp/test/data/test_object_01.json | 1 + lib/jsoncpp/test/data/test_object_02.expected | 2 + lib/jsoncpp/test/data/test_object_02.json | 1 + lib/jsoncpp/test/data/test_object_03.expected | 4 + lib/jsoncpp/test/data/test_object_03.json | 5 + lib/jsoncpp/test/data/test_object_04.expected | 2 + lib/jsoncpp/test/data/test_object_04.json | 3 + .../test/data/test_preserve_comment_01.expected | 3 + .../test/data/test_preserve_comment_01.json | 14 +++ lib/jsoncpp/test/data/test_real_01.expected | 2 + lib/jsoncpp/test/data/test_real_01.json | 3 + lib/jsoncpp/test/data/test_real_02.expected | 2 + lib/jsoncpp/test/data/test_real_02.json | 3 + lib/jsoncpp/test/data/test_real_03.expected | 2 + lib/jsoncpp/test/data/test_real_03.json | 3 + lib/jsoncpp/test/data/test_real_04.expected | 2 + lib/jsoncpp/test/data/test_real_04.json | 3 + lib/jsoncpp/test/data/test_real_05.expected | 3 + lib/jsoncpp/test/data/test_real_05.json | 3 + lib/jsoncpp/test/data/test_real_06.expected | 3 + lib/jsoncpp/test/data/test_real_06.json | 3 + lib/jsoncpp/test/data/test_real_07.expected | 3 + lib/jsoncpp/test/data/test_real_07.json | 3 + lib/jsoncpp/test/data/test_string_01.expected | 1 + lib/jsoncpp/test/data/test_string_01.json | 1 + lib/jsoncpp/test/data/test_string_02.expected | 1 + lib/jsoncpp/test/data/test_string_02.json | 1 + .../test/data/test_string_unicode_01.expected | 1 + lib/jsoncpp/test/data/test_string_unicode_01.json | 1 + .../test/data/test_string_unicode_02.expected | 1 + lib/jsoncpp/test/data/test_string_unicode_02.json | 1 + .../test/data/test_string_unicode_03.expected | 1 + lib/jsoncpp/test/data/test_string_unicode_03.json | 1 + .../test/data/test_string_unicode_04.expected | 1 + lib/jsoncpp/test/data/test_string_unicode_04.json | 1 + .../test/data/test_string_unicode_05.expected | 1 + lib/jsoncpp/test/data/test_string_unicode_05.json | 1 + lib/jsoncpp/test/generate_expected.py | 11 ++ lib/jsoncpp/test/jsonchecker/fail1.json | 1 + lib/jsoncpp/test/jsonchecker/fail10.json | 1 + lib/jsoncpp/test/jsonchecker/fail11.json | 1 + lib/jsoncpp/test/jsonchecker/fail12.json | 1 + lib/jsoncpp/test/jsonchecker/fail13.json | 1 + lib/jsoncpp/test/jsonchecker/fail14.json | 1 + lib/jsoncpp/test/jsonchecker/fail15.json | 1 + lib/jsoncpp/test/jsonchecker/fail16.json | 1 + lib/jsoncpp/test/jsonchecker/fail17.json | 1 + lib/jsoncpp/test/jsonchecker/fail18.json | 1 + lib/jsoncpp/test/jsonchecker/fail19.json | 1 + lib/jsoncpp/test/jsonchecker/fail2.json | 1 + lib/jsoncpp/test/jsonchecker/fail20.json | 1 + lib/jsoncpp/test/jsonchecker/fail21.json | 1 + lib/jsoncpp/test/jsonchecker/fail22.json | 1 + lib/jsoncpp/test/jsonchecker/fail23.json | 1 + lib/jsoncpp/test/jsonchecker/fail24.json | 1 + lib/jsoncpp/test/jsonchecker/fail25.json | 1 + lib/jsoncpp/test/jsonchecker/fail26.json | 1 + lib/jsoncpp/test/jsonchecker/fail27.json | 2 + lib/jsoncpp/test/jsonchecker/fail28.json | 2 + lib/jsoncpp/test/jsonchecker/fail29.json | 1 + lib/jsoncpp/test/jsonchecker/fail3.json | 1 + lib/jsoncpp/test/jsonchecker/fail30.json | 1 + lib/jsoncpp/test/jsonchecker/fail31.json | 1 + lib/jsoncpp/test/jsonchecker/fail32.json | 1 + lib/jsoncpp/test/jsonchecker/fail33.json | 1 + lib/jsoncpp/test/jsonchecker/fail4.json | 1 + lib/jsoncpp/test/jsonchecker/fail5.json | 1 + lib/jsoncpp/test/jsonchecker/fail6.json | 1 + lib/jsoncpp/test/jsonchecker/fail7.json | 1 + lib/jsoncpp/test/jsonchecker/fail8.json | 1 + lib/jsoncpp/test/jsonchecker/fail9.json | 1 + lib/jsoncpp/test/jsonchecker/pass1.json | 58 +++++++++ lib/jsoncpp/test/jsonchecker/pass2.json | 1 + lib/jsoncpp/test/jsonchecker/pass3.json | 6 + lib/jsoncpp/test/jsonchecker/readme.txt | 3 + lib/jsoncpp/test/jsontestrunner.py | 64 ++++++++++ lib/jsoncpp/test/runjsontests.py | 132 +++++++++++++++++++++ lib/jsoncpp/test/rununittests.py | 73 ++++++++++++ 124 files changed, 717 insertions(+) create mode 100644 lib/jsoncpp/test/cleantests.py create mode 100644 lib/jsoncpp/test/data/test_array_01.expected create mode 100644 lib/jsoncpp/test/data/test_array_01.json create mode 100644 lib/jsoncpp/test/data/test_array_02.expected create mode 100644 lib/jsoncpp/test/data/test_array_02.json create mode 100644 lib/jsoncpp/test/data/test_array_03.expected create mode 100644 lib/jsoncpp/test/data/test_array_03.json create mode 100644 lib/jsoncpp/test/data/test_array_04.expected create mode 100644 lib/jsoncpp/test/data/test_array_04.json create mode 100644 lib/jsoncpp/test/data/test_array_05.expected create mode 100644 lib/jsoncpp/test/data/test_array_05.json create mode 100644 lib/jsoncpp/test/data/test_array_06.expected create mode 100644 lib/jsoncpp/test/data/test_array_06.json create mode 100644 lib/jsoncpp/test/data/test_basic_01.expected create mode 100644 lib/jsoncpp/test/data/test_basic_01.json create mode 100644 lib/jsoncpp/test/data/test_basic_02.expected create mode 100644 lib/jsoncpp/test/data/test_basic_02.json create mode 100644 lib/jsoncpp/test/data/test_basic_03.expected create mode 100644 lib/jsoncpp/test/data/test_basic_03.json create mode 100644 lib/jsoncpp/test/data/test_basic_04.expected create mode 100644 lib/jsoncpp/test/data/test_basic_04.json create mode 100644 lib/jsoncpp/test/data/test_basic_05.expected create mode 100644 lib/jsoncpp/test/data/test_basic_05.json create mode 100644 lib/jsoncpp/test/data/test_basic_06.expected create mode 100644 lib/jsoncpp/test/data/test_basic_06.json create mode 100644 lib/jsoncpp/test/data/test_basic_07.expected create mode 100644 lib/jsoncpp/test/data/test_basic_07.json create mode 100644 lib/jsoncpp/test/data/test_basic_08.expected create mode 100644 lib/jsoncpp/test/data/test_basic_08.json create mode 100644 lib/jsoncpp/test/data/test_basic_09.expected create mode 100644 lib/jsoncpp/test/data/test_basic_09.json create mode 100644 lib/jsoncpp/test/data/test_comment_01.expected create mode 100644 lib/jsoncpp/test/data/test_comment_01.json create mode 100644 lib/jsoncpp/test/data/test_complex_01.expected create mode 100644 lib/jsoncpp/test/data/test_complex_01.json create mode 100644 lib/jsoncpp/test/data/test_integer_01.expected create mode 100644 lib/jsoncpp/test/data/test_integer_01.json create mode 100644 lib/jsoncpp/test/data/test_integer_02.expected create mode 100644 lib/jsoncpp/test/data/test_integer_02.json create mode 100644 lib/jsoncpp/test/data/test_integer_03.expected create mode 100644 lib/jsoncpp/test/data/test_integer_03.json create mode 100644 lib/jsoncpp/test/data/test_integer_04.expected create mode 100644 lib/jsoncpp/test/data/test_integer_04.json create mode 100644 lib/jsoncpp/test/data/test_integer_05.expected create mode 100644 lib/jsoncpp/test/data/test_integer_05.json create mode 100644 lib/jsoncpp/test/data/test_object_01.expected create mode 100644 lib/jsoncpp/test/data/test_object_01.json create mode 100644 lib/jsoncpp/test/data/test_object_02.expected create mode 100644 lib/jsoncpp/test/data/test_object_02.json create mode 100644 lib/jsoncpp/test/data/test_object_03.expected create mode 100644 lib/jsoncpp/test/data/test_object_03.json create mode 100644 lib/jsoncpp/test/data/test_object_04.expected create mode 100644 lib/jsoncpp/test/data/test_object_04.json create mode 100644 lib/jsoncpp/test/data/test_preserve_comment_01.expected create mode 100644 lib/jsoncpp/test/data/test_preserve_comment_01.json create mode 100644 lib/jsoncpp/test/data/test_real_01.expected create mode 100644 lib/jsoncpp/test/data/test_real_01.json create mode 100644 lib/jsoncpp/test/data/test_real_02.expected create mode 100644 lib/jsoncpp/test/data/test_real_02.json create mode 100644 lib/jsoncpp/test/data/test_real_03.expected create mode 100644 lib/jsoncpp/test/data/test_real_03.json create mode 100644 lib/jsoncpp/test/data/test_real_04.expected create mode 100644 lib/jsoncpp/test/data/test_real_04.json create mode 100644 lib/jsoncpp/test/data/test_real_05.expected create mode 100644 lib/jsoncpp/test/data/test_real_05.json create mode 100644 lib/jsoncpp/test/data/test_real_06.expected create mode 100644 lib/jsoncpp/test/data/test_real_06.json create mode 100644 lib/jsoncpp/test/data/test_real_07.expected create mode 100644 lib/jsoncpp/test/data/test_real_07.json create mode 100644 lib/jsoncpp/test/data/test_string_01.expected create mode 100644 lib/jsoncpp/test/data/test_string_01.json create mode 100644 lib/jsoncpp/test/data/test_string_02.expected create mode 100644 lib/jsoncpp/test/data/test_string_02.json create mode 100644 lib/jsoncpp/test/data/test_string_unicode_01.expected create mode 100644 lib/jsoncpp/test/data/test_string_unicode_01.json create mode 100644 lib/jsoncpp/test/data/test_string_unicode_02.expected create mode 100644 lib/jsoncpp/test/data/test_string_unicode_02.json create mode 100644 lib/jsoncpp/test/data/test_string_unicode_03.expected create mode 100644 lib/jsoncpp/test/data/test_string_unicode_03.json create mode 100644 lib/jsoncpp/test/data/test_string_unicode_04.expected create mode 100644 lib/jsoncpp/test/data/test_string_unicode_04.json create mode 100644 lib/jsoncpp/test/data/test_string_unicode_05.expected create mode 100644 lib/jsoncpp/test/data/test_string_unicode_05.json create mode 100644 lib/jsoncpp/test/generate_expected.py create mode 100644 lib/jsoncpp/test/jsonchecker/fail1.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail10.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail11.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail12.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail13.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail14.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail15.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail16.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail17.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail18.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail19.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail2.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail20.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail21.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail22.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail23.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail24.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail25.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail26.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail27.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail28.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail29.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail3.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail30.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail31.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail32.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail33.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail4.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail5.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail6.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail7.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail8.json create mode 100644 lib/jsoncpp/test/jsonchecker/fail9.json create mode 100644 lib/jsoncpp/test/jsonchecker/pass1.json create mode 100644 lib/jsoncpp/test/jsonchecker/pass2.json create mode 100644 lib/jsoncpp/test/jsonchecker/pass3.json create mode 100644 lib/jsoncpp/test/jsonchecker/readme.txt create mode 100644 lib/jsoncpp/test/jsontestrunner.py create mode 100644 lib/jsoncpp/test/runjsontests.py create mode 100644 lib/jsoncpp/test/rununittests.py (limited to 'lib/jsoncpp/test') diff --git a/lib/jsoncpp/test/cleantests.py b/lib/jsoncpp/test/cleantests.py new file mode 100644 index 0000000000..c38fd8ffdd --- /dev/null +++ b/lib/jsoncpp/test/cleantests.py @@ -0,0 +1,10 @@ +# removes all files created during testing +import glob +import os + +paths = [] +for pattern in [ '*.actual', '*.actual-rewrite', '*.rewrite', '*.process-output' ]: + paths += glob.glob( 'data/' + pattern ) + +for path in paths: + os.unlink( path ) diff --git a/lib/jsoncpp/test/data/test_array_01.expected b/lib/jsoncpp/test/data/test_array_01.expected new file mode 100644 index 0000000000..a341ff753c --- /dev/null +++ b/lib/jsoncpp/test/data/test_array_01.expected @@ -0,0 +1 @@ +.=[] diff --git a/lib/jsoncpp/test/data/test_array_01.json b/lib/jsoncpp/test/data/test_array_01.json new file mode 100644 index 0000000000..fe51488c70 --- /dev/null +++ b/lib/jsoncpp/test/data/test_array_01.json @@ -0,0 +1 @@ +[] diff --git a/lib/jsoncpp/test/data/test_array_02.expected b/lib/jsoncpp/test/data/test_array_02.expected new file mode 100644 index 0000000000..ef1f2623de --- /dev/null +++ b/lib/jsoncpp/test/data/test_array_02.expected @@ -0,0 +1,2 @@ +.=[] +.[0]=1 diff --git a/lib/jsoncpp/test/data/test_array_02.json b/lib/jsoncpp/test/data/test_array_02.json new file mode 100644 index 0000000000..7660873d10 --- /dev/null +++ b/lib/jsoncpp/test/data/test_array_02.json @@ -0,0 +1 @@ +[1] diff --git a/lib/jsoncpp/test/data/test_array_03.expected b/lib/jsoncpp/test/data/test_array_03.expected new file mode 100644 index 0000000000..3d8dc18eb1 --- /dev/null +++ b/lib/jsoncpp/test/data/test_array_03.expected @@ -0,0 +1,6 @@ +.=[] +.[0]=1 +.[1]=2 +.[2]=3 +.[3]=4 +.[4]=5 diff --git a/lib/jsoncpp/test/data/test_array_03.json b/lib/jsoncpp/test/data/test_array_03.json new file mode 100644 index 0000000000..9b3f924755 --- /dev/null +++ b/lib/jsoncpp/test/data/test_array_03.json @@ -0,0 +1 @@ +[ 1, 2 , 3,4,5] diff --git a/lib/jsoncpp/test/data/test_array_04.expected b/lib/jsoncpp/test/data/test_array_04.expected new file mode 100644 index 0000000000..ad4add9794 --- /dev/null +++ b/lib/jsoncpp/test/data/test_array_04.expected @@ -0,0 +1,5 @@ +.=[] +.[0]=1 +.[1]="abc" +.[2]=12.3 +.[3]=-4 diff --git a/lib/jsoncpp/test/data/test_array_04.json b/lib/jsoncpp/test/data/test_array_04.json new file mode 100644 index 0000000000..ecca546b2c --- /dev/null +++ b/lib/jsoncpp/test/data/test_array_04.json @@ -0,0 +1 @@ +[1, "abc" , 12.3, -4] diff --git a/lib/jsoncpp/test/data/test_array_05.expected b/lib/jsoncpp/test/data/test_array_05.expected new file mode 100644 index 0000000000..76cff87c2a --- /dev/null +++ b/lib/jsoncpp/test/data/test_array_05.expected @@ -0,0 +1,100 @@ +.=[] +.[0]=1 +.[1]=2 +.[2]=3 +.[3]=4 +.[4]=5 +.[5]=6 +.[6]=7 +.[7]=8 +.[8]=9 +.[9]=10 +.[10]=11 +.[11]=12 +.[12]=13 +.[13]=14 +.[14]=15 +.[15]=16 +.[16]=17 +.[17]=18 +.[18]=19 +.[19]=20 +.[20]=21 +.[21]=22 +.[22]=23 +.[23]=24 +.[24]=25 +.[25]=26 +.[26]=27 +.[27]=28 +.[28]=29 +.[29]=30 +.[30]=31 +.[31]=32 +.[32]=33 +.[33]=34 +.[34]=35 +.[35]=36 +.[36]=37 +.[37]=38 +.[38]=39 +.[39]=40 +.[40]=41 +.[41]=42 +.[42]=43 +.[43]=44 +.[44]=45 +.[45]=46 +.[46]=47 +.[47]=48 +.[48]=49 +.[49]=50 +.[50]=51 +.[51]=52 +.[52]=53 +.[53]=54 +.[54]=55 +.[55]=56 +.[56]=57 +.[57]=58 +.[58]=59 +.[59]=60 +.[60]=61 +.[61]=62 +.[62]=63 +.[63]=64 +.[64]=65 +.[65]=66 +.[66]=67 +.[67]=68 +.[68]=69 +.[69]=70 +.[70]=71 +.[71]=72 +.[72]=73 +.[73]=74 +.[74]=75 +.[75]=76 +.[76]=77 +.[77]=78 +.[78]=79 +.[79]=80 +.[80]=81 +.[81]=82 +.[82]=83 +.[83]=84 +.[84]=85 +.[85]=86 +.[86]=87 +.[87]=88 +.[88]=89 +.[89]=90 +.[90]=91 +.[91]=92 +.[92]=93 +.[93]=94 +.[94]=95 +.[95]=96 +.[96]=97 +.[97]=98 +.[98]=99 diff --git a/lib/jsoncpp/test/data/test_array_05.json b/lib/jsoncpp/test/data/test_array_05.json new file mode 100644 index 0000000000..7809d6c9a1 --- /dev/null +++ b/lib/jsoncpp/test/data/test_array_05.json @@ -0,0 +1 @@ +[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99] \ No newline at end of file diff --git a/lib/jsoncpp/test/data/test_array_06.expected b/lib/jsoncpp/test/data/test_array_06.expected new file mode 100644 index 0000000000..5c9f48eaac --- /dev/null +++ b/lib/jsoncpp/test/data/test_array_06.expected @@ -0,0 +1,5 @@ +.=[] +.[0]="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +.[1]="bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" +.[2]="ccccccccccccccccccccccc" +.[3]="dddddddddddddddddddddddddddddddddddddddddddddddddddd" diff --git a/lib/jsoncpp/test/data/test_array_06.json b/lib/jsoncpp/test/data/test_array_06.json new file mode 100644 index 0000000000..7f6c516afd --- /dev/null +++ b/lib/jsoncpp/test/data/test_array_06.json @@ -0,0 +1,4 @@ +[ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "ccccccccccccccccccccccc", + "dddddddddddddddddddddddddddddddddddddddddddddddddddd" ] \ No newline at end of file diff --git a/lib/jsoncpp/test/data/test_basic_01.expected b/lib/jsoncpp/test/data/test_basic_01.expected new file mode 100644 index 0000000000..d761fce1cc --- /dev/null +++ b/lib/jsoncpp/test/data/test_basic_01.expected @@ -0,0 +1 @@ +.=123456789 diff --git a/lib/jsoncpp/test/data/test_basic_01.json b/lib/jsoncpp/test/data/test_basic_01.json new file mode 100644 index 0000000000..11f11f9be3 --- /dev/null +++ b/lib/jsoncpp/test/data/test_basic_01.json @@ -0,0 +1 @@ +0123456789 diff --git a/lib/jsoncpp/test/data/test_basic_02.expected b/lib/jsoncpp/test/data/test_basic_02.expected new file mode 100644 index 0000000000..650e37cbaa --- /dev/null +++ b/lib/jsoncpp/test/data/test_basic_02.expected @@ -0,0 +1 @@ +.=-123456789 diff --git a/lib/jsoncpp/test/data/test_basic_02.json b/lib/jsoncpp/test/data/test_basic_02.json new file mode 100644 index 0000000000..bf11bceac7 --- /dev/null +++ b/lib/jsoncpp/test/data/test_basic_02.json @@ -0,0 +1 @@ +-0123456789 diff --git a/lib/jsoncpp/test/data/test_basic_03.expected b/lib/jsoncpp/test/data/test_basic_03.expected new file mode 100644 index 0000000000..1da2d395b8 --- /dev/null +++ b/lib/jsoncpp/test/data/test_basic_03.expected @@ -0,0 +1,3 @@ +.=1.2345678 + + diff --git a/lib/jsoncpp/test/data/test_basic_03.json b/lib/jsoncpp/test/data/test_basic_03.json new file mode 100644 index 0000000000..a92b6bd28b --- /dev/null +++ b/lib/jsoncpp/test/data/test_basic_03.json @@ -0,0 +1,3 @@ +1.2345678 + + diff --git a/lib/jsoncpp/test/data/test_basic_04.expected b/lib/jsoncpp/test/data/test_basic_04.expected new file mode 100644 index 0000000000..013f424f93 --- /dev/null +++ b/lib/jsoncpp/test/data/test_basic_04.expected @@ -0,0 +1,2 @@ +.="abcdef" + diff --git a/lib/jsoncpp/test/data/test_basic_04.json b/lib/jsoncpp/test/data/test_basic_04.json new file mode 100644 index 0000000000..17eeb99e0b --- /dev/null +++ b/lib/jsoncpp/test/data/test_basic_04.json @@ -0,0 +1,2 @@ +"abcdef" + diff --git a/lib/jsoncpp/test/data/test_basic_05.expected b/lib/jsoncpp/test/data/test_basic_05.expected new file mode 100644 index 0000000000..c8db822e58 --- /dev/null +++ b/lib/jsoncpp/test/data/test_basic_05.expected @@ -0,0 +1,2 @@ +.=null + diff --git a/lib/jsoncpp/test/data/test_basic_05.json b/lib/jsoncpp/test/data/test_basic_05.json new file mode 100644 index 0000000000..d0aaea2126 --- /dev/null +++ b/lib/jsoncpp/test/data/test_basic_05.json @@ -0,0 +1,2 @@ +null + diff --git a/lib/jsoncpp/test/data/test_basic_06.expected b/lib/jsoncpp/test/data/test_basic_06.expected new file mode 100644 index 0000000000..49be55a965 --- /dev/null +++ b/lib/jsoncpp/test/data/test_basic_06.expected @@ -0,0 +1,2 @@ +.=true + diff --git a/lib/jsoncpp/test/data/test_basic_06.json b/lib/jsoncpp/test/data/test_basic_06.json new file mode 100644 index 0000000000..7eead1ee75 --- /dev/null +++ b/lib/jsoncpp/test/data/test_basic_06.json @@ -0,0 +1,2 @@ +true + diff --git a/lib/jsoncpp/test/data/test_basic_07.expected b/lib/jsoncpp/test/data/test_basic_07.expected new file mode 100644 index 0000000000..fe55a6a854 --- /dev/null +++ b/lib/jsoncpp/test/data/test_basic_07.expected @@ -0,0 +1,2 @@ +.=false + diff --git a/lib/jsoncpp/test/data/test_basic_07.json b/lib/jsoncpp/test/data/test_basic_07.json new file mode 100644 index 0000000000..a864bc487d --- /dev/null +++ b/lib/jsoncpp/test/data/test_basic_07.json @@ -0,0 +1,2 @@ +false + diff --git a/lib/jsoncpp/test/data/test_basic_08.expected b/lib/jsoncpp/test/data/test_basic_08.expected new file mode 100644 index 0000000000..c8db822e58 --- /dev/null +++ b/lib/jsoncpp/test/data/test_basic_08.expected @@ -0,0 +1,2 @@ +.=null + diff --git a/lib/jsoncpp/test/data/test_basic_08.json b/lib/jsoncpp/test/data/test_basic_08.json new file mode 100644 index 0000000000..fd78837c0c --- /dev/null +++ b/lib/jsoncpp/test/data/test_basic_08.json @@ -0,0 +1,3 @@ +// C++ style comment +null + diff --git a/lib/jsoncpp/test/data/test_basic_09.expected b/lib/jsoncpp/test/data/test_basic_09.expected new file mode 100644 index 0000000000..c8db822e58 --- /dev/null +++ b/lib/jsoncpp/test/data/test_basic_09.expected @@ -0,0 +1,2 @@ +.=null + diff --git a/lib/jsoncpp/test/data/test_basic_09.json b/lib/jsoncpp/test/data/test_basic_09.json new file mode 100644 index 0000000000..fc95f0f514 --- /dev/null +++ b/lib/jsoncpp/test/data/test_basic_09.json @@ -0,0 +1,4 @@ +/* C style comment + */ +null + diff --git a/lib/jsoncpp/test/data/test_comment_01.expected b/lib/jsoncpp/test/data/test_comment_01.expected new file mode 100644 index 0000000000..2a7f00c450 --- /dev/null +++ b/lib/jsoncpp/test/data/test_comment_01.expected @@ -0,0 +1,8 @@ +.={} +.test=[] +.test[0]={} +.test[0].a="aaa" +.test[1]={} +.test[1].b="bbb" +.test[2]={} +.test[2].c="ccc" diff --git a/lib/jsoncpp/test/data/test_comment_01.json b/lib/jsoncpp/test/data/test_comment_01.json new file mode 100644 index 0000000000..7363490a91 --- /dev/null +++ b/lib/jsoncpp/test/data/test_comment_01.json @@ -0,0 +1,8 @@ +{ + "test": + [ + { "a" : "aaa" }, // Comment for a + { "b" : "bbb" }, // Comment for b + { "c" : "ccc" } // Comment for c + ] +} diff --git a/lib/jsoncpp/test/data/test_complex_01.expected b/lib/jsoncpp/test/data/test_complex_01.expected new file mode 100644 index 0000000000..7573c8812d --- /dev/null +++ b/lib/jsoncpp/test/data/test_complex_01.expected @@ -0,0 +1,20 @@ +.={} +.attribute=[] +.attribute[0]="random" +.attribute[1]="short" +.attribute[2]="bold" +.attribute[3]=12 +.attribute[4]={} +.attribute[4].height=7 +.attribute[4].width=64 +.count=1234 +.name={} +.name.aka="T.E.S.T." +.name.id=123987 +.test={} +.test.1={} +.test.1.2={} +.test.1.2.3={} +.test.1.2.3.coord=[] +.test.1.2.3.coord[0]=1 +.test.1.2.3.coord[1]=2 diff --git a/lib/jsoncpp/test/data/test_complex_01.json b/lib/jsoncpp/test/data/test_complex_01.json new file mode 100644 index 0000000000..cc0f30f5c3 --- /dev/null +++ b/lib/jsoncpp/test/data/test_complex_01.json @@ -0,0 +1,17 @@ +{ + "count" : 1234, + "name" : { "aka" : "T.E.S.T.", "id" : 123987 }, + "attribute" : [ + "random", + "short", + "bold", + 12, + { "height" : 7, "width" : 64 } + ], + "test": { "1" : + { "2" : + { "3" : { "coord" : [ 1,2] } + } + } + } +} diff --git a/lib/jsoncpp/test/data/test_integer_01.expected b/lib/jsoncpp/test/data/test_integer_01.expected new file mode 100644 index 0000000000..593f1db32b --- /dev/null +++ b/lib/jsoncpp/test/data/test_integer_01.expected @@ -0,0 +1 @@ +.=2147483647 diff --git a/lib/jsoncpp/test/data/test_integer_01.json b/lib/jsoncpp/test/data/test_integer_01.json new file mode 100644 index 0000000000..5ab12ffee4 --- /dev/null +++ b/lib/jsoncpp/test/data/test_integer_01.json @@ -0,0 +1,2 @@ +// Max signed integer +2147483647 diff --git a/lib/jsoncpp/test/data/test_integer_02.expected b/lib/jsoncpp/test/data/test_integer_02.expected new file mode 100644 index 0000000000..4b83bd7cae --- /dev/null +++ b/lib/jsoncpp/test/data/test_integer_02.expected @@ -0,0 +1 @@ +.=-2147483648 diff --git a/lib/jsoncpp/test/data/test_integer_02.json b/lib/jsoncpp/test/data/test_integer_02.json new file mode 100644 index 0000000000..056c850065 --- /dev/null +++ b/lib/jsoncpp/test/data/test_integer_02.json @@ -0,0 +1,2 @@ +// Min signed integer +-2147483648 diff --git a/lib/jsoncpp/test/data/test_integer_03.expected b/lib/jsoncpp/test/data/test_integer_03.expected new file mode 100644 index 0000000000..37c1cb146b --- /dev/null +++ b/lib/jsoncpp/test/data/test_integer_03.expected @@ -0,0 +1 @@ +.=4294967295 diff --git a/lib/jsoncpp/test/data/test_integer_03.json b/lib/jsoncpp/test/data/test_integer_03.json new file mode 100644 index 0000000000..12ef3fbb89 --- /dev/null +++ b/lib/jsoncpp/test/data/test_integer_03.json @@ -0,0 +1,2 @@ +// Max unsigned integer +4294967295 diff --git a/lib/jsoncpp/test/data/test_integer_04.expected b/lib/jsoncpp/test/data/test_integer_04.expected new file mode 100644 index 0000000000..b7b548e3d3 --- /dev/null +++ b/lib/jsoncpp/test/data/test_integer_04.expected @@ -0,0 +1,2 @@ +.=0 + diff --git a/lib/jsoncpp/test/data/test_integer_04.json b/lib/jsoncpp/test/data/test_integer_04.json new file mode 100644 index 0000000000..bf81499453 --- /dev/null +++ b/lib/jsoncpp/test/data/test_integer_04.json @@ -0,0 +1,3 @@ +// Min unsigned integer +0 + diff --git a/lib/jsoncpp/test/data/test_integer_05.expected b/lib/jsoncpp/test/data/test_integer_05.expected new file mode 100644 index 0000000000..0caea9d3fd --- /dev/null +++ b/lib/jsoncpp/test/data/test_integer_05.expected @@ -0,0 +1,2 @@ +.=1 + diff --git a/lib/jsoncpp/test/data/test_integer_05.json b/lib/jsoncpp/test/data/test_integer_05.json new file mode 100644 index 0000000000..d474e1b4d6 --- /dev/null +++ b/lib/jsoncpp/test/data/test_integer_05.json @@ -0,0 +1,2 @@ +1 + diff --git a/lib/jsoncpp/test/data/test_object_01.expected b/lib/jsoncpp/test/data/test_object_01.expected new file mode 100644 index 0000000000..67444e5794 --- /dev/null +++ b/lib/jsoncpp/test/data/test_object_01.expected @@ -0,0 +1 @@ +.={} diff --git a/lib/jsoncpp/test/data/test_object_01.json b/lib/jsoncpp/test/data/test_object_01.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/lib/jsoncpp/test/data/test_object_01.json @@ -0,0 +1 @@ +{} diff --git a/lib/jsoncpp/test/data/test_object_02.expected b/lib/jsoncpp/test/data/test_object_02.expected new file mode 100644 index 0000000000..79391c2a6c --- /dev/null +++ b/lib/jsoncpp/test/data/test_object_02.expected @@ -0,0 +1,2 @@ +.={} +.count=1234 diff --git a/lib/jsoncpp/test/data/test_object_02.json b/lib/jsoncpp/test/data/test_object_02.json new file mode 100644 index 0000000000..d0f2facac3 --- /dev/null +++ b/lib/jsoncpp/test/data/test_object_02.json @@ -0,0 +1 @@ +{ "count" : 1234 } diff --git a/lib/jsoncpp/test/data/test_object_03.expected b/lib/jsoncpp/test/data/test_object_03.expected new file mode 100644 index 0000000000..5e96113792 --- /dev/null +++ b/lib/jsoncpp/test/data/test_object_03.expected @@ -0,0 +1,4 @@ +.={} +.attribute="random" +.count=1234 +.name="test" diff --git a/lib/jsoncpp/test/data/test_object_03.json b/lib/jsoncpp/test/data/test_object_03.json new file mode 100644 index 0000000000..4fcd4d821d --- /dev/null +++ b/lib/jsoncpp/test/data/test_object_03.json @@ -0,0 +1,5 @@ +{ + "count" : 1234, + "name" : "test", + "attribute" : "random" +} diff --git a/lib/jsoncpp/test/data/test_object_04.expected b/lib/jsoncpp/test/data/test_object_04.expected new file mode 100644 index 0000000000..812965b0ca --- /dev/null +++ b/lib/jsoncpp/test/data/test_object_04.expected @@ -0,0 +1,2 @@ +.={} +.=1234 diff --git a/lib/jsoncpp/test/data/test_object_04.json b/lib/jsoncpp/test/data/test_object_04.json new file mode 100644 index 0000000000..450762d71e --- /dev/null +++ b/lib/jsoncpp/test/data/test_object_04.json @@ -0,0 +1,3 @@ +{ + "" : 1234 +} diff --git a/lib/jsoncpp/test/data/test_preserve_comment_01.expected b/lib/jsoncpp/test/data/test_preserve_comment_01.expected new file mode 100644 index 0000000000..8d88041086 --- /dev/null +++ b/lib/jsoncpp/test/data/test_preserve_comment_01.expected @@ -0,0 +1,3 @@ +.={} +.first=1 +.second=2 diff --git a/lib/jsoncpp/test/data/test_preserve_comment_01.json b/lib/jsoncpp/test/data/test_preserve_comment_01.json new file mode 100644 index 0000000000..fabd55dd96 --- /dev/null +++ b/lib/jsoncpp/test/data/test_preserve_comment_01.json @@ -0,0 +1,14 @@ +/* A comment + at the beginning of the file. + */ +{ + "first" : 1, // comment after 'first' on the same line + +/* Comment before 'second' + */ + "second" : 2 +} + +/* A comment at + the end of the file. + */ diff --git a/lib/jsoncpp/test/data/test_real_01.expected b/lib/jsoncpp/test/data/test_real_01.expected new file mode 100644 index 0000000000..ae2357231e --- /dev/null +++ b/lib/jsoncpp/test/data/test_real_01.expected @@ -0,0 +1,2 @@ +.=8589934592 + diff --git a/lib/jsoncpp/test/data/test_real_01.json b/lib/jsoncpp/test/data/test_real_01.json new file mode 100644 index 0000000000..358452d387 --- /dev/null +++ b/lib/jsoncpp/test/data/test_real_01.json @@ -0,0 +1,3 @@ +// 2^33 => out of integer range, switch to double +8589934592 + diff --git a/lib/jsoncpp/test/data/test_real_02.expected b/lib/jsoncpp/test/data/test_real_02.expected new file mode 100644 index 0000000000..df8de42109 --- /dev/null +++ b/lib/jsoncpp/test/data/test_real_02.expected @@ -0,0 +1,2 @@ +.=-4294967295 + diff --git a/lib/jsoncpp/test/data/test_real_02.json b/lib/jsoncpp/test/data/test_real_02.json new file mode 100644 index 0000000000..936c706b68 --- /dev/null +++ b/lib/jsoncpp/test/data/test_real_02.json @@ -0,0 +1,3 @@ +// -2^32 => out of signed integer range, switch to double +-4294967295 + diff --git a/lib/jsoncpp/test/data/test_real_03.expected b/lib/jsoncpp/test/data/test_real_03.expected new file mode 100644 index 0000000000..df8de42109 --- /dev/null +++ b/lib/jsoncpp/test/data/test_real_03.expected @@ -0,0 +1,2 @@ +.=-4294967295 + diff --git a/lib/jsoncpp/test/data/test_real_03.json b/lib/jsoncpp/test/data/test_real_03.json new file mode 100644 index 0000000000..936c706b68 --- /dev/null +++ b/lib/jsoncpp/test/data/test_real_03.json @@ -0,0 +1,3 @@ +// -2^32 => out of signed integer range, switch to double +-4294967295 + diff --git a/lib/jsoncpp/test/data/test_real_04.expected b/lib/jsoncpp/test/data/test_real_04.expected new file mode 100644 index 0000000000..d726abe40b --- /dev/null +++ b/lib/jsoncpp/test/data/test_real_04.expected @@ -0,0 +1,2 @@ +.=1.2345678 + diff --git a/lib/jsoncpp/test/data/test_real_04.json b/lib/jsoncpp/test/data/test_real_04.json new file mode 100644 index 0000000000..a8eb6d0c92 --- /dev/null +++ b/lib/jsoncpp/test/data/test_real_04.json @@ -0,0 +1,3 @@ +// 1.2345678 +12345678e-7 + diff --git a/lib/jsoncpp/test/data/test_real_05.expected b/lib/jsoncpp/test/data/test_real_05.expected new file mode 100644 index 0000000000..949fd8f55d --- /dev/null +++ b/lib/jsoncpp/test/data/test_real_05.expected @@ -0,0 +1,3 @@ +.=1234567.8 + + diff --git a/lib/jsoncpp/test/data/test_real_05.json b/lib/jsoncpp/test/data/test_real_05.json new file mode 100644 index 0000000000..f7923bab89 --- /dev/null +++ b/lib/jsoncpp/test/data/test_real_05.json @@ -0,0 +1,3 @@ +// 1234567.8 +0.12345678e7 + diff --git a/lib/jsoncpp/test/data/test_real_06.expected b/lib/jsoncpp/test/data/test_real_06.expected new file mode 100644 index 0000000000..03b7d7f987 --- /dev/null +++ b/lib/jsoncpp/test/data/test_real_06.expected @@ -0,0 +1,3 @@ +.=-1.2345678 + + diff --git a/lib/jsoncpp/test/data/test_real_06.json b/lib/jsoncpp/test/data/test_real_06.json new file mode 100644 index 0000000000..485419a276 --- /dev/null +++ b/lib/jsoncpp/test/data/test_real_06.json @@ -0,0 +1,3 @@ +// -1.2345678 +-12345678e-7 + diff --git a/lib/jsoncpp/test/data/test_real_07.expected b/lib/jsoncpp/test/data/test_real_07.expected new file mode 100644 index 0000000000..12025a404b --- /dev/null +++ b/lib/jsoncpp/test/data/test_real_07.expected @@ -0,0 +1,3 @@ +.=-1234567.8 + + diff --git a/lib/jsoncpp/test/data/test_real_07.json b/lib/jsoncpp/test/data/test_real_07.json new file mode 100644 index 0000000000..8013eb5c9a --- /dev/null +++ b/lib/jsoncpp/test/data/test_real_07.json @@ -0,0 +1,3 @@ +// -1234567.8 +-0.12345678e7 + diff --git a/lib/jsoncpp/test/data/test_string_01.expected b/lib/jsoncpp/test/data/test_string_01.expected new file mode 100644 index 0000000000..8fd37b1e0e --- /dev/null +++ b/lib/jsoncpp/test/data/test_string_01.expected @@ -0,0 +1 @@ +.="!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~" \ No newline at end of file diff --git a/lib/jsoncpp/test/data/test_string_01.json b/lib/jsoncpp/test/data/test_string_01.json new file mode 100644 index 0000000000..6cd0db44df --- /dev/null +++ b/lib/jsoncpp/test/data/test_string_01.json @@ -0,0 +1 @@ +"!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" diff --git a/lib/jsoncpp/test/data/test_string_02.expected b/lib/jsoncpp/test/data/test_string_02.expected new file mode 100644 index 0000000000..0443bc3649 --- /dev/null +++ b/lib/jsoncpp/test/data/test_string_02.expected @@ -0,0 +1 @@ +.="!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~" \ No newline at end of file diff --git a/lib/jsoncpp/test/data/test_string_02.json b/lib/jsoncpp/test/data/test_string_02.json new file mode 100644 index 0000000000..9a7e5dcad4 --- /dev/null +++ b/lib/jsoncpp/test/data/test_string_02.json @@ -0,0 +1 @@ +"!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" diff --git a/lib/jsoncpp/test/data/test_string_unicode_01.expected b/lib/jsoncpp/test/data/test_string_unicode_01.expected new file mode 100644 index 0000000000..1f3be7fb68 --- /dev/null +++ b/lib/jsoncpp/test/data/test_string_unicode_01.expected @@ -0,0 +1 @@ +.="a" diff --git a/lib/jsoncpp/test/data/test_string_unicode_01.json b/lib/jsoncpp/test/data/test_string_unicode_01.json new file mode 100644 index 0000000000..024114bc09 --- /dev/null +++ b/lib/jsoncpp/test/data/test_string_unicode_01.json @@ -0,0 +1 @@ +"\u0061" \ No newline at end of file diff --git a/lib/jsoncpp/test/data/test_string_unicode_02.expected b/lib/jsoncpp/test/data/test_string_unicode_02.expected new file mode 100644 index 0000000000..1388f53943 --- /dev/null +++ b/lib/jsoncpp/test/data/test_string_unicode_02.expected @@ -0,0 +1 @@ +.="¢" diff --git a/lib/jsoncpp/test/data/test_string_unicode_02.json b/lib/jsoncpp/test/data/test_string_unicode_02.json new file mode 100644 index 0000000000..4961024fab --- /dev/null +++ b/lib/jsoncpp/test/data/test_string_unicode_02.json @@ -0,0 +1 @@ +"\u00A2" \ No newline at end of file diff --git a/lib/jsoncpp/test/data/test_string_unicode_03.expected b/lib/jsoncpp/test/data/test_string_unicode_03.expected new file mode 100644 index 0000000000..9b80b2719f --- /dev/null +++ b/lib/jsoncpp/test/data/test_string_unicode_03.expected @@ -0,0 +1 @@ +.="€" diff --git a/lib/jsoncpp/test/data/test_string_unicode_03.json b/lib/jsoncpp/test/data/test_string_unicode_03.json new file mode 100644 index 0000000000..e7e1a9e138 --- /dev/null +++ b/lib/jsoncpp/test/data/test_string_unicode_03.json @@ -0,0 +1 @@ +"\u20AC" \ No newline at end of file diff --git a/lib/jsoncpp/test/data/test_string_unicode_04.expected b/lib/jsoncpp/test/data/test_string_unicode_04.expected new file mode 100644 index 0000000000..b9e7fe3b7d --- /dev/null +++ b/lib/jsoncpp/test/data/test_string_unicode_04.expected @@ -0,0 +1 @@ +.="𝄞" diff --git a/lib/jsoncpp/test/data/test_string_unicode_04.json b/lib/jsoncpp/test/data/test_string_unicode_04.json new file mode 100644 index 0000000000..dae65c5155 --- /dev/null +++ b/lib/jsoncpp/test/data/test_string_unicode_04.json @@ -0,0 +1 @@ +"\uD834\uDD1E" \ No newline at end of file diff --git a/lib/jsoncpp/test/data/test_string_unicode_05.expected b/lib/jsoncpp/test/data/test_string_unicode_05.expected new file mode 100644 index 0000000000..e78506524c --- /dev/null +++ b/lib/jsoncpp/test/data/test_string_unicode_05.expected @@ -0,0 +1 @@ +.="za\u017c\u00f3\u0142\u0107 g\u0119\u015bl\u0105 ja\u017a\u0144" \ No newline at end of file diff --git a/lib/jsoncpp/test/data/test_string_unicode_05.json b/lib/jsoncpp/test/data/test_string_unicode_05.json new file mode 100644 index 0000000000..8770410946 --- /dev/null +++ b/lib/jsoncpp/test/data/test_string_unicode_05.json @@ -0,0 +1 @@ +"Zażółć gęślą jaźń" \ No newline at end of file diff --git a/lib/jsoncpp/test/generate_expected.py b/lib/jsoncpp/test/generate_expected.py new file mode 100644 index 0000000000..5b215c4670 --- /dev/null +++ b/lib/jsoncpp/test/generate_expected.py @@ -0,0 +1,11 @@ +import glob +import os.path +for path in glob.glob( '*.json' ): + text = file(path,'rt').read() + target = os.path.splitext(path)[0] + '.expected' + if os.path.exists( target ): + print 'skipping:', target + else: + print 'creating:', target + file(target,'wt').write(text) + diff --git a/lib/jsoncpp/test/jsonchecker/fail1.json b/lib/jsoncpp/test/jsonchecker/fail1.json new file mode 100644 index 0000000000..6216b865f1 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail1.json @@ -0,0 +1 @@ +"A JSON payload should be an object or array, not a string." \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail10.json b/lib/jsoncpp/test/jsonchecker/fail10.json new file mode 100644 index 0000000000..5d8c0047bd --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail10.json @@ -0,0 +1 @@ +{"Extra value after close": true} "misplaced quoted value" \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail11.json b/lib/jsoncpp/test/jsonchecker/fail11.json new file mode 100644 index 0000000000..76eb95b458 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail11.json @@ -0,0 +1 @@ +{"Illegal expression": 1 + 2} \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail12.json b/lib/jsoncpp/test/jsonchecker/fail12.json new file mode 100644 index 0000000000..77580a4522 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail12.json @@ -0,0 +1 @@ +{"Illegal invocation": alert()} \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail13.json b/lib/jsoncpp/test/jsonchecker/fail13.json new file mode 100644 index 0000000000..379406b59b --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail13.json @@ -0,0 +1 @@ +{"Numbers cannot have leading zeroes": 013} \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail14.json b/lib/jsoncpp/test/jsonchecker/fail14.json new file mode 100644 index 0000000000..0ed366b38a --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail14.json @@ -0,0 +1 @@ +{"Numbers cannot be hex": 0x14} \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail15.json b/lib/jsoncpp/test/jsonchecker/fail15.json new file mode 100644 index 0000000000..fc8376b605 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail15.json @@ -0,0 +1 @@ +["Illegal backslash escape: \x15"] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail16.json b/lib/jsoncpp/test/jsonchecker/fail16.json new file mode 100644 index 0000000000..3fe21d4b53 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail16.json @@ -0,0 +1 @@ +[\naked] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail17.json b/lib/jsoncpp/test/jsonchecker/fail17.json new file mode 100644 index 0000000000..62b9214aed --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail17.json @@ -0,0 +1 @@ +["Illegal backslash escape: \017"] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail18.json b/lib/jsoncpp/test/jsonchecker/fail18.json new file mode 100644 index 0000000000..edac92716f --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail18.json @@ -0,0 +1 @@ +[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail19.json b/lib/jsoncpp/test/jsonchecker/fail19.json new file mode 100644 index 0000000000..3b9c46fa9a --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail19.json @@ -0,0 +1 @@ +{"Missing colon" null} \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail2.json b/lib/jsoncpp/test/jsonchecker/fail2.json new file mode 100644 index 0000000000..6b7c11e5a5 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail2.json @@ -0,0 +1 @@ +["Unclosed array" \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail20.json b/lib/jsoncpp/test/jsonchecker/fail20.json new file mode 100644 index 0000000000..27c1af3e72 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail20.json @@ -0,0 +1 @@ +{"Double colon":: null} \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail21.json b/lib/jsoncpp/test/jsonchecker/fail21.json new file mode 100644 index 0000000000..62474573b2 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail21.json @@ -0,0 +1 @@ +{"Comma instead of colon", null} \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail22.json b/lib/jsoncpp/test/jsonchecker/fail22.json new file mode 100644 index 0000000000..a7752581bc --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail22.json @@ -0,0 +1 @@ +["Colon instead of comma": false] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail23.json b/lib/jsoncpp/test/jsonchecker/fail23.json new file mode 100644 index 0000000000..494add1ca1 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail23.json @@ -0,0 +1 @@ +["Bad value", truth] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail24.json b/lib/jsoncpp/test/jsonchecker/fail24.json new file mode 100644 index 0000000000..caff239bfc --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail24.json @@ -0,0 +1 @@ +['single quote'] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail25.json b/lib/jsoncpp/test/jsonchecker/fail25.json new file mode 100644 index 0000000000..8b7ad23e01 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail25.json @@ -0,0 +1 @@ +[" tab character in string "] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail26.json b/lib/jsoncpp/test/jsonchecker/fail26.json new file mode 100644 index 0000000000..845d26a6a5 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail26.json @@ -0,0 +1 @@ +["tab\ character\ in\ string\ "] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail27.json b/lib/jsoncpp/test/jsonchecker/fail27.json new file mode 100644 index 0000000000..6b01a2ca4a --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail27.json @@ -0,0 +1,2 @@ +["line +break"] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail28.json b/lib/jsoncpp/test/jsonchecker/fail28.json new file mode 100644 index 0000000000..621a0101c6 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail28.json @@ -0,0 +1,2 @@ +["line\ +break"] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail29.json b/lib/jsoncpp/test/jsonchecker/fail29.json new file mode 100644 index 0000000000..47ec421bb6 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail29.json @@ -0,0 +1 @@ +[0e] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail3.json b/lib/jsoncpp/test/jsonchecker/fail3.json new file mode 100644 index 0000000000..168c81eb78 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail3.json @@ -0,0 +1 @@ +{unquoted_key: "keys must be quoted"} \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail30.json b/lib/jsoncpp/test/jsonchecker/fail30.json new file mode 100644 index 0000000000..8ab0bc4b8b --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail30.json @@ -0,0 +1 @@ +[0e+] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail31.json b/lib/jsoncpp/test/jsonchecker/fail31.json new file mode 100644 index 0000000000..1cce602b51 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail31.json @@ -0,0 +1 @@ +[0e+-1] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail32.json b/lib/jsoncpp/test/jsonchecker/fail32.json new file mode 100644 index 0000000000..45cba7396f --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail32.json @@ -0,0 +1 @@ +{"Comma instead if closing brace": true, \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail33.json b/lib/jsoncpp/test/jsonchecker/fail33.json new file mode 100644 index 0000000000..ca5eb19dc9 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail33.json @@ -0,0 +1 @@ +["mismatch"} \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail4.json b/lib/jsoncpp/test/jsonchecker/fail4.json new file mode 100644 index 0000000000..9de168bf34 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail4.json @@ -0,0 +1 @@ +["extra comma",] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail5.json b/lib/jsoncpp/test/jsonchecker/fail5.json new file mode 100644 index 0000000000..ddf3ce3d24 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail5.json @@ -0,0 +1 @@ +["double extra comma",,] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail6.json b/lib/jsoncpp/test/jsonchecker/fail6.json new file mode 100644 index 0000000000..ed91580e1b --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail6.json @@ -0,0 +1 @@ +[ , "<-- missing value"] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail7.json b/lib/jsoncpp/test/jsonchecker/fail7.json new file mode 100644 index 0000000000..8a96af3e4e --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail7.json @@ -0,0 +1 @@ +["Comma after the close"], \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail8.json b/lib/jsoncpp/test/jsonchecker/fail8.json new file mode 100644 index 0000000000..b28479c6ec --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail8.json @@ -0,0 +1 @@ +["Extra close"]] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/fail9.json b/lib/jsoncpp/test/jsonchecker/fail9.json new file mode 100644 index 0000000000..5815574f36 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/fail9.json @@ -0,0 +1 @@ +{"Extra comma": true,} \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/pass1.json b/lib/jsoncpp/test/jsonchecker/pass1.json new file mode 100644 index 0000000000..70e2685436 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/pass1.json @@ -0,0 +1,58 @@ +[ + "JSON Test Pattern pass1", + {"object with 1 member":["array with 1 element"]}, + {}, + [], + -42, + true, + false, + null, + { + "integer": 1234567890, + "real": -9876.543210, + "e": 0.123456789e-12, + "E": 1.234567890E+34, + "": 23456789012E66, + "zero": 0, + "one": 1, + "space": " ", + "quote": "\"", + "backslash": "\\", + "controls": "\b\f\n\r\t", + "slash": "/ & \/", + "alpha": "abcdefghijklmnopqrstuvwyz", + "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", + "digit": "0123456789", + "0123456789": "digit", + "special": "`1~!@#$%^&*()_+-={':[,]}|;.?", + "hex": "\u0123\u4567\u89AB\uCDEF\uabcd\uef4A", + "true": true, + "false": false, + "null": null, + "array":[ ], + "object":{ }, + "address": "50 St. James Street", + "url": "http://www.JSON.org/", + "comment": "// /* */": " ", + " s p a c e d " :[1,2 , 3 + +, + +4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7], + "jsontext": "{\"object with 1 member\":[\"array with 1 element\"]}", + "quotes": "" \u0022 %22 0x22 034 "", + "\/\\\"\uCAFE\uBABE\uAB98\uFCDE\ubcda\uef4A\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?" +: "A key can be any string" + }, + 0.5 ,98.6 +, +99.44 +, + +1066, +1e1, +0.1e1, +1e-1, +1e00,2e+00,2e-00 +,"rosebud"] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/pass2.json b/lib/jsoncpp/test/jsonchecker/pass2.json new file mode 100644 index 0000000000..d3c63c7ad8 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/pass2.json @@ -0,0 +1 @@ +[[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]] \ No newline at end of file diff --git a/lib/jsoncpp/test/jsonchecker/pass3.json b/lib/jsoncpp/test/jsonchecker/pass3.json new file mode 100644 index 0000000000..4528d51f1a --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/pass3.json @@ -0,0 +1,6 @@ +{ + "JSON Test Pattern pass3": { + "The outermost value": "must be an object or array.", + "In this test": "It is an object." + } +} diff --git a/lib/jsoncpp/test/jsonchecker/readme.txt b/lib/jsoncpp/test/jsonchecker/readme.txt new file mode 100644 index 0000000000..321d89d998 --- /dev/null +++ b/lib/jsoncpp/test/jsonchecker/readme.txt @@ -0,0 +1,3 @@ +Test suite from http://json.org/JSON_checker/. + +If the JSON_checker is working correctly, it must accept all of the pass*.json files and reject all of the fail*.json files. diff --git a/lib/jsoncpp/test/jsontestrunner.py b/lib/jsoncpp/test/jsontestrunner.py new file mode 100644 index 0000000000..504f3db2e7 --- /dev/null +++ b/lib/jsoncpp/test/jsontestrunner.py @@ -0,0 +1,64 @@ +# Simple implementation of a json test runner to run the test against json-py. + +import sys +import os.path +import json +import types + +if len(sys.argv) != 2: + print "Usage: %s input-json-file", sys.argv[0] + sys.exit(3) + +input_path = sys.argv[1] +base_path = os.path.splitext(input_path)[0] +actual_path = base_path + '.actual' +rewrite_path = base_path + '.rewrite' +rewrite_actual_path = base_path + '.actual-rewrite' + +def valueTreeToString( fout, value, path = '.' ): + ty = type(value) + if ty is types.DictType: + fout.write( '%s={}\n' % path ) + suffix = path[-1] != '.' and '.' or '' + names = value.keys() + names.sort() + for name in names: + valueTreeToString( fout, value[name], path + suffix + name ) + elif ty is types.ListType: + fout.write( '%s=[]\n' % path ) + for index, childValue in zip( xrange(0,len(value)), value ): + valueTreeToString( fout, childValue, path + '[%d]' % index ) + elif ty is types.StringType: + fout.write( '%s="%s"\n' % (path,value) ) + elif ty is types.IntType: + fout.write( '%s=%d\n' % (path,value) ) + elif ty is types.FloatType: + fout.write( '%s=%.16g\n' % (path,value) ) + elif value is True: + fout.write( '%s=true\n' % path ) + elif value is False: + fout.write( '%s=false\n' % path ) + elif value is None: + fout.write( '%s=null\n' % path ) + else: + assert False and "Unexpected value type" + +def parseAndSaveValueTree( input, actual_path ): + root = json.loads( input ) + fout = file( actual_path, 'wt' ) + valueTreeToString( fout, root ) + fout.close() + return root + +def rewriteValueTree( value, rewrite_path ): + rewrite = json.dumps( value ) + #rewrite = rewrite[1:-1] # Somehow the string is quoted ! jsonpy bug ? + file( rewrite_path, 'wt').write( rewrite + '\n' ) + return rewrite + +input = file( input_path, 'rt' ).read() +root = parseAndSaveValueTree( input, actual_path ) +rewrite = rewriteValueTree( json.write( root ), rewrite_path ) +rewrite_root = parseAndSaveValueTree( rewrite, rewrite_actual_path ) + +sys.exit( 0 ) diff --git a/lib/jsoncpp/test/runjsontests.py b/lib/jsoncpp/test/runjsontests.py new file mode 100644 index 0000000000..e05bd52b48 --- /dev/null +++ b/lib/jsoncpp/test/runjsontests.py @@ -0,0 +1,132 @@ +import sys +import os +import os.path +from glob import glob +import optparse + +RUN_JSONCHECKER = False +VALGRIND_CMD = 'valgrind --tool=memcheck --leak-check=yes --undef-value-errors=yes ' + +def compareOutputs( expected, actual, message ): + expected = expected.strip().replace('\r','').split('\n') + actual = actual.strip().replace('\r','').split('\n') + diff_line = 0 + max_line_to_compare = min( len(expected), len(actual) ) + for index in xrange(0,max_line_to_compare): + if expected[index].strip() != actual[index].strip(): + diff_line = index + 1 + break + if diff_line == 0 and len(expected) != len(actual): + diff_line = max_line_to_compare+1 + if diff_line == 0: + return None + def safeGetLine( lines, index ): + index += -1 + if index >= len(lines): + return '' + return lines[index].strip() + return """ Difference in %s at line %d: + Expected: '%s' + Actual: '%s' +""" % (message, diff_line, + safeGetLine(expected,diff_line), + safeGetLine(actual,diff_line) ) + +def safeReadFile( path ): + try: + return file( path, 'rt' ).read() + except IOError, e: + return '' % (path,e) + +def runAllTests( jsontest_executable_path, input_dir = None, + use_valgrind=False ): + if not input_dir: + input_dir = os.path.join( os.getcwd(), 'data' ) + tests = glob( os.path.join( input_dir, '*.json' ) ) + if RUN_JSONCHECKER: + test_jsonchecker = glob( os.path.join( input_dir, 'jsonchecker', '*.json' ) ) + else: + test_jsonchecker = [] + failed_tests = [] + valgrind_path = use_valgrind and VALGRIND_CMD or '' + for input_path in tests + test_jsonchecker: + is_json_checker_test = input_path in test_jsonchecker + print 'TESTING:', input_path, + options = is_json_checker_test and '--json-checker' or '' + pipe = os.popen( "%s%s %s %s" % ( + valgrind_path, jsontest_executable_path, options, + input_path) ) + process_output = pipe.read() + status = pipe.close() + if is_json_checker_test: + expect_failure = os.path.basename( input_path ).startswith( 'fail' ) + if expect_failure: + if status is None: + print 'FAILED' + failed_tests.append( (input_path, 'Parsing should have failed:\n%s' % + safeReadFile(input_path)) ) + else: + print 'OK' + else: + if status is not None: + print 'FAILED' + failed_tests.append( (input_path, 'Parsing failed:\n' + process_output) ) + else: + print 'OK' + else: + base_path = os.path.splitext(input_path)[0] + actual_output = safeReadFile( base_path + '.actual' ) + actual_rewrite_output = safeReadFile( base_path + '.actual-rewrite' ) + file(base_path + '.process-output','wt').write( process_output ) + if status: + print 'parsing failed' + failed_tests.append( (input_path, 'Parsing failed:\n' + process_output) ) + else: + expected_output_path = os.path.splitext(input_path)[0] + '.expected' + expected_output = file( expected_output_path, 'rt' ).read() + detail = ( compareOutputs( expected_output, actual_output, 'input' ) + or compareOutputs( expected_output, actual_rewrite_output, 'rewrite' ) ) + if detail: + print 'FAILED' + failed_tests.append( (input_path, detail) ) + else: + print 'OK' + + if failed_tests: + print + print 'Failure details:' + for failed_test in failed_tests: + print '* Test', failed_test[0] + print failed_test[1] + print + print 'Test results: %d passed, %d failed.' % (len(tests)-len(failed_tests), + len(failed_tests) ) + return 1 + else: + print 'All %d tests passed.' % len(tests) + return 0 + +def main(): + from optparse import OptionParser + parser = OptionParser( usage="%prog [options] [test case directory]" ) + parser.add_option("--valgrind", + action="store_true", dest="valgrind", default=False, + help="run all the tests using valgrind to detect memory leaks") + parser.enable_interspersed_args() + options, args = parser.parse_args() + + if len(args) < 1 or len(args) > 2: + parser.error( 'Must provides at least path to jsontestrunner executable.' ) + sys.exit( 1 ) + + jsontest_executable_path = os.path.normpath( os.path.abspath( args[0] ) ) + if len(args) > 1: + input_path = os.path.normpath( os.path.abspath( args[1] ) ) + else: + input_path = None + status = runAllTests( jsontest_executable_path, input_path, + use_valgrind=options.valgrind ) + sys.exit( status ) + +if __name__ == '__main__': + main() diff --git a/lib/jsoncpp/test/rununittests.py b/lib/jsoncpp/test/rununittests.py new file mode 100644 index 0000000000..366184cfb5 --- /dev/null +++ b/lib/jsoncpp/test/rununittests.py @@ -0,0 +1,73 @@ +import sys +import os +import os.path +import subprocess +from glob import glob +import optparse + +VALGRIND_CMD = 'valgrind --tool=memcheck --leak-check=yes --undef-value-errors=yes' + +class TestProxy(object): + def __init__( self, test_exe_path, use_valgrind=False ): + self.test_exe_path = os.path.normpath( os.path.abspath( test_exe_path ) ) + self.use_valgrind = use_valgrind + + def run( self, options ): + if self.use_valgrind: + cmd = VALGRIND_CMD.split() + else: + cmd = [] + cmd.extend( [self.test_exe_path, '--test-auto'] + options ) + process = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT ) + stdout = process.communicate()[0] + if process.returncode: + return False, stdout + return True, stdout + +def runAllTests( exe_path, use_valgrind=False ): + test_proxy = TestProxy( exe_path, use_valgrind=use_valgrind ) + status, test_names = test_proxy.run( ['--list-tests'] ) + if not status: + print >> sys.stderr, "Failed to obtain unit tests list:\n" + test_names + return 1 + test_names = [name.strip() for name in test_names.strip().split('\n')] + failures = [] + for name in test_names: + print 'TESTING %s:' % name, + succeed, result = test_proxy.run( ['--test', name] ) + if succeed: + print 'OK' + else: + failures.append( (name, result) ) + print 'FAILED' + failed_count = len(failures) + pass_count = len(test_names) - failed_count + if failed_count: + print + for name, result in failures: + print result + print '%d/%d tests passed (%d failure(s))' % ( + pass_count, len(test_names), failed_count) + return 1 + else: + print 'All %d tests passed' % len(test_names) + return 0 + +def main(): + from optparse import OptionParser + parser = OptionParser( usage="%prog [options] " ) + parser.add_option("--valgrind", + action="store_true", dest="valgrind", default=False, + help="run all the tests using valgrind to detect memory leaks") + parser.enable_interspersed_args() + options, args = parser.parse_args() + + if len(args) != 1: + parser.error( 'Must provides at least path to test_lib_json executable.' ) + sys.exit( 1 ) + + exit_code = runAllTests( args[0], use_valgrind=options.valgrind ) + sys.exit( exit_code ) + +if __name__ == '__main__': + main() -- cgit v1.2.3