Added autotest test suite
This commit is contained in:
24
test/autotest/test_suite/application.e
Normal file
24
test/autotest/test_suite/application.e
Normal file
@@ -0,0 +1,24 @@
|
||||
note
|
||||
description : "test_suite application root class"
|
||||
date : "$Date$"
|
||||
revision : "$Revision$"
|
||||
|
||||
class
|
||||
APPLICATION
|
||||
|
||||
inherit
|
||||
ARGUMENTS
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make
|
||||
-- Run application.
|
||||
do
|
||||
--| Add your code here
|
||||
print ("Hello Eiffel World!%N")
|
||||
end
|
||||
|
||||
end
|
||||
1
test/autotest/test_suite/fail1.json
Normal file
1
test/autotest/test_suite/fail1.json
Normal file
@@ -0,0 +1 @@
|
||||
"A JSON payload should be an object or array, not a string."
|
||||
1
test/autotest/test_suite/fail10.json
Normal file
1
test/autotest/test_suite/fail10.json
Normal file
@@ -0,0 +1 @@
|
||||
{"Extra value after close": true} "misplaced quoted value"
|
||||
1
test/autotest/test_suite/fail11.json
Normal file
1
test/autotest/test_suite/fail11.json
Normal file
@@ -0,0 +1 @@
|
||||
{"Illegal expression": 1 + 2}
|
||||
1
test/autotest/test_suite/fail12.json
Normal file
1
test/autotest/test_suite/fail12.json
Normal file
@@ -0,0 +1 @@
|
||||
{"Illegal invocation": alert()}
|
||||
1
test/autotest/test_suite/fail13.json
Normal file
1
test/autotest/test_suite/fail13.json
Normal file
@@ -0,0 +1 @@
|
||||
{"Numbers cannot have leading zeroes": 013}
|
||||
1
test/autotest/test_suite/fail14.json
Normal file
1
test/autotest/test_suite/fail14.json
Normal file
@@ -0,0 +1 @@
|
||||
{"Numbers cannot be hex": 0x14}
|
||||
1
test/autotest/test_suite/fail15.json
Normal file
1
test/autotest/test_suite/fail15.json
Normal file
@@ -0,0 +1 @@
|
||||
["Illegal backslash escape: \x15"]
|
||||
1
test/autotest/test_suite/fail16.json
Normal file
1
test/autotest/test_suite/fail16.json
Normal file
@@ -0,0 +1 @@
|
||||
[\naked]
|
||||
1
test/autotest/test_suite/fail17.json
Normal file
1
test/autotest/test_suite/fail17.json
Normal file
@@ -0,0 +1 @@
|
||||
["Illegal backslash escape: \017"]
|
||||
1
test/autotest/test_suite/fail18.json
Normal file
1
test/autotest/test_suite/fail18.json
Normal file
@@ -0,0 +1 @@
|
||||
[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]
|
||||
1
test/autotest/test_suite/fail19.json
Normal file
1
test/autotest/test_suite/fail19.json
Normal file
@@ -0,0 +1 @@
|
||||
{"Missing colon" null}
|
||||
1
test/autotest/test_suite/fail2.json
Normal file
1
test/autotest/test_suite/fail2.json
Normal file
@@ -0,0 +1 @@
|
||||
["Unclosed array"
|
||||
1
test/autotest/test_suite/fail20.json
Normal file
1
test/autotest/test_suite/fail20.json
Normal file
@@ -0,0 +1 @@
|
||||
{"Double colon":: null}
|
||||
1
test/autotest/test_suite/fail21.json
Normal file
1
test/autotest/test_suite/fail21.json
Normal file
@@ -0,0 +1 @@
|
||||
{"Comma instead of colon", null}
|
||||
1
test/autotest/test_suite/fail22.json
Normal file
1
test/autotest/test_suite/fail22.json
Normal file
@@ -0,0 +1 @@
|
||||
["Colon instead of comma": false]
|
||||
1
test/autotest/test_suite/fail23.json
Normal file
1
test/autotest/test_suite/fail23.json
Normal file
@@ -0,0 +1 @@
|
||||
["Bad value", truth]
|
||||
1
test/autotest/test_suite/fail24.json
Normal file
1
test/autotest/test_suite/fail24.json
Normal file
@@ -0,0 +1 @@
|
||||
['single quote']
|
||||
1
test/autotest/test_suite/fail25.json
Normal file
1
test/autotest/test_suite/fail25.json
Normal file
@@ -0,0 +1 @@
|
||||
[" tab character in string "]
|
||||
1
test/autotest/test_suite/fail26.json
Normal file
1
test/autotest/test_suite/fail26.json
Normal file
@@ -0,0 +1 @@
|
||||
["tab\ character\ in\ string\ "]
|
||||
2
test/autotest/test_suite/fail27.json
Normal file
2
test/autotest/test_suite/fail27.json
Normal file
@@ -0,0 +1,2 @@
|
||||
["line
|
||||
break"]
|
||||
2
test/autotest/test_suite/fail28.json
Normal file
2
test/autotest/test_suite/fail28.json
Normal file
@@ -0,0 +1,2 @@
|
||||
["line\
|
||||
break"]
|
||||
1
test/autotest/test_suite/fail29.json
Normal file
1
test/autotest/test_suite/fail29.json
Normal file
@@ -0,0 +1 @@
|
||||
[0e]
|
||||
1
test/autotest/test_suite/fail3.json
Normal file
1
test/autotest/test_suite/fail3.json
Normal file
@@ -0,0 +1 @@
|
||||
{unquoted_key: "keys must be quoted"}
|
||||
1
test/autotest/test_suite/fail30.json
Normal file
1
test/autotest/test_suite/fail30.json
Normal file
@@ -0,0 +1 @@
|
||||
[0e+]
|
||||
1
test/autotest/test_suite/fail31.json
Normal file
1
test/autotest/test_suite/fail31.json
Normal file
@@ -0,0 +1 @@
|
||||
[0e+-1]
|
||||
1
test/autotest/test_suite/fail32.json
Normal file
1
test/autotest/test_suite/fail32.json
Normal file
@@ -0,0 +1 @@
|
||||
{"Comma instead if closing brace": true,
|
||||
1
test/autotest/test_suite/fail33.json
Normal file
1
test/autotest/test_suite/fail33.json
Normal file
@@ -0,0 +1 @@
|
||||
["mismatch"}
|
||||
1
test/autotest/test_suite/fail4.json
Normal file
1
test/autotest/test_suite/fail4.json
Normal file
@@ -0,0 +1 @@
|
||||
["extra comma",]
|
||||
1
test/autotest/test_suite/fail5.json
Normal file
1
test/autotest/test_suite/fail5.json
Normal file
@@ -0,0 +1 @@
|
||||
["double extra comma",,]
|
||||
1
test/autotest/test_suite/fail6.json
Normal file
1
test/autotest/test_suite/fail6.json
Normal file
@@ -0,0 +1 @@
|
||||
[ , "<-- missing value"]
|
||||
1
test/autotest/test_suite/fail7.json
Normal file
1
test/autotest/test_suite/fail7.json
Normal file
@@ -0,0 +1 @@
|
||||
["Comma after the close"],
|
||||
1
test/autotest/test_suite/fail8.json
Normal file
1
test/autotest/test_suite/fail8.json
Normal file
@@ -0,0 +1 @@
|
||||
["Extra close"]]
|
||||
1
test/autotest/test_suite/fail9.json
Normal file
1
test/autotest/test_suite/fail9.json
Normal file
@@ -0,0 +1 @@
|
||||
{"Extra comma": true,}
|
||||
11
test/autotest/test_suite/json_menu_example.txt
Normal file
11
test/autotest/test_suite/json_menu_example.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
{"menu": {
|
||||
"id": "file",
|
||||
"value": "File",
|
||||
"popup": {
|
||||
"menuitem": [
|
||||
{"value": "New", "onclick": "CreateNewDoc()"},
|
||||
{"value": "Open", "onclick": "OpenDoc()"},
|
||||
{"value": "Close", "onclick": "CloseDoc()"}
|
||||
]
|
||||
}
|
||||
}}
|
||||
58
test/autotest/test_suite/pass1.json
Normal file
58
test/autotest/test_suite/pass1.json
Normal file
@@ -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"]
|
||||
1
test/autotest/test_suite/pass2.json
Normal file
1
test/autotest/test_suite/pass2.json
Normal file
@@ -0,0 +1 @@
|
||||
[[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]]
|
||||
6
test/autotest/test_suite/pass3.json
Normal file
6
test/autotest/test_suite/pass3.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"JSON Test Pattern pass3": {
|
||||
"The outermost value": "must be an object or array.",
|
||||
"In this test": "It is an object."
|
||||
}
|
||||
}
|
||||
374
test/autotest/test_suite/test_json_suite.e
Normal file
374
test/autotest/test_suite/test_json_suite.e
Normal file
@@ -0,0 +1,374 @@
|
||||
note
|
||||
description: "[
|
||||
Eiffel tests that can be executed by testing tool.
|
||||
]"
|
||||
author: "EiffelStudio test wizard"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
testing: "type/manual"
|
||||
|
||||
class
|
||||
TEST_JSON_SUITE
|
||||
|
||||
inherit
|
||||
EQA_TEST_SET
|
||||
redefine
|
||||
on_prepare
|
||||
end
|
||||
|
||||
feature {NONE} -- Events
|
||||
|
||||
on_prepare
|
||||
-- <Precursor>
|
||||
do
|
||||
create file_reader
|
||||
end
|
||||
|
||||
|
||||
feature -- Tests Pass
|
||||
|
||||
test_json_pass1 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir + "pass1.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("pass1.json",parse_json.is_parsed = True)
|
||||
end
|
||||
|
||||
test_json_pass2 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"pass2.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("pass2.json",parse_json.is_parsed = True)
|
||||
end
|
||||
|
||||
test_json_pass3 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"pass3.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("pass3.json",parse_json.is_parsed = True)
|
||||
end
|
||||
|
||||
feature -- Tests Failures
|
||||
test_json_fail1 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail1.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail1.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail2 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail2.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail2.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail3 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail3.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail3.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail4 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail4.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail4.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail5 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail5.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail5.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
|
||||
test_json_fail6 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail6.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail6.json",parse_json.is_parsed = False )
|
||||
end
|
||||
|
||||
test_json_fail7 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail7.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail7.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail8 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail8.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail8.json",parse_json.is_parsed = False )
|
||||
end
|
||||
|
||||
|
||||
test_json_fail9 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail9.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail9.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
|
||||
test_json_fail10 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail10.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail10.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail11 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail11.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail11.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail12 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail12.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail12.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail13 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail13.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail13.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail14 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail14.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail14.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail15 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail15.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail15.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail16 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail16.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail16.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail17 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail17.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail17.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail18 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail18.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail18.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail19 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail19.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail19.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail20 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail20.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail20.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail21 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail21.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail21.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
|
||||
test_json_fail22 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail22.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail22.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail23 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail23.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail23.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail24 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail24.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail24.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail25 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail25.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail25.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
|
||||
test_json_fail26 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail26.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail26.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
|
||||
test_json_fail27 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail27.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail27.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
|
||||
test_json_fail28 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail28.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail28.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
|
||||
test_json_fail29 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail29.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail29.json",parse_json.is_parsed = False )
|
||||
end
|
||||
|
||||
|
||||
test_json_fail30 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail30.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail30.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail31 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail31.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail31.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail32 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail32.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail32.json",parse_json.is_parsed = False)
|
||||
end
|
||||
|
||||
test_json_fail33 is
|
||||
--
|
||||
do
|
||||
json_file:=file_reader.read_json_from (test_dir +"fail33.json")
|
||||
create parse_json.make_parser (json_file)
|
||||
json_value := parse_json.parse_json
|
||||
assert ("fail33.json",parse_json.is_parsed = False)
|
||||
end
|
||||
feature -- JSON_FROM_FILE
|
||||
|
||||
json_file:STRING
|
||||
parse_json:JSON_PARSER
|
||||
json_object:JSON_OBJECT
|
||||
file_reader:JSON_FILE_READER
|
||||
json_value : JSON_VALUE
|
||||
test_dir : STRING is "/home/jvelilla/work/project/Eiffel/ejson_dev/trunk/test/autotest/test_suite/"
|
||||
|
||||
end
|
||||
|
||||
|
||||
23
test/autotest/test_suite/test_suite.ecf
Normal file
23
test/autotest/test_suite/test_suite.ecf
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-5-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-5-0 http://www.eiffel.com/developers/xml/configuration-1-5-0.xsd" name="test_suite" uuid="EA141B17-6A21-4781-8B5F-E9939BAE968A">
|
||||
<target name="test_suite">
|
||||
<root class="APPLICATION" feature="make"/>
|
||||
<option warning="true">
|
||||
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
|
||||
</option>
|
||||
<precompile name="base_pre" location="$ISE_PRECOMP\base.ecf"/>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
||||
<library name="json" location="..\..\..\library\json.ecf"/>
|
||||
<library name="testing" location="$ISE_LIBRARY\library\testing\testing.ecf"/>
|
||||
<cluster name="test_suite" location=".\" recursive="true">
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
<exclude>/CVS$</exclude>
|
||||
<exclude>/.svn$</exclude>
|
||||
</file_rule>
|
||||
</cluster>
|
||||
</target>
|
||||
<target name="test_suite_dotnet" extends="test_suite">
|
||||
<setting name="msil_generation" value="true"/>
|
||||
</target>
|
||||
</system>
|
||||
Reference in New Issue
Block a user