Merge pull request #386 from anba/issue-383/test-failures

Fix test regressions
This commit is contained in:
Brian Terlson 2015-07-17 13:06:38 -07:00
commit 7992be11ed
90 changed files with 107 additions and 119 deletions

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
var f = new Function("\"use strict\";\nreturn gNonStrict();");
var f = new Function("\"use strict\";\ngNonStrict();");
assert.throws(TypeError, function() {
f();

View File

@ -11,7 +11,7 @@ flags: [onlyStrict]
---*/
function f() {
return gNonStrict();
gNonStrict();
}
assert.throws(TypeError, function() {

View File

@ -12,7 +12,7 @@ flags: [noStrict]
function f() {
"use strict";
return gNonStrict();
gNonStrict();
}
assert.throws(TypeError, function() {

View File

@ -11,7 +11,7 @@ flags: [onlyStrict]
---*/
var f = function () {
return gNonStrict();
gNonStrict();
}
assert.throws(TypeError, function() {

View File

@ -12,7 +12,7 @@ flags: [noStrict]
var f = function () {
"use strict";
return gNonStrict();
gNonStrict();
}
assert.throws(TypeError, function() {

View File

@ -12,7 +12,7 @@ flags: [onlyStrict]
assert.throws(TypeError, function() {
var obj = new (function () {
return gNonStrict();
gNonStrict();
});
});

View File

@ -10,7 +10,7 @@ flags: [onlyStrict]
---*/
function f() {
return gNonStrict();
gNonStrict();
}
assert.throws(TypeError, function() {

View File

@ -13,7 +13,7 @@ flags: [noStrict]
assert.throws(TypeError, function() {
var obj = new (function () {
"use strict";
return gNonStrict();
gNonStrict();
});
});

View File

@ -12,9 +12,9 @@ flags: [onlyStrict]
function f1() {
function f() {
return gNonStrict();
gNonStrict();
}
return f();
f();
}
assert.throws(TypeError, function() {

View File

@ -12,9 +12,9 @@ flags: [onlyStrict]
function f1() {
var f = function () {
return gNonStrict();
gNonStrict();
}
return f();
f();
}
assert.throws(TypeError, function() {

View File

@ -11,8 +11,8 @@ flags: [onlyStrict]
---*/
function f1() {
return (function () {
return gNonStrict();
(function () {
gNonStrict();
})();
}

View File

@ -12,9 +12,9 @@ flags: [onlyStrict]
var f1 = function () {
function f() {
return gNonStrict();
gNonStrict();
}
return f();
f();
}
assert.throws(TypeError, function() {

View File

@ -12,9 +12,9 @@ flags: [onlyStrict]
var f1 = function () {
var f = function () {
return gNonStrict();
gNonStrict();
}
return f();
f();
}
assert.throws(TypeError, function() {

View File

@ -11,8 +11,8 @@ flags: [onlyStrict]
---*/
var f1 = function () {
return (function () {
return gNonStrict();
(function () {
gNonStrict();
})();
}

View File

@ -13,9 +13,9 @@ flags: [onlyStrict]
assert.throws(TypeError, function() {
(function () {
function f() {
return gNonStrict();
gNonStrict();
}
return f();
f();
})();
});

View File

@ -13,9 +13,9 @@ flags: [onlyStrict]
assert.throws(TypeError, function() {
(function () {
var f = function () {
return gNonStrict();
gNonStrict();
}
return f();
f();
})();
});

View File

@ -12,8 +12,8 @@ flags: [onlyStrict]
assert.throws(TypeError, function() {
(function () {
return (function () {
return gNonStrict();
(function () {
gNonStrict();
})();
})();
});

View File

@ -12,7 +12,7 @@ flags: [noStrict]
function f() {
"use strict";
return gNonStrict();
gNonStrict();
}
assert.throws(TypeError, function() {

View File

@ -13,9 +13,9 @@ flags: [noStrict]
function f1() {
"use strict";
function f() {
return gNonStrict();
gNonStrict();
}
return f();
f();
}
assert.throws(TypeError, function() {

View File

@ -13,9 +13,9 @@ flags: [noStrict]
function f1() {
"use strict";
var f = function () {
return gNonStrict();
gNonStrict();
}
return f();
f();
}
assert.throws(TypeError, function() {

View File

@ -12,8 +12,8 @@ flags: [noStrict]
function f1() {
"use strict";
return (function () {
return gNonStrict();
(function () {
gNonStrict();
})();
}

View File

@ -13,9 +13,9 @@ flags: [noStrict]
var f1 = function () {
"use strict";
function f() {
return gNonStrict();
gNonStrict();
}
return f();
f();
}
assert.throws(TypeError, function() {

View File

@ -13,9 +13,9 @@ flags: [noStrict]
var f1 = function () {
"use strict";
var f = function () {
return gNonStrict();
gNonStrict();
}
return f();
f();
}
assert.throws(TypeError, function() {

View File

@ -12,8 +12,8 @@ flags: [noStrict]
var f1 = function () {
"use strict";
return (function () {
return gNonStrict();
(function () {
gNonStrict();
})();
}

View File

@ -14,9 +14,9 @@ assert.throws(TypeError, function() {
(function () {
"use strict";
function f() {
return gNonStrict();
gNonStrict();
}
return f();
f();
})();
});

View File

@ -14,9 +14,9 @@ assert.throws(TypeError, function() {
(function () {
"use strict";
var f = function () {
return gNonStrict();
gNonStrict();
}
return f();
f();
})();
});

View File

@ -13,8 +13,8 @@ flags: [noStrict]
assert.throws(TypeError, function() {
(function () {
"use strict";
return (function () {
return gNonStrict();
(function () {
gNonStrict();
})();
})();
});

View File

@ -13,8 +13,7 @@ flags: [noStrict]
function f1() {
function f() {
"use strict";
var r = gNonStrict();
return r;
gNonStrict();
}
return f();
}

View File

@ -10,7 +10,7 @@ flags: [onlyStrict]
---*/
var f = function () {
return gNonStrict();
gNonStrict();
}
assert.throws(TypeError, function() {

View File

@ -13,8 +13,7 @@ flags: [noStrict]
function f1() {
var f = function () {
"use strict";
var r = gNonStrict();
return r;
gNonStrict();
}
return f();
}

View File

@ -13,8 +13,7 @@ flags: [noStrict]
function f1() {
return (function () {
"use strict";
var r = gNonStrict();
return r;
gNonStrict();
})();
}

View File

@ -13,8 +13,7 @@ flags: [noStrict]
var f1 = function () {
function f() {
"use strict";
var r = gNonStrict();
return r;
gNonStrict();
}
return f();
}

View File

@ -13,8 +13,7 @@ flags: [noStrict]
var f1 = function () {
var f = function () {
"use strict";
var r = gNonStrict();
return r;
gNonStrict();
}
return f();
}

View File

@ -13,8 +13,7 @@ flags: [noStrict]
var f1 = function () {
return (function () {
"use strict";
var r = gNonStrict();
return r;
gNonStrict();
})();
}

View File

@ -14,8 +14,7 @@ assert.throws(TypeError, function() {
(function () {
function f() {
"use strict";
var r = gNonStrict();
return r;
gNonStrict();
}
return f();
})();

View File

@ -14,8 +14,7 @@ assert.throws(TypeError, function() {
(function () {
var f = function () {
"use strict";
var r = gNonStrict();
return r;
gNonStrict();
}
return f();
})();

View File

@ -14,8 +14,7 @@ assert.throws(TypeError, function() {
(function () {
return (function () {
"use strict";
var r = gNonStrict();
return r;
gNonStrict();
})();
})();
});

View File

@ -9,7 +9,7 @@ description: >
flags: [onlyStrict]
---*/
var o = { get foo() { return gNonStrict(); } }
var o = { get foo() { gNonStrict(); } }
assert.throws(TypeError, function() {
o.foo;

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
var o = { get foo() { "use strict"; return gNonStrict(); } }
var o = { get foo() { "use strict"; gNonStrict(); } }
assert.throws(TypeError, function() {
o.foo;

View File

@ -12,7 +12,7 @@ flags: [noStrict]
var f = function () {
"use strict";
return gNonStrict();
gNonStrict();
}
assert.throws(TypeError, function() {

View File

@ -9,7 +9,7 @@ description: >
flags: [onlyStrict]
---*/
var o = { set foo(stuff) { return gNonStrict(); } }
var o = { set foo(stuff) { gNonStrict(); } }
assert.throws(TypeError, function() {
o.foo = 7;

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
var o = { set foo(stuff) { "use strict"; return gNonStrict(); } }
var o = { set foo(stuff) { "use strict"; gNonStrict(); } }
assert.throws(TypeError, function() {
o.foo = 8;

View File

@ -10,7 +10,7 @@ flags: [onlyStrict]
---*/
var o = {};
Object.defineProperty(o, "foo", { get: function() { return gNonStrict(); } });
Object.defineProperty(o, "foo", { get: function() { gNonStrict(); } });
assert.throws(TypeError, function() {
o.foo;

View File

@ -11,7 +11,7 @@ flags: [noStrict]
---*/
var o = {};
Object.defineProperty(o, "foo", { get: function() { "use strict"; return gNonStrict(); } });
Object.defineProperty(o, "foo", { get: function() { "use strict"; gNonStrict(); } });
assert.throws(TypeError, function() {
o.foo;

View File

@ -10,7 +10,7 @@ flags: [onlyStrict]
---*/
var o = {};
Object.defineProperty(o, "foo", { set: function(stuff) { return gNonStrict(); } });
Object.defineProperty(o, "foo", { set: function(stuff) { gNonStrict(); } });
assert.throws(TypeError, function() {
o.foo = 9;

View File

@ -11,7 +11,7 @@ flags: [noStrict]
---*/
var o = {};
Object.defineProperty(o, "foo", { set: function(stuff) { "use strict"; return gNonStrict(); } });
Object.defineProperty(o, "foo", { set: function(stuff) { "use strict"; gNonStrict(); } });
assert.throws(TypeError, function() {
o.foo = 10;

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
function f() { "use strict"; var r = gNonStrict(); return r;};
function f() { "use strict"; gNonStrict(); };
function foo() { return f();}
assert.throws(TypeError, function() {

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
function f() { "use strict"; return gNonStrict();};
function f() { "use strict"; gNonStrict(); };
assert.throws(TypeError, function() {
eval("f();");

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
function f() { "use strict"; var r = gNonStrict(); return r;};
function f() { "use strict"; gNonStrict(); };
assert.throws(TypeError, function() {
Function("return f();")();

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
function f() { "use strict"; var r = gNonStrict(); return r;};
function f() { "use strict"; gNonStrict(); };
assert.throws(TypeError, function() {
new Function("return f();")();

View File

@ -12,7 +12,7 @@ flags: [onlyStrict]
assert.throws(TypeError, function() {
(function () {
return gNonStrict();
gNonStrict();
})();
});

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
function f() { "use strict"; return gNonStrict();};
function f() { "use strict"; gNonStrict();};
assert.throws(TypeError, function() {
f.apply();

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
function f() { "use strict"; return gNonStrict();};
function f() { "use strict"; gNonStrict();};
assert.throws(TypeError, function() {
f.apply(null);

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
function f() { "use strict"; return gNonStrict();};
function f() { "use strict"; gNonStrict();};
assert.throws(TypeError, function() {
f.apply(undefined);

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
function f() { "use strict"; return gNonStrict();};
function f() { "use strict"; gNonStrict();};
var o = {};
assert.throws(TypeError, function() {

View File

@ -11,7 +11,7 @@ flags: [noStrict]
includes: [fnGlobalObject.js]
---*/
function f() { "use strict"; return gNonStrict();};
function f() { "use strict"; gNonStrict();};
assert.throws(TypeError, function() {
f.apply(fnGlobalObject());

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
function f() { "use strict"; return gNonStrict();};
function f() { "use strict"; gNonStrict();};
assert.throws(TypeError, function() {
f.call();

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
function f() { "use strict"; return gNonStrict();};
function f() { "use strict"; gNonStrict();};
assert.throws(TypeError, function() {
f.call(null);

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
function f() { "use strict"; return gNonStrict();};
function f() { "use strict"; gNonStrict();};
assert.throws(TypeError, function() {
f.call(undefined);

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
function f() { "use strict"; return gNonStrict();};
function f() { "use strict"; gNonStrict();};
var o = {};
assert.throws(TypeError, function() {

View File

@ -11,7 +11,7 @@ flags: [noStrict]
includes: [fnGlobalObject.js]
---*/
function f() { "use strict"; return gNonStrict();};
function f() { "use strict"; gNonStrict();};
assert.throws(TypeError, function() {
f.call(fnGlobalObject());

View File

@ -13,7 +13,7 @@ flags: [noStrict]
assert.throws(TypeError, function() {
(function () {
"use strict";
return gNonStrict();
gNonStrict();
})();
});

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
function f() { "use strict"; return gNonStrict();};
function f() { "use strict"; gNonStrict();};
assert.throws(TypeError, function() {
f.bind()();

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
function f() { "use strict"; return gNonStrict();};
function f() { "use strict"; gNonStrict();};
assert.throws(TypeError, function() {
f.bind(null)();

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
function f() { "use strict"; return gNonStrict();};
function f() { "use strict"; gNonStrict();};
assert.throws(TypeError, function() {
f.bind(undefined)();

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
function f() { "use strict"; return gNonStrict();};
function f() { "use strict"; gNonStrict();};
var o = {};
assert.throws(TypeError, function() {

View File

@ -11,7 +11,7 @@ flags: [noStrict]
includes: [fnGlobalObject.js]
---*/
function f() { "use strict"; return gNonStrict();};
function f() { "use strict"; gNonStrict();};
assert.throws(TypeError, function() {
f.bind(fnGlobalObject())();

View File

@ -11,7 +11,7 @@ flags: [noStrict]
---*/
function f() { return gNonStrict();};
function foo() { "use strict"; return f();}
function foo() { "use strict"; f();}
foo();

View File

@ -11,7 +11,7 @@ flags: [noStrict]
---*/
function f() {return gNonStrict();};
(function () {"use strict"; return Function("return f();")(); })();
(function () {"use strict"; Function("return f();")(); })();
function gNonStrict() {

View File

@ -11,7 +11,7 @@ flags: [noStrict]
---*/
function f() { return gNonStrict();};
(function () {"use strict"; return f.apply();})();
(function () {"use strict"; f.apply();})();
function gNonStrict() {

View File

@ -11,7 +11,7 @@ flags: [noStrict]
---*/
function f() { return gNonStrict();};
(function () {"use strict"; return f.apply(null); })();
(function () {"use strict"; f.apply(null); })();
function gNonStrict() {

View File

@ -11,7 +11,7 @@ flags: [noStrict]
---*/
function f() { return gNonStrict();};
(function () {"use strict"; return f.apply(undefined); })();
(function () {"use strict"; f.apply(undefined); })();
function gNonStrict() {

View File

@ -12,7 +12,7 @@ flags: [noStrict]
function f() { return gNonStrict();};
var o = {};
(function () {"use strict"; return f.apply(o); })();
(function () {"use strict"; f.apply(o); })();
function gNonStrict() {

View File

@ -12,7 +12,7 @@ includes: [fnGlobalObject.js]
---*/
function f() { return gNonStrict();};
(function () {"use strict"; return f.apply(fnGlobalObject()); })();
(function () {"use strict"; f.apply(fnGlobalObject()); })();
function gNonStrict() {

View File

@ -11,7 +11,7 @@ flags: [noStrict]
---*/
function f() { return gNonStrict();};
(function () {"use strict"; return f.call();})();
(function () {"use strict"; f.call();})();
function gNonStrict() {

View File

@ -11,7 +11,7 @@ flags: [noStrict]
---*/
function f() { return gNonStrict();};
(function () {"use strict"; return f.call(null);})();
(function () {"use strict"; f.call(null);})();
function gNonStrict() {

View File

@ -11,7 +11,7 @@ flags: [noStrict]
---*/
function f() { return gNonStrict();};
(function () {"use strict"; return f.call(undefined); })();
(function () {"use strict"; f.call(undefined); })();
function gNonStrict() {

View File

@ -12,7 +12,7 @@ flags: [noStrict]
function f() { return gNonStrict();};
var o = {};
(function () {"use strict"; return f.call(o); })();
(function () {"use strict"; f.call(o); })();
function gNonStrict() {

View File

@ -12,7 +12,7 @@ includes: [fnGlobalObject.js]
---*/
function f() { return gNonStrict();};
(function () {"use strict"; return f.call(fnGlobalObject()); })();
(function () {"use strict"; f.call(fnGlobalObject()); })();
function gNonStrict() {

View File

@ -11,7 +11,7 @@ flags: [noStrict]
---*/
function f() { return gNonStrict();};
(function () {"use strict"; return f.bind()();})();
(function () {"use strict"; f.bind()();})();
function gNonStrict() {

View File

@ -10,7 +10,7 @@ description: >
flags: [noStrict]
---*/
var f = Function("\"use strict\";\nreturn gNonStrict();");
var f = Function("\"use strict\";\ngNonStrict();");
assert.throws(TypeError, function() {
f();

View File

@ -11,7 +11,7 @@ flags: [noStrict]
---*/
function f() { return gNonStrict();};
(function () {"use strict"; return f.bind(null)(); })();
(function () {"use strict"; f.bind(null)(); })();
function gNonStrict() {

View File

@ -11,7 +11,7 @@ flags: [noStrict]
---*/
function f() { return gNonStrict();};
(function () {"use strict"; return f.bind(undefined)(); })();
(function () {"use strict"; f.bind(undefined)(); })();
function gNonStrict() {

View File

@ -12,7 +12,7 @@ flags: [noStrict]
function f() { return gNonStrict();};
var o = {};
(function () {"use strict"; return f.bind(o)(); })();
(function () {"use strict"; f.bind(o)(); })();
function gNonStrict() {

View File

@ -12,7 +12,7 @@ includes: [fnGlobalObject.js]
---*/
function f() { return gNonStrict();};
(function () {"use strict"; return f.bind(fnGlobalObject())(); })();
(function () {"use strict"; f.bind(fnGlobalObject())(); })();
function gNonStrict() {

View File

@ -16,7 +16,7 @@ var gNonStrict = function () {
function f() {
"use strict";
return gNonStrict();
gNonStrict();
}
assert.throws(TypeError, function() {

View File

@ -14,7 +14,7 @@ var gNonStrict = Function("return gNonStrict.caller || gNonStrict.caller.throwTy
function f() {
"use strict";
return gNonStrict();
gNonStrict();
}
assert.throws(TypeError, function() {

View File

@ -14,7 +14,7 @@ var gNonStrict = gNonStrictBindee.bind(null);
function f() {
"use strict";
return gNonStrict();
gNonStrict();
}
assert.throws(TypeError, function() {

View File

@ -12,14 +12,12 @@ info: >
es5id: 7.9_A5.7_T1
description: Try use Variable1 \n ++ \n ++ \n Variable2 construction
negative: ReferenceError
---*/
var x=0, y=0;
assert.throws(ReferenceError, function() {
var z=
x
++
++
y
});

View File

@ -5,7 +5,6 @@ es6id: 13.1
description: >
const: block local closure [[Get]] before initialization.
(TDZ, Temporal Dead Zone)
negative: ReferenceError
---*/
{
function f() { return x + 1; }