Debian Codegraph @

js/src/tests/test262/language/eval-code/direct/parse-failure-2.js

raw
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 info: If the parse fails, throw a SyntaxError exception (but see also clause 16)
6 es5id: 15.1.2.1_A2_T2
7 description: Checking if execution of "eval("x = 1; x\u000A++")" fails
8 ---*/
9
10 var x;
11 assert.throws(SyntaxError, function() {
12 eval("x = 1; x\u000A++");
13 });
14
15 reportCompare(0, 0);