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