Home
last modified time | relevance | path

Searched refs:shouldThrow (Results 1 – 25 of 110) sorted by relevance

12345

/external/v8/test/webkit/
Dexception-propagate-from-dfg-to-llint.js26 toString: function() { if (shouldThrow) throw {}; return ""; }
29 var shouldThrow = false; variable
34 try { shouldThrow = !shouldThrow; h(o); } catch (e) {}
35 try { shouldThrow = !shouldThrow; h(o); } catch (e) {}
36 try { shouldThrow = !shouldThrow; h(o); } catch (e) {}
37 try { shouldThrow = !shouldThrow; h(o); } catch (e) {}
38 try { shouldThrow = !shouldThrow; h(o); } catch (e) {}
39 try { shouldThrow = !shouldThrow; h(o); } catch (e) {}
40 try { shouldThrow = !shouldThrow; h(o); } catch (e) {}
41 try { shouldThrow = !shouldThrow; h(o); } catch (e) {}
[all …]
Dclass-syntax-extends.js50 shouldThrow('x = class extends', '"SyntaxError: Unexpected end of input"');
51 shouldThrow('x = class extends', '"SyntaxError: Unexpected end of input"');
52 shouldThrow('x = class extends Base {', '"SyntaxError: Unexpected end of input"');
61 shouldThrow('x = class extends 3 { constructor() { } }; x.__proto__', '"TypeError: Class extends va…
62 shouldThrow('x = class extends "abc" { constructor() { } }; x.__proto__', '"TypeError: Class extend…
64 shouldThrow('x = class extends baseWithBadPrototype { constructor() { } }', '"TypeError: Class exte…
66 shouldThrow('x = class extends baseWithBadPrototype { constructor() { } }', '"TypeError: Class exte…
69 shouldThrow('x = 1; c = class extends ++x { constructor() { } };');
70 shouldThrow('x = 1; c = class extends x++ { constructor() { } };');
71 shouldThrow('x = 1; c = class extends (++x) { constructor() { } };');
[all …]
Dclass-syntax-super.js63 shouldThrow('x = class extends Base { constructor() { super(); } method() { super() } }',
65 shouldThrow('x = class extends Base { constructor() { super(); } method() { super } }', '"SyntaxErr…
66 shouldThrow('x = class extends Base { constructor() { super(); } method() { return new super } }', …
70 shouldThrow('(new x).method1()', '"ReferenceError: Unsupported reference to \'super\'"');
71 shouldThrow('(new x).method2()', '"ReferenceError: Unsupported reference to \'super\'"');
74 shouldThrow('new (class extends Base { constructor() { return undefined } })');
78 shouldThrow('new (class extends Base { constructor() { } })', '"ReferenceError: this is not defined…
79 shouldThrow('new (class extends Base { constructor() { return 1; } })', '"TypeError: Derived constr…
80 shouldThrow('new (class extends null { constructor() { return undefined } })');
81 shouldThrow('new (class extends null { constructor() { super(); return undefined } })', '"TypeError…
[all …]
Dclass-syntax-declaration.js54 shouldThrow("class", "'SyntaxError: Unexpected end of input'");
55 shouldThrow("class [", "'SyntaxError: Unexpected token ['");
56 shouldThrow("class {", "'SyntaxError: Unexpected token {'");
57 shouldThrow("class X {", "'SyntaxError: Unexpected end of input'");
58 shouldThrow("class X { ( }", "'SyntaxError: Unexpected token ('");
61 shouldThrow("class X { constructor() {} constructor() {} }", "'SyntaxError: A class may only have o…
62 shouldThrow("class X { get constructor() {} }", "'SyntaxError: Class constructor may not be an acce…
63 shouldThrow("class X { set constructor() {} }", "'SyntaxError: Class constructor may not be an acce…
67 shouldThrow("class X { constructor() {} static prototype() {} }", "'SyntaxError: Classes may not ha…
68 shouldThrow("class X { constructor() {} static get prototype() {} }", "'SyntaxError: Classes may no…
[all …]
Djs-continue-break-restrictions.js27 shouldThrow("if (0) { L:{ break; } }");
28 shouldThrow("if (0) { L:{ continue L; } }");
29 shouldThrow("if (0) { L:{ continue; } }");
30 shouldThrow("if (0) { switch (1) { case 1: continue; } }");
32 shouldThrow("if (0) { A:L:{ break; } }");
33 shouldThrow("if (0) { A:L:{ continue L; } }");
34 shouldThrow("if (0) { A:L:{ continue; } }");
37 shouldThrow("if (0) { L:A:{ break; } }");
38 shouldThrow("if (0) { L:A:{ continue L; } }");
39 shouldThrow("if (0) { L:A:{ continue; } }");
[all …]
Ddelete-getters-setters.js32 shouldThrow("b1.property");
38 shouldThrow("a2.property");
44 shouldThrow("b3.property");
50 shouldThrow("a4.property");
56 shouldThrow("b5.property");
62 shouldThrow("a6.property");
68 shouldThrow("b7.property");
74 shouldThrow("a8.property");
80 shouldThrow("o1.b.property");
86 shouldThrow("o1.a.property");
[all …]
Dclass-syntax-expression.js54 shouldThrow("x = class", "'SyntaxError: Unexpected end of input'");
55 shouldThrow("x = class {", "'SyntaxError: Unexpected end of input'");
56 shouldThrow("x = class { ( }", "'SyntaxError: Unexpected token ('");
59 shouldThrow("x = class { constructor() {} constructor() {} }", "'SyntaxError: A class may only have…
60 shouldThrow("x = class { get constructor() {} }", "'SyntaxError: Class constructor may not be an ac…
61 shouldThrow("x = class { set constructor() {} }", "'SyntaxError: Class constructor may not be an ac…
65 shouldThrow("x = class { constructor() {} static prototype() {} }", "'SyntaxError: Classes may not …
66 shouldThrow("x = class { constructor() {} static get prototype() {} }", "'SyntaxError: Classes may …
67 shouldThrow("x = class { constructor() {} static set prototype() {} }", "'SyntaxError: Classes may …
73 shouldThrow("x = class { constructor() {} set foo() {} }");
[all …]
Darray-defineOwnProperty.js37 shouldThrow("Object.defineProperty([], 'length', { get:function(){return true;} })");
38 shouldThrow("Object.defineProperty([], 'length', { enumerable: true })");
39 shouldThrow("Object.defineProperty([], 'length', { configurable: true })");
40 shouldThrow("Object.defineProperty(Object.defineProperty([], 'length', { writable: false }), 'lengt…
53 shouldThrow("Object.defineProperty(Object.defineProperty([true], '0', { configurable:false, writabl…
67 shouldThrow("Object.defineProperty(Object.defineProperty([], '0', { value: 1 }), '0', { value: 2 })…
68 shouldThrow("Object.defineProperty(Object.defineProperty([], '0', { value: 'okay' }), '0', { value:…
69 shouldThrow("Object.defineProperty(Object.defineProperty([], '0', { value: true }), '0', { value: f…
70 shouldThrow("Object.defineProperty(Object.defineProperty([], '0', { value: false }), '0', { value: …
71 shouldThrow("Object.defineProperty(Object.defineProperty([], '0', { value: Math }), '0', { value: O…
[all …]
Dclass-constructor-return.js76 shouldThrow('(new BaseThrow)');
110 shouldThrow('(new FunctionThrow)');
145 shouldThrow('(new DerivedReturnString)');
146 shouldThrow('(new DerivedReturnNumber)');
147 shouldThrow('(new DerivedReturnNull)');
148 shouldThrow('(new DerivedReturnSymbol)');
149 shouldThrow('(new DerivedThrow)');
166 shouldThrow('(new DerivedNoSuperNoReturn)');
169 shouldThrow('(new DerivedNoSuperReturnImplicit)');
170 shouldThrow('(new DerivedNoSuperReturnUndefined)');
[all …]
Dinstance-of-immediates.js40 testSet("1", { "1":shouldThrow, "{}":shouldThrow, "obj":shouldThrow });
44 testSet("{}", { "1":shouldThrow, "{}":shouldThrow, "obj":shouldThrow });
53 testSet("Constructor", { "1":shouldBeFalse, "{}":shouldThrow, "obj":shouldThrow });
63 testSet("Constructor", { "1":shouldBeFalse, "{}":shouldThrow, "obj":shouldThrow });
Dclass-syntax-semicolon.js26 shouldThrow("class A { foo;() { } }", "'SyntaxError: Unexpected token ;'");
27 shouldThrow("class A { foo() ; { } }", "'SyntaxError: Unexpected token ;'");
28 shouldThrow("class A { get ; foo() { } }", "'SyntaxError: Unexpected token ;'");
29 shouldThrow("class A { get foo;() { } }", "'SyntaxError: Unexpected token ;'");
30 shouldThrow("class A { get foo() ; { } }", "'SyntaxError: Unexpected token ;'");
31 shouldThrow("class A { set ; foo(x) { } }", "'SyntaxError: Unexpected token ;'");
32 shouldThrow("class A { set foo;(x) { } }", "'SyntaxError: Unexpected token ;'");
33 shouldThrow("class A { set foo(x) ; { } }", "'SyntaxError: Unexpected token ;'");
Darray-every.js82 shouldThrow("[12, 5, 8, 130, 44].every(isBigEnoughAndException)", '"exception from function"');
83 shouldThrow("[12, 54, 18, 130, 44].every(isBigEnoughAndException)", '"exception from function"');
87 shouldThrow("[12, 5, 8, 130, 44].every(5)");
88 shouldThrow("[12, 5, 8, 130, 44].every('wrong')");
89 shouldThrow("[12, 5, 8, 130, 44].every(new Object())");
90 shouldThrow("[12, 5, 8, 130, 44].every(null)");
91 shouldThrow("[12, 5, 8, 130, 44].every(undefined)");
92 shouldThrow("[12, 5, 8, 130, 44].every()");
Dnumber-toExponential.js55 shouldThrow("(123.456).toExponential(21)");
56 shouldThrow("(123.456).toExponential(100)");
57 shouldThrow("(123.456).toExponential(101)");
58 shouldThrow("(123.456).toExponential(-1)");
60 shouldThrow("(1234.567).toExponential(posInf)");
61 shouldThrow("(1234.567).toExponential(negInf)");
Dclass-syntax-call.js30 shouldThrow('A()', '"TypeError: Class constructor A cannot be invoked without \'new\'"');
32 shouldThrow('B()', '"TypeError: Class constructor B cannot be invoked without \'new\'"');
34 shouldThrow('(class { constructor() {} })()', '"TypeError: Class constructor cannot be invoked wit…
35 shouldThrow('new (class extends null { constructor() { super() } })()', '"TypeError: super is not a…
36 shouldThrow('(class extends null { constructor() { super() } })()', '"TypeError: Class constructor …
/external/v8/test/webkit/fast/js/
DObject-defineProperty.js49 shouldThrow("Object.defineProperty([1,2,3], '1', {get:getter, configurable: true})[1]", "'called ge…
51 shouldThrow("Object.defineProperty()");
52 shouldThrow("Object.defineProperty(null)");
53 shouldThrow("Object.defineProperty('foo')");
54 shouldThrow("Object.defineProperty({})");
55 shouldThrow("Object.defineProperty({}, 'foo')");
56 shouldThrow("Object.defineProperty({}, 'foo', {get:undefined, value:true}).foo");
64 shouldThrow("Object.defineProperty(createUnconfigurableProperty({}, 'foo'), 'foo', {configurable: t…
65 shouldThrow("Object.defineProperty(createUnconfigurableProperty({}, 'foo'), 'foo', {writable: true}…
66 shouldThrow("Object.defineProperty(createUnconfigurableProperty({}, 'foo'), 'foo', {enumerable: tru…
[all …]
Darray-prototype-properties.js29 shouldThrow("Array.prototype.toString.call(undefined)");
30 shouldThrow("Array.prototype.toLocaleString.call(undefined)");
31 shouldThrow("Array.prototype.concat.call(undefined, [])");
32 shouldThrow("Array.prototype.join.call(undefined, [])");
33 shouldThrow("Array.prototype.pop.call(undefined)");
34 shouldThrow("Array.prototype.push.call(undefined, {})");
35 shouldThrow("Array.prototype.reverse.call(undefined)");
36 shouldThrow("Array.prototype.shift.call(undefined)");
37 shouldThrow("Array.prototype.slice.call(undefined, 0, 1)");
38 shouldThrow("Array.prototype.sort.call(undefined)");
[all …]
Dbasic-strict-mode.js43 shouldThrow(str);
44 shouldThrow("(function(){" + str + "})");
65 shouldThrow("testThisDotAccess.call(null)");
66 shouldThrow("testThisDotAccess.call(undefined)");
71 shouldThrow("testThisBracketAccess.call(null, 'length')");
72 shouldThrow("testThisBracketAccess.call(undefined, 'length')");
77 shouldThrow("Function('\"use strict\"; with({});')");
99 shouldThrow("(function (){'use strict'; arguments.callee; })()");
100 shouldThrow("(function (){'use strict'; arguments.caller; })()");
101 shouldThrow("(function f(){'use strict'; f.arguments; })()");
[all …]
Dnumber-toprecision.js42 shouldThrow("(1234.567).toPrecision(0)");
43 shouldThrow("(1234.567).toPrecision(null)"); // just like 0
44 shouldThrow("(1234.567).toPrecision(false)"); // just like 0
45 shouldThrow("(1234.567).toPrecision('foo')"); // just like 0
46 shouldThrow("(1234.567).toPrecision(-1)");
55 shouldThrow("(1234.567).toPrecision(22)");
56 shouldThrow("(1234.567).toPrecision(100)");
57 shouldThrow("(1234.567).toPrecision(101)");
59 shouldThrow("(1234.567).toPrecision(posInf)");
60 shouldThrow("(1234.567).toPrecision(negInf)");
[all …]
Dnumber-toString.js35 shouldThrow("(1234.567).toString(0)");
37 shouldThrow("(1234.567).toString(null)");
38 shouldThrow("(1234.567).toString(false)");
39 shouldThrow("(1234.567).toString('foo')");
40 shouldThrow("(1234.567).toString(nan)"); // nan is treated like 0
42 shouldThrow("(1234.567).toString(1)");
43 shouldThrow("(1234.567).toString(true)");
44 shouldThrow("(1234.567).toString('1')");
84 shouldThrow("(1234.567).toString(37)");
85 shouldThrow("(1234.567).toString(-1)");
[all …]
Dnumber-tofixed.js88 shouldThrow("(1234.567).toFixed(21)");
89 shouldThrow("(1234.567).toFixed(100)");
90 shouldThrow("(1234.567).toFixed(101)");
91 shouldThrow("(1234.567).toFixed(-1)");
92 shouldThrow("(1234.567).toFixed(-4)");
93 shouldThrow("(1234.567).toFixed(-5)");
94 shouldThrow("(1234.567).toFixed(-20)");
95 shouldThrow("(1234.567).toFixed(-21)");
97 shouldThrow("(1234.567).toFixed(posInf)");
98 shouldThrow("(1234.567).toFixed(negInf)");
Dmodify-non-references.js30 shouldThrow("Number()++", "'ReferenceError: Invalid left-hand side expression in postfix operation'…
31 shouldThrow("Number()--", "'ReferenceError: Invalid left-hand side expression in postfix operation'…
32 shouldThrow("++Number()", "'ReferenceError: Invalid left-hand side expression in prefix operation'"…
33 shouldThrow("--Number()", "'ReferenceError: Invalid left-hand side expression in prefix operation'"…
34 shouldThrow("Number() = 1", "'ReferenceError: Invalid left-hand side in assignment'");
35 shouldThrow("Number() += 1", "'ReferenceError: Invalid left-hand side in assignment'");
Dobject-prototype-properties.js33 shouldThrow("Object.prototype.toLocaleString.call(undefined)");
34 shouldThrow("Object.prototype.valueOf.call(undefined)");
35 shouldThrow("Object.prototype.hasOwnProperty.call(undefined, 'hasOwnProperty')");
36 shouldThrow("Object.prototype.propertyIsEnumerable.call(undefined, 'propertyIsEnumerable')");
37 shouldThrow("Object.prototype.isPrototypeOf.call(undefined, this)");
/external/v8/test/mjsunit/wasm/
Dunicode-validation.js45 internal_function_name, exported_function_name, shouldThrow) { argument
56 assertEquals(shouldThrow,
62 if (!shouldThrow) {
80 if (!shouldThrow) print(err);
81 assertTrue(shouldThrow, "Should not throw error on valid names");
84 assertEquals(shouldThrow, hasThrown,
88 function checkImportedModuleName(name, shouldThrow) { argument
89 checkImportsAndExports(name, "imp", "func", undefined, shouldThrow);
92 function checkImportedFunctionName(name, shouldThrow) { argument
93 checkImportsAndExports("module", name, "func", "func", shouldThrow);
[all …]
/external/v8/test/webkit/fast/regex/
DlastIndex.js30 shouldThrow("'use strict'; delete /x/.lastIndex");
40 shouldThrow("Object.defineProperty(/x/, {get:function(){}})");
43 shouldThrow("Object.defineProperty(/x/, 'lastIndex', {enumerable:true}); true");
47 shouldThrow("Object.defineProperty(/x/, 'lastIndex', {configurable:true}); true");
58 shouldThrow("Object.defineProperty(Object.defineProperty(/x/, 'lastIndex', {writable:false}), 'last…
61 shouldThrow("Object.defineProperty(Object.defineProperty(/x/, 'lastIndex', {writable:false}), 'last…
67 shouldThrow("Object.defineProperty(/x/g, 'lastIndex', {writable:false}).exec('')");
68 shouldThrow("Object.defineProperty(/x/g, 'lastIndex', {writable:false}).exec('x')");
/external/v8/test/webkit/fast/js/kde/
Dparse.js31 shouldThrow("function test() { while(0) break lab; } lab: 1");
32 shouldThrow("function test() { while(0) continue lab; } lab: 1");
39 shouldThrow("function test() { while(0) break lab } lab: 1");
40 shouldThrow("function test() { while(0) continue lab } lab: 1");
52 shouldThrow("var f\xF7;");
62 shouldThrow("var f\\u00F7;");
63 shouldThrow("var \\u0030;");
64 shouldThrow("var test = { }; test.i= 0; test.i\\u002b= 1; test.i;");

12345