Skip to content
Snippets Groups Projects
Commit aa67d8e5 authored by Mark Miller's avatar Mark Miller
Browse files

Regenerated

parent 9d3bab70
No related branches found
No related tags found
No related merge requests found
Showing
with 190 additions and 70 deletions
File deleted
...@@ -6,26 +6,26 @@ ...@@ -6,26 +6,26 @@
* *
* @path 08_Types/8.6_The_Object_Type/8.6.2_Internal_Properties_and_Methods/S8.6.2_A5_T1.js * @path 08_Types/8.6_The_Object_Type/8.6.2_Internal_Properties_and_Methods/S8.6.2_A5_T1.js
* @description Call function-property of object, property defined * @description Call function-property of object, property defined
* as screen = {touch:function(){count++}} * as testScreen = {touch:function(){count++}}
*/ */
this.count=0; this.count=0;
var screen = {touch:function(){count++}}; var testScreen = {touch:function(){count++}};
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#1 //CHECK#1
screen.touch(); testScreen.touch();
if (count !==1) { if (count !==1) {
$ERROR('#1: this.count=0; screen = {touch:function(){count++}}; screen.touch(); count === 1. Actual: ' + (count)); $ERROR('#1: this.count=0; testScreen = {touch:function(){count++}}; testScreen.touch(); count === 1. Actual: ' + (count));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
//CHECK#2 //CHECK#2
screen['touch'](); testScreen['touch']();
if (count !==2) { if (count !==2) {
$ERROR('#2: this.count=0; screen = {touch:function(){count++}}; screen.touch(); screen[\'touch\'](); count === 2. Actual: ' + (count)); $ERROR('#2: this.count=0; testScreen = {touch:function(){count++}}; testScreen.touch(); testScreen[\'touch\'](); count === 2. Actual: ' + (count));
} }
// //
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
......
File deleted
File deleted
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* FunctionExpession within a "for-in" Expression is allowed
*
* @path 12_Statement/12.6_Iteration_Statements/12.6.4_The_for_in_Statement/S12.6.4_A14_T1.js
* @description Using "function __func(){return 0;}" as Expession
*/
//////////////////////////////////////////////////////////////////////////////
//CHECK#
for(x in function __func(){return 0;}){
if (x=="prototype")
var __reached = 1;
};
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__reached !== 1) {
$ERROR('#2: function expession inside of for-in expression is allowed');
}
//
//////////////////////////////////////////////////////////////////////////////
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* DecimalEscape :: DecimalIntegerLiteral [lookahead not in DecimalDigit]
*
* @path 15_Native/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.11_DecimalEscape/S15.10.2.11_A1_T2.js
* @description It is an error if n is greater than the total number of left capturing parentheses in the entire regular expression
* @negative
*/
/\1/.exec("");
/\2/.exec("");
/\3/.exec("");
/\4/.exec("");
/\5/.exec("");
/\6/.exec("");
/\7/.exec("");
/\8/.exec("");
/\9/.exec("");
/\10/.exec("");
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* DecimalEscape :: DecimalIntegerLiteral [lookahead not in DecimalDigit]
*
* @path 15_Native/15.10_RegExp_Objects/15.10.2_Pattern_Semantics/15.10.2.11_DecimalEscape/S15.10.2.11_A1_T3.js
* @description It is an error if n is greater than the total number of left capturing parentheses in the entire regular expression
* @negative
*/
/(?:A)\2/.exec("AA");
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* The production Block { } in strict code can't contain function
* declaration;
*
* @path bestPractice/Sbp_A1_T1.js
* @description Trying to declare function at the Block statement
* @onlyStrict
* @negative SyntaxError
* @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
*/
"use strict";
{
function __func(){}
}
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* Function declaration within an "if" statement in strict code is not
* allowed
*
* @path bestPractice/Sbp_A2_T1.js
* @description Declaring function within a strict "if" statement
* @onlyStrict
* @negative SyntaxError
* @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
*/
"use strict";
if (true) {
function __func(){};
} else {
function __func(){};
}
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* Function declaration within an "if" statement in strict code is not allowed;
*
* @path bestPractice/Sbp_A2_T2.js
* @description Declaring function within an "if" that is declared
* within the strict function
* @onlyStrict
* @negative SyntaxError
* @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
*/
"use strict";
(function(){
if (true) {
function __func(){};
} else {
function __func(){};
}
});
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* FunctionDeclaration within a "do-while" Block in strict code is not
* allowed
*
* @path bestPractice/Sbp_A3_T1.js
* @description Declaring function within a "do-while" loop
* @onlyStrict
* @negative SyntaxError
* @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
*/
"use strict";
do {
function __func(){};
} while(0);
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* FunctionDeclaration within a "do-while" Block in strict code is not allowed
*
* @path bestPractice/Sbp_A3_T2.js
* @description Declaring a function within a "do-while" loop that is
* within a strict function
* @onlyStrict
* @negative SyntaxError
* @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
*/
"use strict";
(function(){
do {
function __func(){};
} while(0);
});
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* FunctionDeclaration within a "while" Statement is not allowed
*
* @path bestPractice/Sbp_A4_T1.js
* @description Checking if declaring a function within a "while"
* Statement leads to an exception
* @onlyStrict
* @negative SyntaxError
* @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
*/
"use strict";
while (0) {
function __func(){};
};
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* FunctionDeclaration within a "while" Statement is not allowed
*
* @path bestPractice/Sbp_A4_T2.js
* @description Checking if declaring a function within a "while"
* Statement that is in a function call leads to an exception
* @onlyStrict
* @negative SyntaxError
* @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
*/
"use strict";
(function(){
while (0) {
function __func(){};
};
})();
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* FunctionDeclaration within a "for-in" Statement is not allowed
*
* @path bestPractice/Sbp_A5_T1.js
* @description Declaring function within a "for-in" Statement
* @onlyStrict
* @negative SyntaxError
* @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
*/
"use strict";
for (x in this) {
function __func(){};
}
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* FunctionDeclaration within a "for-in" Statement is not allowed
*
* @path bestPractice/Sbp_A5_T2.js
* @description Declaring function within a "for-in" Statement that is
* within a function call
* @onlyStrict
* @negative SyntaxError
* @bestPractice http://wiki.ecmascript.org/doku.php?id=conventions:no_non_standard_strict_decls
*/
"use strict";
(function(){
for (x in this) {
function __func(){};
}
})();
File deleted
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @path chapter08/8.7/8.7.2/8.7.2-3-a-2gs.js * @path chapter08/8.7/8.7.2/8.7.2-3-a-2gs.js
* @description Strict Mode - 'runtime' error is thrown before LeftHandSide evaluates to an unresolvable Reference * @description Strict Mode - 'runtime' error is thrown before LeftHandSide evaluates to an unresolvable Reference
* @onlyStrict * @onlyStrict
* @negative NotEarlyErrorString * @negative NotEarlyError
*/ */
"use strict"; "use strict";
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @path chapter13/13.0/13_4-17gs.js * @path chapter13/13.0/13_4-17gs.js
* @description Strict Mode - SourceElements is evaluated as strict mode code when a Function constructor is contained in strict mode code * @description Strict Mode - SourceElements is evaluated as strict mode code when a Function constructor is contained in strict mode code
* @onlyStrict * @onlyStrict
* @negative NotEarlyErrorString * @negative NotEarlyError
*/ */
"use strict"; "use strict";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment