Home
last modified time | relevance | path

Searched refs:assertThrows (Results 1 – 25 of 193) sorted by relevance

12345678

/external/v8/test/mjsunit/regress/
Dregress-219.js60 assertThrows("/a/ii");
62 assertThrows("/a/gii");
64 assertThrows("/a/igi");
66 assertThrows("/a/iig");
68 assertThrows("/a/gimi");
70 assertThrows("/a/giim");
72 assertThrows("/a/igim");
74 assertThrows(function(){ return RegExp("a", "ii"); })
76 assertThrows(function(){ return RegExp("a", "gii"); })
78 assertThrows(function(){ return RegExp("a", "igi"); })
[all …]
Dregress-87.js36 assertThrows("/x/\\u0067");
37 assertThrows("/x/\\u0069");
38 assertThrows("/x/\\u006d");
40 assertThrows("/x/\\u0067i");
41 assertThrows("/x/\\u0069m");
42 assertThrows("/x/\\u006dg");
44 assertThrows("/x/m\\u0067");
45 assertThrows("/x/g\\u0069");
46 assertThrows("/x/i\\u006d");
48 assertThrows("/x/m\\u0067i");
[all …]
Dregress-1620.js36 assertThrows("var \\u\\u\\u = 42;");
37 assertThrows("var \\u41 = 42;");
38 assertThrows("var \\u123 = 42;");
41 assertThrows("var uuu = 42; var x = \\u\\u\\u");
50 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-324028.js30 assertThrows(function() { new Uint8Array(badObj); }, RangeError);
31 assertThrows(function() { new Uint8ClampedArray(badObj); }, RangeError);
32 assertThrows(function() { new Int8Array(badObj); }, RangeError);
33 assertThrows(function() { new Uint16Array(badObj); }, RangeError);
34 assertThrows(function() { new Int16Array(badObj); }, RangeError);
35 assertThrows(function() { new Uint32Array(badObj); }, RangeError);
36 assertThrows(function() { new Int32Array(badObj); }, RangeError);
37 assertThrows(function() { new Float32Array(badObj); }, RangeError);
38 assertThrows(function() { new Float64Array(badObj); }, RangeError);
/external/v8/test/mjsunit/
Dinvalid-lhs.js32 assertThrows("12 = 12", ReferenceError);
33 assertThrows("x++ = 12", ReferenceError);
34 assertThrows("eval('var x') = 12", ReferenceError);
35 assertThrows("if (false) 12 = 12", ReferenceError);
39 assertThrows("12++", ReferenceError);
40 assertThrows("12--", ReferenceError);
41 assertThrows("++12", ReferenceError);
42 assertThrows("--12", ReferenceError);
43 assertThrows("++(eval('12'))", ReferenceError);
44 assertThrows("(eval('12'))++", ReferenceError);
[all …]
Dstrict-mode.js30 assertThrows("'use strict';\n" + code, exception);
31 assertThrows('"use strict";\n' + code, exception);
38 assertThrows("\
59 assertThrows(function() {
71 assertThrows("function foo (x) 'use strict'; {}", SyntaxError);
81 assertThrows('\
136 assertThrows('\
163 assertThrows('\
192 assertThrows("var x = { get foo() { }, get foo() { } };", SyntaxError);
193 assertThrows("var x = { get foo(){}, get 'foo'(){}};", SyntaxError);
[all …]
Dd8-os.js76 assertThrows("os.system('ls', [TEST_DIR + '/dir/bar']);", "dir not there");
89 assertThrows("os.mkdirp(TEST_DIR + '/file1');", "mkdir over file1");
90 assertThrows("os.mkdirp(TEST_DIR + '/file1/foo');", "mkdir over file2");
91 assertThrows("os.mkdirp(TEST_DIR + '/file1/');", "mkdir over file3");
92 assertThrows("os.mkdirp(TEST_DIR + '/file1/foo/');", "mkdir over file4");
96 assertThrows("os.chdir(TEST_DIR + '/dir4');", "chdir dir4 I");
98 assertThrows("os.chdir(TEST_DIR + '/dir4');", "chdir dir4 II");
106 assertThrows("os.chdir(TEST_DIR + '/dir5');", "cd dir5 I");
108 assertThrows("os.chdir(TEST_DIR + '/dir5');", "chdir dir5 II");
132 assertThrows("os.system('sleep', ['2000'], 20);", "sleep 1");
[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);
Dregexp-not-sticky-yet.js31 assertThrows(function() { eval("/foo.bar/y"); }, SyntaxError);
32 assertThrows(function() { eval("/foobar/y"); }, SyntaxError);
33 assertThrows(function() { eval("/foo.bar/gy"); }, SyntaxError);
34 assertThrows(function() { eval("/foobar/gy"); }, SyntaxError);
35 assertThrows(function() { new RegExp("foo.bar", "y"); }, SyntaxError);
36 assertThrows(function() { new RegExp("foobar", "y"); }, SyntaxError);
37 assertThrows(function() { new RegExp("foo.bar", "gy"); }, SyntaxError);
38 assertThrows(function() { new RegExp("foobar", "gy"); }, SyntaxError);
Dcontext-calls-maintained.js50 assertThrows(function() { f(); }, ReferenceError);
55 assertThrows(function() { f(); }, ReferenceError);
62 assertThrows(function() { f(); }, ReferenceError);
68 assertThrows(function() { g(); }, TypeError);
74 assertThrows(function() { g(); }, TypeError);
84 assertThrows(function() { foo(); }, ReferenceError);
92 assertThrows(function() { foo(); }, ReferenceError);
106 assertThrows(function() { bar(); }, ReferenceError);
115 assertThrows(function() { bar(); }, ReferenceError);
Ddelay-syntax-error.js29 assertThrows("if (false) return;");
30 assertThrows("if (false) break;");
31 assertThrows("if (false) continue;");
33 assertThrows("return;");
34 assertThrows("break;");
35 assertThrows("continue;");
/external/v8/test/mjsunit/es6/
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 …]
Dstring-html.js13 assertThrows(function() {
16 assertThrows(function() {
24 assertThrows(function() {
27 assertThrows(function() {
35 assertThrows(function() {
38 assertThrows(function() {
46 assertThrows(function() {
49 assertThrows(function() {
57 assertThrows(function() {
60 assertThrows(function() {
[all …]
Dgenerators-parsing.js60 assertThrows("function* g() { yield\n* foo }", SyntaxError);
68 assertThrows("function* g() { yield ? yield : yield }", SyntaxError);
96 assertThrows("function* yield() { \"use strict\"; (yield 3) + (yield 4); }",
110 assertThrows("function f() { \"use strict\"; yield: 1 }", SyntaxError)
111 assertThrows("function* g() { yield: 1 }", SyntaxError)
118 assertThrows("function* g() { yield = 10; }", SyntaxError);
122 assertThrows("function* g() { yield 3 + yield 4; }", SyntaxError);
125 assertThrows("function f() { \"use strict\"; var yield = 13; }", SyntaxError);
128 assertThrows("function* g() { yield (function yield() {}); }", SyntaxError);
131 assertThrows("function* g(yield) { yield (10); }", SyntaxError);
/external/v8/test/mjsunit/harmony/
Darray-findindex.js243 assertThrows('Array.prototype.findIndex.call(null, function() { })',
245 assertThrows('Array.prototype.findIndex.call(undefined, function() { })',
247 assertThrows('Array.prototype.findIndex.apply(null, function() { }, [])',
249 assertThrows('Array.prototype.findIndex.apply(undefined, function() { }, [])',
252 assertThrows('[].findIndex(null)', TypeError);
253 assertThrows('[].findIndex(undefined)', TypeError);
254 assertThrows('[].findIndex(0)', TypeError);
255 assertThrows('[].findIndex(true)', TypeError);
256 assertThrows('[].findIndex(false)', TypeError);
257 assertThrows('[].findIndex("")', TypeError);
[all …]
Darray-find.js243 assertThrows('Array.prototype.find.call(null, function() { })',
245 assertThrows('Array.prototype.find.call(undefined, function() { })',
247 assertThrows('Array.prototype.find.apply(null, function() { }, [])',
249 assertThrows('Array.prototype.find.apply(undefined, function() { }, [])',
252 assertThrows('[].find(null)', TypeError);
253 assertThrows('[].find(undefined)', TypeError);
254 assertThrows('[].find(0)', TypeError);
255 assertThrows('[].find(true)', TypeError);
256 assertThrows('[].find(false)', TypeError);
257 assertThrows('[].find("")', TypeError);
[all …]
Dstring-fromcodepoint.js25 assertThrows(function() { String.fromCodePoint("_"); }, RangeError);
26 assertThrows(function() { String.fromCodePoint("+Infinity"); }, RangeError);
27 assertThrows(function() { String.fromCodePoint("-Infinity"); }, RangeError);
28 assertThrows(function() { String.fromCodePoint(-1); }, RangeError);
29 assertThrows(function() { String.fromCodePoint(0x10FFFF + 1); }, RangeError);
30 assertThrows(function() { String.fromCodePoint(3.14); }, RangeError);
31 assertThrows(function() { String.fromCodePoint(3e-2); }, RangeError);
32 assertThrows(function() { String.fromCodePoint(-Infinity); }, RangeError);
33 assertThrows(function() { String.fromCodePoint(+Infinity); }, RangeError);
34 assertThrows(function() { String.fromCodePoint(NaN); }, RangeError);
[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 …]
Dmodule-linking.js43 assertThrows(function() { l }, ReferenceError)
44 assertThrows(function() { ll }, ReferenceError)
45 assertThrows(function() { R.l }, ReferenceError)
46 assertThrows(function() { M.l }, ReferenceError)
47 assertThrows(function() { MM.l }, ReferenceError)
48 assertThrows(function() { F.l }, ReferenceError)
49 assertThrows(function() { G.l }, ReferenceError)
50 assertThrows(function() { c }, ReferenceError)
51 assertThrows(function() { cc }, ReferenceError)
52 assertThrows(function() { R.c }, ReferenceError)
[all …]
Ddataview-accessors.js73 assertThrows(doGet, RangeError);
88 assertThrows(doSet, RangeError);
400 assertThrows(function() { f(); }, TypeError);
402 assertThrows(function() { f.call({}, 0, 0); }, TypeError);
403 assertThrows(function() { f.call(a); }, TypeError);
405 assertThrows(function() { f.call(a, 1); }, TypeError);
433 assertThrows(function() { a.getUint8(); }, TypeError);
434 assertThrows(function() { a.getInt8(); }, TypeError);
435 assertThrows(function() { a.getUint16(); }, TypeError);
436 assertThrows(function() { a.getInt16(); }, TypeError);
[all …]
Dstring-contains.js59 assertThrows("String.prototype.contains.call(null, 'test')", TypeError);
60 assertThrows("String.prototype.contains.call(null, null)", TypeError);
61 assertThrows("String.prototype.contains.call(undefined, undefined)", TypeError);
63 assertThrows("String.prototype.contains.apply(null, ['test'])", TypeError);
64 assertThrows("String.prototype.contains.apply(null, [null])", TypeError);
65 assertThrows("String.prototype.contains.apply(undefined, [undefined])", TypeError);
152 assertThrows("'foo[a-z]+(bar)?'.contains(/[a-z]+/)", TypeError);
153 assertThrows("'foo/[a-z]+/(bar)?'.contains(/[a-z]+/)", TypeError);
155 assertThrows("'foo[a-z]+(bar)?'.contains(/(bar)?/)", TypeError);
156 assertThrows("'foo[a-z]+/(bar)?/'.contains(/(bar)?/)", TypeError);
[all …]
Dstring-endswith.js48 assertThrows("String.prototype.endsWith.call(null, 'test')", TypeError);
49 assertThrows("String.prototype.endsWith.call(null, null)", TypeError);
50 assertThrows("String.prototype.endsWith.call(undefined, undefined)", TypeError);
52 assertThrows("String.prototype.endsWith.apply(null, ['test'])", TypeError);
53 assertThrows("String.prototype.endsWith.apply(null, [null])", TypeError);
54 assertThrows("String.prototype.endsWith.apply(undefined, [undefined])", TypeError);
306 assertThrows(function() { "[a-z]+(bar)?".endsWith(/(bar)?/);
309 assertThrows(function() { "[a-z]+(bar)?".endsWith(/(bar)?/);
311 assertThrows(function() { "[a-z]+/(bar)?/".endsWith(/(bar)?/);
328 assertThrows(function() {
[all …]
Dstring-startswith.js48 assertThrows("String.prototype.startsWith.call(null, 'test')", TypeError);
49 assertThrows("String.prototype.startsWith.call(null, null)", TypeError);
50 assertThrows("String.prototype.startsWith.call(undefined, undefined)", TypeError);
52 assertThrows("String.prototype.startsWith.apply(null, ['test'])", TypeError);
53 assertThrows("String.prototype.startsWith.apply(null, [null])", TypeError);
54 assertThrows("String.prototype.startsWith.apply(undefined, [undefined])", TypeError);
294 assertThrows(function() { "[a-z]+(bar)?".startsWith(/[a-z]+/); }, TypeError);
296 assertThrows(function() { "[a-z]+(bar)?".startsWith(/(bar)?/); }, TypeError);
297 assertThrows(function() { "[a-z]+/(bar)?/".startsWith(/(bar)?/); }, TypeError);
313 assertThrows(function() {
[all …]
/external/v8/test/intl/number-format/
Dcheck-digit-ranges.js31 assertThrows('Intl.NumberFormat(undefined, {minimumIntegerDigits: 0})');
32 assertThrows('Intl.NumberFormat(undefined, {minimumIntegerDigits: 22})');
33 assertThrows('Intl.NumberFormat(undefined, {minimumIntegerDigits: null})');
34 assertThrows('Intl.NumberFormat(undefined, {minimumIntegerDigits: Infinity})');
35 assertThrows('Intl.NumberFormat(undefined, {minimumIntegerDigits: -Infinity})');
36 assertThrows('Intl.NumberFormat(undefined, {minimumIntegerDigits: x})');
38 assertThrows('Intl.NumberFormat(undefined, {minimumFractionDigits: -1})');
39 assertThrows('Intl.NumberFormat(undefined, {maximumFractionDigits: 21})');
41 assertThrows('Intl.NumberFormat(undefined, {minimumSignificantDigits: 0})');
42 assertThrows('Intl.NumberFormat(undefined, {maximumSignificantDigits: 22})');
[all …]
/external/v8/test/mjsunit/bugs/
Dbug-2615.js30 assertThrows("a.unshift(1);", RangeError);
37 assertThrows("a.splice(1,1,7,7,7,7,7);", RangeError);
44 assertThrows("a.unshift(4);", TypeError);
53 assertThrows("a.unshift(0);", TypeError);
72 assertThrows("a.splice(1,1);", TypeError);
79 assertThrows("a.splice(1,4);", TypeError);
87 assertThrows("a.splice(1,4);", TypeError);
99 assertThrows("a.shift();", TypeError);
107 assertThrows("a.pop();", TypeError);
114 assertThrows("a.sort();", TypeError);
[all …]

12345678