8203688: [testbug] Nashorn test test/nashorn/script/nosecurity/treeapi/diagnostic.js fails
Summary: Updating the expected output for diagnostic.js to its correct value
Reviewed-by: jlaskey, sundar
Contributed-by: thejasvi.v.voniadka@oracle.com
[
{
"fileName": "test.js",
"code": "ident (19, 1)",
"columnNumber": "19",
"kind": "ERROR",
"position": "19",
"message": "test.js:1:19 Property \"k\" already defined\n var a = { k:1, k:2 }\n ^",
"lineNumber": "1"
}
]
[
{
"fileName": "test.js",
"code": "with (19, 4)",
"columnNumber": "4",
"kind": "ERROR",
"position": "19",
"message": "test.js:2:4 \"with\" statement cannot be used in strict mode\n with(x) {}\n ^",
"lineNumber": "2"
}
]
[
{
"fileName": "test.js",
"code": "ident (8, 4)",
"columnNumber": "8",
"kind": "ERROR",
"position": "8",
"message": "test.js:1:8 \"eval\" cannot be used as variable name in strict mode\n var eval = \"test value\";\n ^",
"lineNumber": "1"
}
]
[
{
"fileName": "test.js",
"code": "ident (8, 9)",
"columnNumber": "8",
"kind": "ERROR",
"position": "8",
"message": "test.js:1:8 \"arguments\" cannot be used as variable name in strict mode\n var arguments = \"test value\";\n ^",
"lineNumber": "1"
}
]
[
{
"fileName": "test.js",
"code": "function (23, 8)",
"columnNumber": "6",
"kind": "ERROR",
"position": "23",
"message": "test.js:2:6 In strict mode, function declarations can only occur at program or function body level. You should use a function expression here instead.\n \t\tfunction a () {}\n \t\t^",
"lineNumber": "2"
}
]
[
{
"fileName": "test.js",
"code": "ident (26, 3)",
"columnNumber": "26",
"kind": "ERROR",
"position": "26",
"message": "test.js:1:26 Property \"x\" already defined\n var a = { get x() {}, get x() {}};\n ^",
"lineNumber": "1"
},
{
"fileName": "test.js",
"code": "ident (65, 3)",
"columnNumber": "26",
"kind": "ERROR",
"position": "65",
"message": "test.js:2:26 Property \"x\" already defined\n var a = { set x() {}, set x() {}};\n ^",
"lineNumber": "2"
}
]
[
{
"fileName": "test.js",
"code": "; (15, 1)",
"columnNumber": "15",
"kind": "ERROR",
"position": "15",
"message": "test.js:1:15 Unclosed group near index 9\n([a-z])+(\n /([a-z])+(/;\n ^",
"lineNumber": "1"
},
{
"fileName": "test.js",
"code": "; (32, 1)",
"columnNumber": "15",
"kind": "ERROR",
"position": "32",
"message": "test.js:2:15 Unsupported RegExp flag: h\n /([a-z])+/h;\n ^",
"lineNumber": "2"
}
]