Fixed some strict metadata.

This commit is contained in:
David Fugate 2011-09-24 17:19:43 -07:00
parent 2bf9e7e2a0
commit 305a2bb676
27 changed files with 34 additions and 26 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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
*/
//////////////////////////////////////////////////////////////////////////////

View File

@ -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
*/
//////////////////////////////////////////////////////////////////////////////

View File

@ -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) {

View File

@ -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);

View File

@ -10,7 +10,7 @@
* non-standard property.
* @onlyStrict
*/
"use strict";
var deleted = 'unassigned';
try {
deleted = delete RegExp.leftContext;

View File

@ -6,6 +6,7 @@
* function object.
* @onlyStrict
*/
"use strict";
var poison = Object.getOwnPropertyDescriptor(function() {}, 'caller').get;
if (typeof poison !== 'function') {

View File

@ -6,4 +6,5 @@
* getOwnPropertyDescriptor too
* @onlyStrict
*/
"use strict";
Object.getOwnPropertyDescriptor(function(){}, 'caller');

View File

@ -6,4 +6,5 @@
* getOwnPropertyDescriptor too
* @onlyStrict
*/
"use strict";
Object.getOwnPropertyDescriptor(function(){}, 'arguments');

View File

@ -6,5 +6,6 @@
* hasOwnProperty too
* @onlyStrict
*/
"use strict";
(function(){}).hasOwnProperty('caller');

View File

@ -6,5 +6,6 @@
* hasOwnProperty too
* @onlyStrict
*/
"use strict";
(function(){}).hasOwnProperty('arguments');

View File

@ -6,5 +6,6 @@
* "in" too
* @onlyStrict
*/
"use strict";
'caller' in function() {};

View File

@ -6,5 +6,6 @@
* "in" too
* @onlyStrict
*/
"use strict";
'arguments' in function() {};

View File

@ -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);

View File

@ -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

View File

@ -10,8 +10,8 @@
* @onlyStrict
* @bestPractice
* http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
*/
*/
"use strict";
{
function __func(){}
}

View File

@ -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 {

View File

@ -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(){};

View File

@ -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);

View File

@ -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(){};

View File

@ -11,7 +11,7 @@
* @bestPractice
* http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
*/
"use strict";
while (0) {
function __func(){};
};

View File

@ -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(){};

View File

@ -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(){};
}

View File

@ -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(){};