Home
last modified time | relevance | path

Searched refs:SyntaxError (Results 1 – 25 of 184) sorted by relevance

12345678

/external/chromium_org/v8/test/mjsunit/harmony/
Dblock-let-declaration.js67 TestLocalThrows("if (true) let x;", SyntaxError);
68 TestLocalThrows("if (true) {} else let x;", SyntaxError);
69 TestLocalThrows("do let x; while (false)", SyntaxError);
70 TestLocalThrows("while (false) let x;", SyntaxError);
71 TestLocalThrows("label: let x;", SyntaxError);
72 TestLocalThrows("for (;false;) let x;", SyntaxError);
73 TestLocalThrows("switch (true) { case true: let x; }", SyntaxError);
74 TestLocalThrows("switch (true) { default: let x; }", SyntaxError);
77 TestLocalThrows("if (true) const x = 1;", SyntaxError);
78 TestLocalThrows("if (true) {} else const x = 1;", SyntaxError);
[all …]
Diteration-syntax.js38 assertThrows("function f() { for (x of) { } }", SyntaxError);
39 assertThrows("function f() { for (x of y z) { } }", SyntaxError);
40 assertThrows("function f() { for (x of y;) { } }", SyntaxError);
42 assertThrows("function f() { for (var x of) { } }", SyntaxError);
43 assertThrows("function f() { for (var x of y z) { } }", SyntaxError);
44 assertThrows("function f() { for (var x of y;) { } }", SyntaxError);
46 assertThrows("function f() { for (let x of) { } }", SyntaxError);
47 assertThrows("function f() { for (let x of y z) { } }", SyntaxError);
48 assertThrows("function f() { for (let x of y;) { } }", SyntaxError);
50 assertThrows("function f() { for (of y) { } }", SyntaxError);
[all …]
Dmodule-parsing.js172 assertThrows("export x;", SyntaxError); // It's using eval, so should throw.
173 assertThrows("export let x;", SyntaxError);
174 assertThrows("import x from M;", SyntaxError);
175 assertThrows("module M {};", SyntaxError);
177 assertThrows("{ export x; }", SyntaxError);
178 assertThrows("{ export let x; }", SyntaxError);
179 assertThrows("{ import x from M; }", SyntaxError);
180 assertThrows("{ module M {}; }", SyntaxError);
182 assertThrows("function f() { export x; }", SyntaxError);
183 assertThrows("function f() { export let x; }", SyntaxError);
[all …]
Dgenerators-parsing.js69 SyntaxError);
82 assertThrows("function f() { \"use strict\"; yield: 1 }", SyntaxError)
83 assertThrows("function* g() { yield: 1 }", SyntaxError)
90 assertThrows("function* g() { yield; }", SyntaxError);
93 assertThrows("function* g() { yield = 10; }", SyntaxError);
97 assertThrows("function* g() { yield 3 + yield 4; }", SyntaxError);
100 assertThrows("function f() { \"use strict\"; var yield = 13; }", SyntaxError);
103 assertThrows("function* g() { yield (function yield() {}); }", SyntaxError);
106 assertThrows("function* g(yield) { yield (10); }", SyntaxError);
Dblock-for.js97 assertThrows("function foo() { 'use strict'; for (let in {}) { } }", SyntaxError);
98 assertThrows("function foo() { 'use strict'; for (let x = 3 in {}) { } }", SyntaxError);
99 assertThrows("function foo() { 'use strict'; for (let x, y in {}) { } }", SyntaxError);
100 assertThrows("function foo() { 'use strict'; for (let x = 3, y in {}) { } }", SyntaxError);
101 assertThrows("function foo() { 'use strict'; for (let x, y = 4 in {}) { } }", SyntaxError);
102 assertThrows("function foo() { 'use strict'; for (let x = 3, y = 4 in {}) { } }", SyntaxError);
/external/v8/test/mjsunit/harmony/
Dblock-let-declaration.js67 TestLocalThrows("if (true) let x;", SyntaxError);
68 TestLocalThrows("if (true) {} else let x;", SyntaxError);
69 TestLocalThrows("do let x; while (false)", SyntaxError);
70 TestLocalThrows("while (false) let x;", SyntaxError);
71 TestLocalThrows("label: let x;", SyntaxError);
72 TestLocalThrows("for (;false;) let x;", SyntaxError);
73 TestLocalThrows("switch (true) { case true: let x; }", SyntaxError);
74 TestLocalThrows("switch (true) { default: let x; }", SyntaxError);
77 TestLocalThrows("if (true) const x = 1;", SyntaxError);
78 TestLocalThrows("if (true) {} else const x = 1;", SyntaxError);
[all …]
Dblock-for.js97 assertThrows("function foo() { 'use strict'; for (let in {}) { } }", SyntaxError);
98 assertThrows("function foo() { 'use strict'; for (let x = 3 in {}) { } }", SyntaxError);
99 assertThrows("function foo() { 'use strict'; for (let x, y in {}) { } }", SyntaxError);
100 assertThrows("function foo() { 'use strict'; for (let x = 3, y in {}) { } }", SyntaxError);
101 assertThrows("function foo() { 'use strict'; for (let x, y = 4 in {}) { } }", SyntaxError);
102 assertThrows("function foo() { 'use strict'; for (let x = 3, y = 4 in {}) { } }", SyntaxError);
/external/v8/test/mjsunit/
Dstrict-mode.js61 }, SyntaxError);
71 assertThrows("function foo (x) 'use strict'; {}", SyntaxError);
87 with({}) {}', SyntaxError);
90 CheckStrictMode("with({}) {}", SyntaxError);
93 CheckStrictMode("function eval() {}", SyntaxError);
96 CheckStrictMode("function arguments() {}", SyntaxError);
99 CheckStrictMode("function foo(a, b, eval, c, d) {}", SyntaxError);
102 CheckStrictMode("function foo(a, b, arguments, c, d) {}", SyntaxError);
105 CheckStrictMode("var o = { set foo(eval) {} }", SyntaxError);
108 CheckStrictMode("var o = { set foo(arguments) {} }", SyntaxError);
[all …]
Dkeywords-and-reserved_words.js80 assertThrows("var " + word + " = 1;", SyntaxError);
82 assertThrows("typeof (" + word + ");", SyntaxError);
96 assertThrows("function " + word + " () { }", SyntaxError);
97 assertThrows("function foo (" + word + ") {}", SyntaxError);
98 assertThrows("function foo (a, " + word + ") { }", SyntaxError);
99 assertThrows("function foo (" + word + ", a) { }", SyntaxError);
100 assertThrows("function foo (a, " + word + ", b) { }", SyntaxError);
101 assertThrows("var foo = function (" + word + ") { }", SyntaxError);
104 assertThrows("var x = { set foo(" + word + ") { } };", SyntaxError);
Dstrict-mode-eval.js50 assertInstanceof(e, SyntaxError);
60 assertInstanceof(e, SyntaxError);
70 assertInstanceof(e, SyntaxError);
80 assertInstanceof(e, SyntaxError);
/external/chromium_org/v8/test/mjsunit/
Dstrict-mode.js61 }, SyntaxError);
71 assertThrows("function foo (x) 'use strict'; {}", SyntaxError);
87 with({}) {}', SyntaxError);
90 CheckStrictMode("with({}) {}", SyntaxError);
93 CheckStrictMode("function eval() {}", SyntaxError);
96 CheckStrictMode("function arguments() {}", SyntaxError);
99 CheckStrictMode("function foo(a, b, eval, c, d) {}", SyntaxError);
102 CheckStrictMode("function foo(a, b, arguments, c, d) {}", SyntaxError);
105 CheckStrictMode("var o = { set foo(eval) {} }", SyntaxError);
108 CheckStrictMode("var o = { set foo(arguments) {} }", SyntaxError);
[all …]
Dkeywords-and-reserved_words.js80 assertThrows("var " + word + " = 1;", SyntaxError);
82 assertThrows("typeof (" + word + ");", SyntaxError);
96 assertThrows("function " + word + " () { }", SyntaxError);
97 assertThrows("function foo (" + word + ") {}", SyntaxError);
98 assertThrows("function foo (a, " + word + ") { }", SyntaxError);
99 assertThrows("function foo (" + word + ", a) { }", SyntaxError);
100 assertThrows("function foo (a, " + word + ", b) { }", SyntaxError);
101 assertThrows("var foo = function (" + word + ") { }", SyntaxError);
104 assertThrows("var x = { set foo(" + word + ") { } };", SyntaxError);
Dstrict-mode-eval.js50 assertInstanceof(e, SyntaxError);
60 assertInstanceof(e, SyntaxError);
70 assertInstanceof(e, SyntaxError);
80 assertInstanceof(e, SyntaxError);
/external/chromium_org/third_party/tlslite/tlslite/utils/
Dxmltools.py29 raise SyntaxError(str(e))
44 raise SyntaxError("Empty XML elements not allowed")
55 raise SyntaxError("Bad whitespace under '%s'" % element.tagName)
57 raise SyntaxError("Unexpected node type in XML document")
68 raise SyntaxError("Bad whitespace under '%s'" % element.tagName)
70 raise SyntaxError("Bad whitespace under '%s'" % element.tagName)
75 raise SyntaxError("Unexpected node type in XML document")
80 raise SyntaxError("Missing element: '%s'" % name)
86 raise SyntaxError("Wrong element name: should be '%s', is '%s'" % (name, element.tagName))
90 raise SyntaxError("Wrong node type in getChild()")
[all …]
/external/chromium_org/v8/test/webkit/fast/js/
Dbasic-strict-mode-expected.txt50 PASS Function('"use strict"; with({});') threw exception SyntaxError: Strict mode code may not incl…
56 PASS (function eval(){'use strict';}) threw exception SyntaxError: Function name may not be eval or…
57 PASS (function(){(function eval(){'use strict';})}) threw exception SyntaxError: Function name may …
58 PASS (function (eval){'use strict';}) threw exception SyntaxError: Parameter name eval or arguments…
59 PASS (function(){(function (eval){'use strict';})}) threw exception SyntaxError: Parameter name eva…
60 PASS (function arguments(){'use strict';}) threw exception SyntaxError: Function name may not be ev…
61 PASS (function(){(function arguments(){'use strict';})}) threw exception SyntaxError: Function name…
62 PASS (function (arguments){'use strict';}) threw exception SyntaxError: Parameter name eval or argu…
63 PASS (function(){(function (arguments){'use strict';})}) threw exception SyntaxError: Parameter nam…
64 PASS (function (){'use strict'; var eval;}) threw exception SyntaxError: Variable name may not be e…
[all …]
Dnumeric-escapes-in-string-literals-expected.txt32 PASS eval(stringLiteral) threw exception SyntaxError: Octal literals are not allowed in strict mode…
34 PASS eval(stringLiteral) threw exception SyntaxError: Octal literals are not allowed in strict mode…
40 PASS eval(stringLiteral) threw exception SyntaxError: Octal literals are not allowed in strict mode…
42 PASS eval(stringLiteral) threw exception SyntaxError: Octal literals are not allowed in strict mode…
44 PASS eval(stringLiteral) threw exception SyntaxError: Octal literals are not allowed in strict mode…
46 PASS eval(stringLiteral) threw exception SyntaxError: Octal literals are not allowed in strict mode…
48 PASS eval(stringLiteral) threw exception SyntaxError: Octal literals are not allowed in strict mode…
50 PASS eval(stringLiteral) threw exception SyntaxError: Octal literals are not allowed in strict mode…
52 PASS eval(stringLiteral) threw exception SyntaxError: Octal literals are not allowed in strict mode…
54 PASS eval(stringLiteral) threw exception SyntaxError: Octal literals are not allowed in strict mode…
[all …]
/external/chromium_org/v8/test/mjsunit/regress/
Dregress-1620.js50 assertThrows("/x/g\\uim", SyntaxError);
51 assertThrows("/x/g\\u2im", SyntaxError);
52 assertThrows("/x/g\\u22im", SyntaxError);
53 assertThrows("/x/g\\u222im", SyntaxError);
54 assertThrows("/x/g\\\\u2222im", SyntaxError);
Dregress-1924.js33 assertThrows("a: break a a", SyntaxError)
34 assertThrows("a: break a 1", SyntaxError)
35 assertThrows("a: break a ''", SyntaxError)
36 assertThrows("a: break a var b", SyntaxError)
37 assertThrows("a: break a {}", SyntaxError)
Dregress-2470.js29 assertThrows('Function("/*", "*/){");', SyntaxError);
32 assertThrows('Function("});(function(){");', SyntaxError);
37 assertThrows('Function("a", "/*", "*/", "/**/");', SyntaxError);
42 assertThrows('Function("a", "//", "//")', SyntaxError);
/external/v8/test/mjsunit/regress/
Dregress-1620.js50 assertThrows("/x/g\\uim", SyntaxError);
51 assertThrows("/x/g\\u2im", SyntaxError);
52 assertThrows("/x/g\\u22im", SyntaxError);
53 assertThrows("/x/g\\u222im", SyntaxError);
54 assertThrows("/x/g\\\\u2222im", SyntaxError);
Dregress-1924.js33 assertThrows("a: break a a", SyntaxError)
34 assertThrows("a: break a 1", SyntaxError)
35 assertThrows("a: break a ''", SyntaxError)
36 assertThrows("a: break a var b", SyntaxError)
37 assertThrows("a: break a {}", SyntaxError)
/external/chromium_org/v8/test/webkit/
Dobject-literal-syntax-expected.txt29 PASS ({a:1, get a(){}}) threw exception SyntaxError: Object literal may not have data and accessor …
30 PASS ({a:1, set a(){}}) threw exception SyntaxError: Object literal may not have data and accessor …
31 PASS ({get a(){}, a:1}) threw exception SyntaxError: Object literal may not have data and accessor …
32 PASS ({set a(){}, a:1}) threw exception SyntaxError: Object literal may not have data and accessor …
33 PASS ({get a(){}, get a(){}}) threw exception SyntaxError: Object literal may not have multiple get…
34 PASS ({set a(){}, set a(){}}) threw exception SyntaxError: Object literal may not have multiple get…
35 PASS ({set a(){}, get a(){}, set a(){}}) threw exception SyntaxError: Object literal may not have m…
36 PASS (function(){({a:1, get a(){}})}) threw exception SyntaxError: Object literal may not have data…
37 PASS (function(){({a:1, set a(){}})}) threw exception SyntaxError: Object literal may not have data…
38 PASS (function(){({get a(){}, a:1})}) threw exception SyntaxError: Object literal may not have data…
[all …]
Djs-continue-break-restrictions-expected.txt30 PASS if (0) { L:{ break; } } threw exception SyntaxError: Illegal break statement.
31 PASS if (0) { L:{ continue L; } } threw exception SyntaxError: Undefined label 'L'.
32 PASS if (0) { L:{ continue; } } threw exception SyntaxError: Illegal continue statement.
33 PASS if (0) { switch (1) { case 1: continue; } } threw exception SyntaxError: Illegal continue stat…
35 PASS if (0) { A:L:{ break; } } threw exception SyntaxError: Illegal break statement.
36 PASS if (0) { A:L:{ continue L; } } threw exception SyntaxError: Undefined label 'L'.
37 PASS if (0) { A:L:{ continue; } } threw exception SyntaxError: Illegal continue statement.
39 PASS if (0) { L:A:{ break; } } threw exception SyntaxError: Illegal break statement.
40 PASS if (0) { L:A:{ continue L; } } threw exception SyntaxError: Undefined label 'L'.
41 PASS if (0) { L:A:{ continue; } } threw exception SyntaxError: Illegal continue statement.
[all …]
/external/chromium_org/base/test/expectations/
Dparser.cc62 return SyntaxError("Invalid start of comment"); in ParseComment()
78 return SyntaxError("Expected '[' for start of modifiers"); in BeginModifiers()
94 return SyntaxError("Invalid modifier list"); in SaveModifier()
115 return SyntaxError("Expected ']' for end of modifiers list"); in EndModifiers()
127 return SyntaxError("Invalid test name"); in SaveTestName()
135 return SyntaxError("Expected '=' for expectation result"); in ParseExpectation()
167 return SyntaxError("Unexpected start of comment"); in ExtractString()
191 Parser::StateFunc Parser::SyntaxError(const std::string& message) { in SyntaxError() function in test_expectations::Parser
/external/v8/test/es5conform/
Des5conform.status111 # SyntaxError.prototype does not have message property.
228 # Invalid test case. Test expects ReferenceError instead of SyntaxError.
233 # Invalid test case. Test expects ReferenceError instead of SyntaxError.
238 # Invalid test case. Test expects ReferenceError instead of SyntaxError.
243 # Invalid test case. SyntaxError should be expected instead of EvalError.
246 # Invalid test case. SyntaxError should be expected instead of EvalError.
250 # Invalid test case. SyntaxError should be expected instead of EvalError.
253 # Invalid test case. SyntaxError should be expected instead of EvalError.
256 # Invalid test case. SyntaxError should be expected instead of EvalError.
259 # Invalid test case. SyntaxError should be expected instead of EvalError.
[all …]

12345678