Home
last modified time | relevance | path

Searched refs:check_syntax_error (Results 1 – 25 of 29) sorted by relevance

12

/third_party/jerryscript/tests/jerry/
Dregression-test-issues-43-183.js15 function check_syntax_error (script) function
28 check_syntax_error ('{');
29 check_syntax_error ('}');
30 check_syntax_error ('[');
31 check_syntax_error (']');
32 check_syntax_error ('(');
33 check_syntax_error (')');
35 check_syntax_error ('function f (');
36 check_syntax_error ('function f ()');
37 check_syntax_error ('function f () {');
[all …]
Dstrict2.js15 function check_syntax_error (script) function
39 check_syntax_error("'use strict'\nimplements")
40 check_syntax_error("'use strict'\n\\u0069mplements")
44 check_syntax_error("'use strict'\nprivate")
45 check_syntax_error("'use strict'\n\\u0070rivate")
49 check_syntax_error("'use strict'\npublic")
50 check_syntax_error("'use strict'\n\\u0070ublic")
54 check_syntax_error("'use strict'\ninterface")
55 check_syntax_error("'use strict'\n\\u0069nterface")
59 check_syntax_error("'use strict'\npackage")
[all …]
Dregression-test-issue-686.js15 function check_syntax_error (code) { function
24 check_syntax_error ("function eval () {'use strict';}");
25 check_syntax_error ("function f (eval) {'use strict';}");
26 check_syntax_error ("function arguments () {'use strict';}");
27 check_syntax_error ("function f (arguments) {'use strict';}");
29 check_syntax_error ("(function eval () {'use strict';})");
30 check_syntax_error ("(function f (eval) {'use strict';})");
31 check_syntax_error ("(function arguments () {'use strict';})");
32 check_syntax_error ("(function f (arguments) {'use strict';})");
Dregression-test-issue-3821.js15 function check_syntax_error (script) function
28 check_syntax_error ('function')
29 check_syntax_error ('function a')
30 check_syntax_error ('function a"')
31 check_syntax_error ('function a"b')
32 check_syntax_error ('function a("b')
33 check_syntax_error ('function a(b, "c')
34 check_syntax_error ('function a(b, c"d')
35 check_syntax_error ('function a(b, c)"d')
Dkeyword.js15 function check_syntax_error(code) function
37 check_syntax_error("d\\u006f {} while (false)")
38 check_syntax_error("\\u0076\\u0061\\u0072 var = 5")
39 check_syntax_error("wit\\u0068 ({}) {}")
40 check_syntax_error("\\u0066alse")
41 check_syntax_error("type\\006ff 3.14")
42 check_syntax_error("try {} fin\\u0061lly {}")
43 check_syntax_error("f\\u0075nction f() {}")
44 check_syntax_error("a instanc\\u0065of b")
Dregression-test-issue-737.js15 function check_syntax_error (s) { function
25 check_syntax_error (
41 check_syntax_error (
56 check_syntax_error (
Dfunc-decl.js27 function check_syntax_error (s) { function
37 check_syntax_error ("'use strict'; function arguments () {}");
38 check_syntax_error ("'use strict'; var l = function arguments () {}");
40 check_syntax_error ("function f__strict_mode_duplicate_parameters (p, p) { 'use strict'; }");
/third_party/jerryscript/tests/jerry/es2015/
Dlet2.js16 function check_syntax_error (code) function
26 check_syntax_error ("let a; let b; let a");
27 check_syntax_error ("let a, b, a");
28 check_syntax_error ("var a; let a;");
29 check_syntax_error ("var a; const a = 3;");
30 check_syntax_error ("let a; var a;");
31 check_syntax_error ("const a = 3; var x, y, a;");
32 check_syntax_error ("const a");
33 check_syntax_error ("{ const a }");
34 check_syntax_error ("const a, b");
[all …]
Dtry-pattern.js16 function check_syntax_error(code) function
26 check_syntax_error("try {} catch() {}");
27 check_syntax_error("try {} catch([a] {}");
28 check_syntax_error("try {} catch([a] = [1]) {}");
29 check_syntax_error("try {} catch({a} = {a:1}) {}");
30 check_syntax_error("try {} catch(a,) {}");
31 check_syntax_error("try {} catch(a) { function a() {} }");
32 check_syntax_error("try {} catch(a) { { function a() {} } function a() {} }");
33 check_syntax_error("try {} catch([a]) { var a }");
34 check_syntax_error("try {} catch([a]) { { var a } }");
[all …]
Dgenerator-initializer.js18 function check_syntax_error (code) function
28 check_syntax_error ("({ * })")
29 check_syntax_error ("({ *, b:4 })")
30 check_syntax_error ("({ *a:4 })")
31 check_syntax_error ("({ *['a']:4 })")
32 check_syntax_error ("({ *a(yield) {} })")
33 check_syntax_error ("({ get *a() {} })")
34 check_syntax_error ("({ set *b(v) {} })")
36 check_syntax_error ("class C { * }")
37 check_syntax_error ("class C { static * }")
[all …]
Dfunction-await1.js17 function check_syntax_error (code) function
27 check_syntax_error("(async function await() {})")
28 check_syntax_error("(async function *await() {})")
29 check_syntax_error("async function f(await) {}")
30 check_syntax_error("(async function f(await) {})")
31 check_syntax_error("async function f(a = await new Promise) {}")
32 check_syntax_error("async function f() { function await() {} }")
33 check_syntax_error("async await => 0");
34 check_syntax_error("async (await) => 0");
35 check_syntax_error("async function f() { await () => 0 }");
[all …]
Dgenerator-yield.js18 function check_syntax_error(str) function
54 check_syntax_error("function *gen(){ yield % yield }");
55 check_syntax_error("function *gen(){ (yield) % yield }");
56 check_syntax_error("function *gen(){ yield % (yield) }");
57 check_syntax_error("function *gen(){ (yield\n1) }");
58 check_syntax_error("function *gen(){ function yield() {} }");
59 check_syntax_error("function *gen(){ (yield)=>1 }");
60 check_syntax_error("function *gen(){ yield => 1 }");
61 check_syntax_error("function *gen(){ yi\\u0065ld 1 }");
Dfunction-async2.js17 function check_syntax_error (code) function
27 check_syntax_error("function async f() {}")
28 check_syntax_error("(a,b) async => 1")
30 check_syntax_error("async * (a,b) => 1")
31 check_syntax_error("({ *async f() {} })")
32 check_syntax_error("class C { async static f() {} }")
33 check_syntax_error("class C { * async f() {} }")
34 check_syntax_error("class C { static * async f() {} }")
Dfunction-if.js16 function check_syntax_error (code) function
26 check_syntax_error ("'use strict'; if (true) function f() {}")
27 check_syntax_error ("'use strict'; if (true) ; else function f() {}")
28 check_syntax_error ("'use strict'; a: function f() {}")
29 check_syntax_error ("if (true) async function f() {}")
30 check_syntax_error ("if (true) ; else async function f() {}")
31 check_syntax_error ("if (true) a: function f() {}")
32 check_syntax_error ("if (true) ; else a: function f() {}")
Dlet13.js19 function check_syntax_error (code) { function
39 check_syntax_error("let let = 5")
40 check_syntax_error("const [let] = [1]")
41 check_syntax_error("const l\u0065t = 6")
42 check_syntax_error("let [l\u0065t] = [2]")
43 check_syntax_error("l\\u0065t a")
Ddirective.js15 function check_syntax_error (code) function
26 check_syntax_error ("function f(a, b = 4) { 'use strict' }")
29 check_syntax_error ('function f(...a) { "use strict" }')
32 check_syntax_error ("({ f([a,b]) { 'use strict' } })")
35 check_syntax_error ("function f(a, b = 4) { 'directive1'\n'directive2'\n'use strict' }")
Dfunction-call.js15 function check_syntax_error (code) function
30 check_syntax_error ("f(,)")
31 check_syntax_error ("f(,1)")
32 check_syntax_error ("f(1,,)")
33 check_syntax_error ("f(1,,2)")
Didentifier-escape.js16 function check_syntax_error (code) { function
36 check_syntax_error("\\u{10C80}: break \\ud803\\udc80");
/third_party/python/Lib/test/
Dtest_positional_only_arg.py7 from test.support import check_syntax_error
26check_syntax_error(self, "def f(a, b = 5, /, c): pass", "non-default argument follows default argu…
27check_syntax_error(self, "def f(a = 5, b, /, c): pass", "non-default argument follows default argu…
28check_syntax_error(self, "def f(a = 5, b=1, /, c, *, d=2): pass", "non-default argument follows de…
29check_syntax_error(self, "def f(a = 5, b, /): pass", "non-default argument follows default argumen…
30 check_syntax_error(self, "def f(*args, /): pass")
31 check_syntax_error(self, "def f(*args, a, /): pass")
32 check_syntax_error(self, "def f(**kwargs, /): pass")
33 check_syntax_error(self, "def f(/, a = 1): pass")
34 check_syntax_error(self, "def f(/, a): pass")
[all …]
Dtest_grammar.py4 from test.support import check_syntax_error
106 from test.support import check_syntax_error
195 check = self.check_syntax_error
369 from test.support import check_syntax_error
400 check_syntax_error(self, "def f: int")
401 check_syntax_error(self, "x: int: str")
402 check_syntax_error(self, "def f():\n"
405 check_syntax_error(self, "[x, 0]: int\n")
406 check_syntax_error(self, "f(): int\n")
407 check_syntax_error(self, "(x,): int")
[all …]
Dtest_global.py3 from test.support import check_syntax_error
28 check_syntax_error(self, prog_text_1, lineno=4, offset=5)
36 check_syntax_error(self, prog_text_2, lineno=3, offset=5)
45 check_syntax_error(self, prog_text_3, lineno=4, offset=5)
Dtest_future.py21 def check_syntax_error(self, err, basename, lineno, offset=1): member in FutureTest
44 self.check_syntax_error(cm.exception, "badsyntax_future3", 3)
49 self.check_syntax_error(cm.exception, "badsyntax_future4", 3)
54 self.check_syntax_error(cm.exception, "badsyntax_future5", 4)
59 self.check_syntax_error(cm.exception, "badsyntax_future6", 3)
64 self.check_syntax_error(cm.exception, "badsyntax_future7", 3, 53)
69 self.check_syntax_error(cm.exception, "badsyntax_future8", 3)
74 self.check_syntax_error(cm.exception, "badsyntax_future9", 3)
79 self.check_syntax_error(cm.exception, "badsyntax_future10", 3)
Dtest_scope.py4 from test.support import check_syntax_error, cpython_only
198 check_syntax_error(self, """if 1:
206 check_syntax_error(self, """if 1:
214 check_syntax_error(self, """if 1:
223 check_syntax_error(self, """if 1:
/third_party/python/Lib/lib2to3/tests/data/
Dpy2_test_grammar.py11 from test.test_support import check_syntax_error
294 check_syntax_error(self, "f(*g(1=2))")
295 check_syntax_error(self, "f(**g(1=2))")
309 check_syntax_error(self, "lambda x: x = 2")
310 check_syntax_error(self, "lambda (None,): None")
336 check_syntax_error(self, "x + 1 = 1")
337 check_syntax_error(self, "a + 1 = b + 2")
406 check_syntax_error(self, 'print ,')
407 check_syntax_error(self, 'print >> x,')
487 check_syntax_error(self, "class foo:return 1")
[all …]
Dpy3_test_grammar.py11 from test.support import check_syntax_error
354 check_syntax_error(self, "f(*g(1=2))")
355 check_syntax_error(self, "f(**g(1=2))")
369 check_syntax_error(self, "lambda x: x = 2")
370 check_syntax_error(self, "lambda (None,): None")
400 check_syntax_error(self, "x + 1 = 1")
401 check_syntax_error(self, "a + 1 = b + 2")
484 check_syntax_error(self, "class foo:return 1")
495 check_syntax_error(self, "class foo:yield 1")
496 check_syntax_error(self, "def g4(): yield from *a")
[all …]

12