mirror of https://github.com/tc39/test262.git
Fixed some strict metadata.
This commit is contained in:
parent
2bf9e7e2a0
commit
305a2bb676
|
@ -6,7 +6,7 @@
|
|||
* @section: 8.5, 7.8.3;
|
||||
* @assertion: Globally defined variable NaN has not been altered by program execution;
|
||||
* @description: Try alter globally defined variable NaN;
|
||||
* @strict_mode_negative
|
||||
* @noStrict
|
||||
*/
|
||||
|
||||
Number.NaN = 1;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @section: 8.6.1, 15.2.2, 15.8;
|
||||
* @assertion: A property can have attribute ReadOnly like E in Math;
|
||||
* @description: Try change Math.E property;
|
||||
* @strict_mode_negative
|
||||
* @noStrict
|
||||
*/
|
||||
|
||||
var __e = Math.E;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @section: 8.6.1, 15.7;
|
||||
* @assertion: A property can have attribute DontDelete like NaN propertie of Number object;
|
||||
* @description: Try to delete Number.NaN;
|
||||
* @strict_mode_negative
|
||||
* @noStrict
|
||||
*/
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//CHECK#1
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @section: 8.6.2.3, 8.6.2.2, 8.6.1;
|
||||
* @assertion: If the property has the ReadOnly attribute, [[CanPut]](P) return false;
|
||||
* @description: Try put other value for Math.E property;
|
||||
* @strict_mode_negative
|
||||
* @noStrict
|
||||
*/
|
||||
|
||||
var __e = Math.E;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* @assertion: When the [[Delete]] method of O is called with property name P,
|
||||
* and If the property has the DontDelete attribute, return false;
|
||||
* @description: Try to delete Math.E, that has the DontDelete attribute;
|
||||
* @strict_mode_negative
|
||||
* @noStrict
|
||||
*/
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @section: 8.7;
|
||||
* @assertion: Delete unary operator can't delete object to be referenced;
|
||||
* @description: Delete referenced object, var __ref = obj;
|
||||
* @strict_mode_negative
|
||||
* @noStrict
|
||||
*/
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
* declarations into the global scope
|
||||
* @onlyStrict
|
||||
*/
|
||||
"use strict";
|
||||
if (!('foo' in this)) {
|
||||
(1,eval)('"use strict"; var foo = 88;');
|
||||
if ('foo' in this) {
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
* @description When calling a strict anonymous function as a
|
||||
* function, "this" should be bound to undefined.
|
||||
* @onlyStrict
|
||||
*/
|
||||
|
||||
*/
|
||||
"use strict";
|
||||
var that = (function() { return this; })();
|
||||
if (that !== undefined) {
|
||||
$ERROR('#1: "this" leaked as: ' + that);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* non-standard property.
|
||||
* @onlyStrict
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
var deleted = 'unassigned';
|
||||
try {
|
||||
deleted = delete RegExp.leftContext;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
* function object.
|
||||
* @onlyStrict
|
||||
*/
|
||||
"use strict";
|
||||
var poison = Object.getOwnPropertyDescriptor(function() {}, 'caller').get;
|
||||
|
||||
if (typeof poison !== 'function') {
|
||||
|
|
|
@ -6,4 +6,5 @@
|
|||
* getOwnPropertyDescriptor too
|
||||
* @onlyStrict
|
||||
*/
|
||||
"use strict";
|
||||
Object.getOwnPropertyDescriptor(function(){}, 'caller');
|
||||
|
|
|
@ -6,4 +6,5 @@
|
|||
* getOwnPropertyDescriptor too
|
||||
* @onlyStrict
|
||||
*/
|
||||
"use strict";
|
||||
Object.getOwnPropertyDescriptor(function(){}, 'arguments');
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
* hasOwnProperty too
|
||||
* @onlyStrict
|
||||
*/
|
||||
"use strict";
|
||||
(function(){}).hasOwnProperty('caller');
|
||||
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
* hasOwnProperty too
|
||||
* @onlyStrict
|
||||
*/
|
||||
"use strict";
|
||||
(function(){}).hasOwnProperty('arguments');
|
||||
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
* "in" too
|
||||
* @onlyStrict
|
||||
*/
|
||||
"use strict";
|
||||
'caller' in function() {};
|
||||
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
* "in" too
|
||||
* @onlyStrict
|
||||
*/
|
||||
"use strict";
|
||||
'arguments' in function() {};
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
* Object.getOwnPropertyNames on a strict function are names that
|
||||
* hasOwnProperty agrees are own properties.
|
||||
* @onlyStrict
|
||||
*/
|
||||
|
||||
*/
|
||||
"use strict";
|
||||
function foo() {}
|
||||
|
||||
var names = Object.getOwnPropertyNames(foo);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @section: 15.8.1.1;
|
||||
* @assertion: Value Property E of the Math Object has the attribute DontDelete;
|
||||
* @description: Checking if Math.E property has the attribute DontDelete;
|
||||
* @strict_mode_negative
|
||||
* @noStrict
|
||||
*/
|
||||
|
||||
// CHECK#1
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
* @onlyStrict
|
||||
* @bestPractice
|
||||
* http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
|
||||
*/
|
||||
|
||||
*/
|
||||
"use strict";
|
||||
{
|
||||
function __func(){}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
* @onlyStrict
|
||||
* @bestPractice
|
||||
* http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
|
||||
*/
|
||||
|
||||
*/
|
||||
"use strict";
|
||||
if (true) {
|
||||
function __func(){};
|
||||
} else {
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
* @onlyStrict
|
||||
* @bestPractice
|
||||
* http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
|
||||
*/
|
||||
|
||||
*/
|
||||
"use strict";
|
||||
(function(){
|
||||
if (true) {
|
||||
function __func(){};
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
* @onlyStrict
|
||||
* @bestPractice
|
||||
* http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
|
||||
*/
|
||||
|
||||
*/
|
||||
"use strict";
|
||||
do {
|
||||
function __func(){};
|
||||
} while(0);
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
* @onlyStrict
|
||||
* @bestPractice
|
||||
* http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
|
||||
*/
|
||||
|
||||
*/
|
||||
"use strict";
|
||||
(function(){
|
||||
do {
|
||||
function __func(){};
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
* @bestPractice
|
||||
* http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
while (0) {
|
||||
function __func(){};
|
||||
};
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
* @bestPractice
|
||||
* http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
(function(){
|
||||
while (0) {
|
||||
function __func(){};
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* @bestPractice
|
||||
* http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
for (x in this) {
|
||||
function __func(){};
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
* @bestPractice
|
||||
* http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
(function(){
|
||||
for (x in this) {
|
||||
function __func(){};
|
||||
|
|
Loading…
Reference in New Issue