mirror of
https://github.com/tc39/test262.git
synced 2025-07-31 01:44:54 +02:00
Add missing variable declarations (issue #35) Split S12.6.3_A10 and S12.6.3_A10.1 because both files seem to test implicit global variables (issue #35) Changes (issue #35) - Add missing noStrict flags. - Change 13.2-15-1 and 13.2-18-1 to use assert.js and propertyHelper.js (simplifies writable and configurable checks while in strict mode). - Add variable declarations for globals. - Create copies of S13.2.1_A6_T1 and S13.2.1_A6_T2 instead of adding variable declarations, because both files seem to test implicit global variables. - Split S13_A14 and S13_A16 to work in strict mode. - Remove assignment to .name property. Add missing noStrict flags (issue #35) Add missing noStrict flags and variable declarations (issue #35) Add missing noStrict flags (issue #35)
53 lines
1.9 KiB
JavaScript
53 lines
1.9 KiB
JavaScript
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
info: Nested "var-loops" nine blocks depth is evaluated properly
|
|
es5id: 12.6.3_A10
|
|
description: >
|
|
Checking if executing nested "var-loops" nine blocks depth is
|
|
evaluated properly
|
|
flags: [noStrict]
|
|
---*/
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//CHECK#
|
|
try {
|
|
__in__deepest__loop=__in__deepest__loop;
|
|
} catch (e) {
|
|
$ERROR('#1: "__in__deepest__loop=__in__deepest__loop" does not lead to throwing exception');
|
|
}
|
|
//
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
__str="";
|
|
|
|
for( index0=0; index0<=1; index0++) {
|
|
for( index1=0; index1<=index0; index1++) {
|
|
for( index2=0; index2<=index1; index2++) {
|
|
for( index3=0; index3<=index2; index3++) {
|
|
for( index4=0; index4<=index3; index4++) {
|
|
for( index5=0; index5<=index4; index5++) {
|
|
for( index6=0; index6<=index5; index6++) {
|
|
for( index7=0; index7<=index6; index7++) {
|
|
for( index8=0; index8<=index1; index8++) {
|
|
var __in__deepest__loop;
|
|
__str+=""+index0+index1+index2+index3+index4+index5+index6+index7+index8+'\n';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//CHECK#2
|
|
if (__str!== "000000000\n100000000\n110000000\n110000001\n111000000\n111000001\n111100000\n111100001\n111110000\n111110001\n111111000\n111111001\n111111100\n111111101\n111111110\n111111111\n") {
|
|
$ERROR('#2: __str === "000000000\\n100000000\\n110000000\\n110000001\\n111000000\\n111000001\\n111100000\\n111100001\\n111110000\\n111110001\\n111111000\\n111111001\\n111111100\\n111111101\\n111111110\\n111111111\\n". Actual: __str ==='+ __str );
|
|
}
|
|
//
|
|
//////////////////////////////////////////////////////////////////////////////
|