diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-27 15:57:18 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-27 15:57:18 +0200 |
commit | d990d8ab2cade6c928e8bbe56ae038d020cef599 (patch) | |
tree | c7561ae0f303cb0d4a7a7507178531b4852e4dea /js/src/jit-test/tests/basic | |
parent | 0c36b27511c1fbca594f0426c493ef601fda3e4c (diff) | |
parent | 8d5ec757ece850fb7ad5c712868f305636e41177 (diff) | |
download | UXP-d990d8ab2cade6c928e8bbe56ae038d020cef599.tar UXP-d990d8ab2cade6c928e8bbe56ae038d020cef599.tar.gz UXP-d990d8ab2cade6c928e8bbe56ae038d020cef599.tar.lz UXP-d990d8ab2cade6c928e8bbe56ae038d020cef599.tar.xz UXP-d990d8ab2cade6c928e8bbe56ae038d020cef599.zip |
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into js_array_values_1
Diffstat (limited to 'js/src/jit-test/tests/basic')
5 files changed, 23 insertions, 27 deletions
diff --git a/js/src/jit-test/tests/basic/constructor-name.js b/js/src/jit-test/tests/basic/constructor-name.js index 4bc6a61ea..2dd4c073f 100644 --- a/js/src/jit-test/tests/basic/constructor-name.js +++ b/js/src/jit-test/tests/basic/constructor-name.js @@ -17,7 +17,7 @@ function makeObject() { let tests = [ { name: "Ctor", object: new Ctor }, { name: "nested.Ctor", object: new nested.Ctor }, - { name: "makeInstance/LexicalCtor", object: makeInstance() }, + { name: "LexicalCtor", object: makeInstance() }, { name: null, object: {} }, { name: null, object: nested.object }, { name: null, object: makeObject() }, diff --git a/js/src/jit-test/tests/basic/destructuring-default.js b/js/src/jit-test/tests/basic/destructuring-default.js index 168977e80..49a908b8a 100644 --- a/js/src/jit-test/tests/basic/destructuring-default.js +++ b/js/src/jit-test/tests/basic/destructuring-default.js @@ -84,10 +84,7 @@ function testArgumentFunction(pattern, input) { 'return [a, b, c, d, e, f];' )(input); } -// XXX: ES6 requires the `Function` constructor to accept arbitrary -// `BindingElement`s as formal parameters. See Bug 1037939. -// Once fixed, please update the assertions below. -assertThrowsInstanceOf(() => testAll(testArgumentFunction), SyntaxError); +testAll(testArgumentFunction); function testThrow(pattern, input) { return new Function('input', diff --git a/js/src/jit-test/tests/basic/destructuring-rest.js b/js/src/jit-test/tests/basic/destructuring-rest.js index f53f07e03..fcb7b79bb 100644 --- a/js/src/jit-test/tests/basic/destructuring-rest.js +++ b/js/src/jit-test/tests/basic/destructuring-rest.js @@ -132,10 +132,9 @@ function testArgumentFunction(pattern, input, binding) { 'return ' + binding )(input); } -// XXX: ES6 requires the `Function` constructor to accept arbitrary -// `BindingElement`s as formal parameters. See Bug 1037939. -// Once fixed, please update the assertions below. -assertThrowsInstanceOf(() => testDeclaration(testArgumentFunction), SyntaxError); +// ES6 requires the `Function` constructor to accept arbitrary +// `BindingElement`s as formal parameters. +testDeclaration(testArgumentFunction); function testThrow(pattern, input, binding) { binding = binding || 'rest'; diff --git a/js/src/jit-test/tests/basic/functionnames.js b/js/src/jit-test/tests/basic/functionnames.js index 935292ee3..7fef872fc 100644 --- a/js/src/jit-test/tests/basic/functionnames.js +++ b/js/src/jit-test/tests/basic/functionnames.js @@ -40,7 +40,7 @@ assertName(Foo, 'Foo</<'); /* various properties and such */ var x = {fox: { bax: function(){} } }; -assertName(x.fox.bax, 'x.fox.bax'); +assertName(x.fox.bax, 'bax'); var foo = {foo: {foo: {}}}; foo.foo.foo = function(){}; assertName(foo.foo.foo, 'foo.foo.foo'); @@ -48,20 +48,20 @@ var z = { foz: function() { var baz = function() { var y = {bay: function() {}}; - assertName(y.bay, 'z.foz/baz/y.bay'); + assertName(y.bay, 'bay'); }; - assertName(baz, 'z.foz/baz'); + assertName(baz, 'baz'); baz(); } }; -assertName(z.foz, 'z.foz'); +assertName(z.foz, 'foz'); z.foz(); var outer = function() { x.fox.bax.nx = function(){}; var w = {fow: { baw: function(){} } }; assertName(x.fox.bax.nx, 'outer/x.fox.bax.nx') - assertName(w.fow.baw, 'outer/w.fow.baw'); + assertName(w.fow.baw, 'baw'); }; assertName(outer, 'outer'); outer(); @@ -69,7 +69,7 @@ function Fuz(){}; Fuz.prototype = { add: function() {} } -assertName(Fuz.prototype.add, 'Fuz.prototype.add'); +assertName(Fuz.prototype.add, 'add'); var x = 1; x = function(){}; @@ -94,7 +94,7 @@ a.b = function() { assertName(arguments.callee, 'a.b<'); return { a: function() {} } }(); -assertName(a.b.a, 'a.b</<.a'); +assertName(a.b.a, 'a'); a = { b: function(a) { @@ -104,9 +104,9 @@ a = { return function() {}; } }; -assertName(a.b, 'a.b'); -assertName(a.b(true), 'a.b/<') -assertName(a.b(false), 'a.b/<') +assertName(a.b, 'b'); +assertName(a.b(true), 'b/<') +assertName(a.b(false), 'b/<') function f(g) { assertName(g, 'x<'); @@ -116,7 +116,7 @@ var x = f(function () { return function() {}; }); assertName(x, 'x</<'); var a = {'b': function(){}}; -assertName(a.b, 'a.b'); +assertName(a.b, 'b'); function g(f) { assertName(f, ''); @@ -138,15 +138,15 @@ a = { "\"\'quotes\'\"": function(){}, "!@#$%": function(){} }; -assertName(a["embedded spaces"], 'a["embedded spaces"]'); -assertName(a["dots.look.like.property.references"], 'a["dots.look.like.property.references"]'); -assertName(a["\"\'quotes\'\""], 'a["\\\"\'quotes\'\\\""]'); -assertName(a["!@#$%"], 'a["!@#$%"]'); +assertName(a["embedded spaces"], 'embedded spaces'); +assertName(a["dots.look.like.property.references"], 'dots.look.like.property.references'); +assertName(a["\"\'quotes\'\""], '"\'quotes\'"'); +assertName(a["!@#$%"], '!@#$%'); a.b = {}; a.b.c = {}; a.b["c"]["d e"] = { f: { 1: { "g": { "h i": function() {} } } } }; -assertName(a.b.c["d e"].f[1].g["h i"], 'a.b.c["d e"].f[1].g["h i"]'); +assertName(a.b.c["d e"].f[1].g["h i"], 'h i'); this.m = function () {}; assertName(m, "this.m"); diff --git a/js/src/jit-test/tests/basic/regexpLastIndexReset.js b/js/src/jit-test/tests/basic/regexpLastIndexReset.js index 2a54d8ef5..dbe3c3b76 100644 --- a/js/src/jit-test/tests/basic/regexpLastIndexReset.js +++ b/js/src/jit-test/tests/basic/regexpLastIndexReset.js @@ -7,7 +7,7 @@ function test() { pattern.lastIndex = 3; var result = pattern.exec(string); assertEq(result, null); - assertEq(pattern.lastIndex, 0); + assertEq(pattern.lastIndex, 3); } for (let i = 0; i < 10; i++) { @@ -18,7 +18,7 @@ function test2() { pattern.lastIndex = 3; var result = pattern.test(string); assertEq(result, false); - assertEq(pattern.lastIndex, 0); + assertEq(pattern.lastIndex, 3); } for (let i = 0; i < 10; i++) { |