{ "testCollection": { "name": "12.1", "numTests": 7, "tests": [ { "id": "12.1-1", "path": "TestCases/chapter12/12.1/12.1-1.js", "description": "12.1 - block '{ StatementListopt };' is not allowed: try-catch", "test": "assertTrue((function testcase() {\n try {\n eval(\"try{};catch(){}\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n" }, { "id": "12.1-2", "path": "TestCases/chapter12/12.1/12.1-2.js", "description": "12.1 - block '{ StatementListopt };' is not allowed: try-catch-finally", "test": "assertTrue((function testcase() {\n try {\n eval(\"try{};catch{};finally{}\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n" }, { "id": "12.1-3", "path": "TestCases/chapter12/12.1/12.1-3.js", "description": "12.1 - block '{ StatementListopt };' is not allowed: try-finally", "test": "assertTrue((function testcase() {\n try {\n eval(\"try{};finally{}\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n" }, { "id": "12.1-4", "path": "TestCases/chapter12/12.1/12.1-4.js", "description": "12.1 - block '{ StatementListopt };' is not allowed: if-else", "test": "assertTrue((function testcase() {\n try {\n eval(\"if{};else{}\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n" }, { "id": "12.1-5", "path": "TestCases/chapter12/12.1/12.1-5.js", "description": "12.1 - block '{ StatementListopt };' is not allowed: if-else-if", "test": "assertTrue((function testcase() {\n try {\n eval(\"if{};else if{}\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n" }, { "id": "12.1-6", "path": "TestCases/chapter12/12.1/12.1-6.js", "description": "12.1 - block '{ StatementListopt };' is not allowed: if-else-if-else", "test": "assertTrue((function testcase() {\n try {\n eval(\"if{};else if{};else{}\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n" }, { "id": "12.1-7", "path": "TestCases/chapter12/12.1/12.1-7.js", "description": "12.1 - block '{ StatementListopt };' is not allowed: do-while", "test": "assertTrue((function testcase() {\n try {\n eval(\"do{};while()\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n" } ] } }