summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/tests/mozilla/ecma/Statements
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-03 18:28:41 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-03 18:28:41 -0800
commit648161bb0edfc3d43db63caed5cc5213bc6cb78f (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /JavaScriptCore/tests/mozilla/ecma/Statements
parenta65af38181ac7d34544586bdb5cd004de93897ad (diff)
downloadexternal_webkit-648161bb0edfc3d43db63caed5cc5213bc6cb78f.zip
external_webkit-648161bb0edfc3d43db63caed5cc5213bc6cb78f.tar.gz
external_webkit-648161bb0edfc3d43db63caed5cc5213bc6cb78f.tar.bz2
auto import from //depot/cupcake/@135843
Diffstat (limited to 'JavaScriptCore/tests/mozilla/ecma/Statements')
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.10-1.js151
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.10.js64
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.2-1.js70
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.5-1.js98
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.5-2.js96
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.1-1.js68
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-1.js75
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-2.js76
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-3.js67
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-4.js66
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-5.js71
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-6.js75
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-7.js72
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-8.js69
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-9-n.js65
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-1.js71
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-10.js112
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-11.js93
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-12.js100
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-19.js114
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-2.js66
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-3.js70
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-4.js193
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-5-n.js102
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-6-n.js102
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-7-n.js102
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-8-n.js102
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-9-n.js102
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.7-1-n.js67
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.8-1-n.js69
-rw-r--r--JavaScriptCore/tests/mozilla/ecma/Statements/12.9-1-n.js64
31 files changed, 0 insertions, 2712 deletions
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.10-1.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.10-1.js
deleted file mode 100644
index cf33b0a..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.10-1.js
+++ /dev/null
@@ -1,151 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.10-1.js
- ECMA Section: 12.10 The with statement
- Description:
- WithStatement :
- with ( Expression ) Statement
-
- The with statement adds a computed object to the front of the scope chain
- of the current execution context, then executes a statement with this
- augmented scope chain, then restores the scope chain.
-
- Semantics
-
- The production WithStatement : with ( Expression ) Statement is evaluated
- as follows:
- 1. Evaluate Expression.
- 2. Call GetValue(Result(1)).
- 3. Call ToObject(Result(2)).
- 4. Add Result(3) to the front of the scope chain.
- 5. Evaluate Statement using the augmented scope chain from step 4.
- 6. Remove Result(3) from the front of the scope chain.
- 7. Return Result(5).
-
- Discussion
- Note that no matter how control leaves the embedded Statement, whether
- normally or by some form of abrupt completion, the scope chain is always
- restored to its former state.
-
- Author: christine@netscape.com
- Date: 12 november 1997
-*/
-
- var SECTION = "12.10-1";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The with statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = getTestCases();
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
-function getTestCases() {
- var array = new Array();
- var item = 0;
-
- // although the scope chain changes, the this value is immutable for a given
- // execution context.
-
- array[item++] = new TestCase( SECTION,
- "with( new Number() ) { this +'' }",
- "[object global]",
- eval("with( new Number() ) { this +'' }") );
-
- // the object's functions and properties should override those of the
- // global object.
-
- array[item++] = new TestCase(
- SECTION,
- "var MYOB = new WithObject(true); with (MYOB) { parseInt() }",
- true,
- eval("var MYOB = new WithObject(true); with (MYOB) { parseInt() }") );
-
- array[item++] = new TestCase(
- SECTION,
- "var MYOB = new WithObject(false); with (MYOB) { NaN }",
- false,
- eval("var MYOB = new WithObject(false); with (MYOB) { NaN }") );
-
- array[item++] = new TestCase(
- SECTION,
- "var MYOB = new WithObject(NaN); with (MYOB) { Infinity }",
- Number.NaN,
- eval("var MYOB = new WithObject(NaN); with (MYOB) { Infinity }") );
-
- array[item++] = new TestCase(
- SECTION,
- "var MYOB = new WithObject(false); with (MYOB) { }; Infinity",
- Number.POSITIVE_INFINITY,
- eval("var MYOB = new WithObject(false); with (MYOB) { }; Infinity") );
-
-
- array[item++] = new TestCase(
- SECTION,
- "var MYOB = new WithObject(0); with (MYOB) { delete Infinity; Infinity }",
- Number.POSITIVE_INFINITY,
- eval("var MYOB = new WithObject(0); with (MYOB) { delete Infinity; Infinity }") );
-
- // let us leave the with block via a break.
-
- array[item++] = new TestCase(
- SECTION,
- "var MYOB = new WithObject(0); while (true) { with (MYOB) { Infinity; break; } } Infinity",
- Number.POSITIVE_INFINITY,
- eval("var MYOB = new WithObject(0); while (true) { with (MYOB) { Infinity; break; } } Infinity") );
-
- return ( array );
-}
-function WithObject( value ) {
- this.prop1 = 1;
- this.prop2 = new Boolean(true);
- this.prop3 = "a string";
- this.value = value;
-
- // now we will override global functions
-
- this.parseInt = new Function( "return this.value" );
- this.NaN = value;
- this.Infinity = value;
- this.unescape = new Function( "return this.value" );
- this.escape = new Function( "return this.value" );
- this.eval = new Function( "return this.value" );
- this.parseFloat = new Function( "return this.value" );
- this.isNaN = new Function( "return this.value" );
- this.isFinite = new Function( "return this.value" );
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.10.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.10.js
deleted file mode 100644
index 08e8ebc..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.10.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.10-1.js
- ECMA Section: 12.10 The with statement
- Description:
-
- Author: christine@netscape.com
- Date: 11 september 1997
-*/
- var SECTION = "12.10-1";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The with statement";
-
- var testcases = getTestCases();
-
- writeHeaderToLog( SECTION +" "+ TITLE);
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
-function getTestCases() {
- var array = new Array();
- var item = 0;
-
- array[item++] = new TestCase( SECTION,
- "var x; with (7) x = valueOf(); typeof x;",
- "number",
- eval("var x; with(7) x = valueOf(); typeof x;") );
- return ( array );
-}
-
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.2-1.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.2-1.js
deleted file mode 100644
index 44f64b8..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.2-1.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.2-1.js
- ECMA Section: The variable statement
- Description:
-
- If the variable statement occurs inside a FunctionDeclaration, the
- variables are defined with function-local scope in that function, as
- described in section 10.1.3. Otherwise, they are defined with global
- scope, that is, they are created as members of the global object, as
- described in section 0. Variables are created when the execution scope
- is entered. A Block does not define a new execution scope. Only Program and
- FunctionDeclaration produce a new scope. Variables are initialized to the
- undefined value when created. A variable with an Initializer is assigned
- the value of its AssignmentExpression when the VariableStatement is executed,
- not when the variable is created.
-
- Author: christine@netscape.com
- Date: 12 november 1997
-*/
-
- var SECTION = "12.2-1";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The variable statement";
-
- writeHeaderToLog( SECTION +" "+ TITLE);
-
- var testcases = new Array();
-
- testcases[tc] = new TestCase( "SECTION",
- "var x = 3; function f() { var a = x; var x = 23; return a; }; f()",
- void 0,
- eval("var x = 3; function f() { var a = x; var x = 23; return a; }; f()") );
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.5-1.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.5-1.js
deleted file mode 100644
index b0fe400..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.5-1.js
+++ /dev/null
@@ -1,98 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.5-1.js
- ECMA Section: The if statement
- Description:
-
- The production IfStatement : if ( Expression ) Statement else Statement
- is evaluated as follows:
-
- 1.Evaluate Expression.
- 2.Call GetValue(Result(1)).
- 3.Call ToBoolean(Result(2)).
- 4.If Result(3) is false, go to step 7.
- 5.Evaluate the first Statement.
- 6.Return Result(5).
- 7.Evaluate the second Statement.
- 8.Return Result(7).
-
- Author: christine@netscape.com
- Date: 12 november 1997
-*/
-
-
- var SECTION = "12.5-1";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The if statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
-
- var testcases = new Array();
-
- testcases[tc++] = new TestCase( SECTION,
- "var MYVAR; if ( true ) MYVAR='PASSED'; else MYVAR= 'FAILED';",
- "PASSED",
- eval("var MYVAR; if ( true ) MYVAR='PASSED'; else MYVAR= 'FAILED';") );
-
- testcases[tc++] = new TestCase( SECTION,
- "var MYVAR; if ( false ) MYVAR='FAILED'; else MYVAR= 'PASSED';",
- "PASSED",
- eval("var MYVAR; if ( false ) MYVAR='FAILED'; else MYVAR= 'PASSED';") );
-
- testcases[tc++] = new TestCase( SECTION,
- "var MYVAR; if ( new Boolean(true) ) MYVAR='PASSED'; else MYVAR= 'FAILED';",
- "PASSED",
- eval("var MYVAR; if ( new Boolean(true) ) MYVAR='PASSED'; else MYVAR= 'FAILED';") );
-
- testcases[tc++] = new TestCase( SECTION,
- "var MYVAR; if ( new Boolean(false) ) MYVAR='PASSED'; else MYVAR= 'FAILED';",
- "PASSED",
- eval("var MYVAR; if ( new Boolean(false) ) MYVAR='PASSED'; else MYVAR= 'FAILED';") );
-
- testcases[tc++] = new TestCase( SECTION,
- "var MYVAR; if ( 1 ) MYVAR='PASSED'; else MYVAR= 'FAILED';",
- "PASSED",
- eval("var MYVAR; if ( 1 ) MYVAR='PASSED'; else MYVAR= 'FAILED';") );
-
- testcases[tc++] = new TestCase( SECTION,
- "var MYVAR; if ( 0 ) MYVAR='FAILED'; else MYVAR= 'PASSED';",
- "PASSED",
- eval("var MYVAR; if ( 0 ) MYVAR='FAILED'; else MYVAR= 'PASSED';") );
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.5-2.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.5-2.js
deleted file mode 100644
index 9b30bfd..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.5-2.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.5-2.js
- ECMA Section: The if statement
- Description:
-
- The production IfStatement : if ( Expression ) Statement else Statement
- is evaluated as follows:
-
- 1.Evaluate Expression.
- 2.Call GetValue(Result(1)).
- 3.Call ToBoolean(Result(2)).
- 4.If Result(3) is false, go to step 7.
- 5.Evaluate the first Statement.
- 6.Return Result(5).
- 7.Evaluate the second Statement.
- 8.Return Result(7).
-
- Author: christine@netscape.com
- Date: 12 november 1997
-*/
-
- var SECTION = "12.5-2";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The if statement" ;
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = new Array();
-
- testcases[tc++] = new TestCase( SECTION,
- "var MYVAR; if ( true ) MYVAR='PASSED'; MYVAR",
- "PASSED",
- eval("var MYVAR; if ( true ) MYVAR='PASSED'; MYVAR") );
-
- testcases[tc++] = new TestCase( SECTION,
- "var MYVAR; if ( false ) MYVAR='FAILED'; MYVAR;",
- "PASSED",
- eval("var MYVAR=\"PASSED\"; if ( false ) MYVAR='FAILED'; MYVAR;") );
-
- testcases[tc++] = new TestCase( SECTION,
- "var MYVAR; if ( new Boolean(true) ) MYVAR='PASSED'; MYVAR",
- "PASSED",
- eval("var MYVAR; if ( new Boolean(true) ) MYVAR='PASSED'; MYVAR") );
-
- testcases[tc++] = new TestCase( SECTION,
- "var MYVAR; if ( new Boolean(false) ) MYVAR='PASSED'; MYVAR",
- "PASSED",
- eval("var MYVAR; if ( new Boolean(false) ) MYVAR='PASSED'; MYVAR") );
-
- testcases[tc++] = new TestCase( SECTION,
- "var MYVAR; if ( 1 ) MYVAR='PASSED'; MYVAR",
- "PASSED",
- eval("var MYVAR; if ( 1 ) MYVAR='PASSED'; MYVAR") );
-
- testcases[tc++] = new TestCase( SECTION,
- "var MYVAR; if ( 0 ) MYVAR='FAILED'; MYVAR;",
- "PASSED",
- eval("var MYVAR=\"PASSED\"; if ( 0 ) MYVAR='FAILED'; MYVAR;") );
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.1-1.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.1-1.js
deleted file mode 100644
index 0b43603..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.1-1.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.1-1.js
- ECMA Section: The while statement
- Description:
-
-
- Author: christine@netscape.com
- Date: 12 november 1997
-*/
-
- var SECTION = "12.6.1-1";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The While statement";
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = new Array();
-
- testcases[tc++] = new TestCase( SECTION,
- "var MYVAR = 0; while( MYVAR++ < 100) { if ( MYVAR < 100 ) break; } MYVAR ",
- 1,
- eval("var MYVAR = 0; while( MYVAR++ < 100) { if ( MYVAR < 100 ) break; } MYVAR "));
-
- testcases[tc++] = new TestCase( SECTION,
- "var MYVAR = 0; while( MYVAR++ < 100) { if ( MYVAR < 100 ) continue; else break; } MYVAR ",
- 100,
- eval("var MYVAR = 0; while( MYVAR++ < 100) { if ( MYVAR < 100 ) continue; else break; } MYVAR "));
-
- testcases[tc++] = new TestCase( SECTION,
- "function MYFUN( arg1 ) { while ( arg1++ < 100 ) { if ( arg1 < 100 ) return arg1; } }; MYFUN(1)",
- 2,
- eval("function MYFUN( arg1 ) { while ( arg1++ < 100 ) { if ( arg1 < 100 ) return arg1; } }; MYFUN(1)"));
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-1.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-1.js
deleted file mode 100644
index 387cf14..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-1.js
+++ /dev/null
@@ -1,75 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.2-1.js
- ECMA Section: 12.6.2 The for Statement
-
- 1. first expression is not present.
- 2. second expression is not present
- 3. third expression is not present
-
-
- Author: christine@netscape.com
- Date: 15 september 1997
-*/
-
- var SECTION = "12.6.2-1";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = new getTestCases();
-
- test();
-
-function getTestCases() {
- var array = new Array();
- array[0] = new TestCase( "12.6.2-1", "for statement", 99, "" );
- return ( array );
-}
-
-function testprogram() {
- myVar = 0;
-
- for ( ; ; ) {
- if ( ++myVar == 99 )
- break;
- }
-
- return myVar;
-}
-function test() {
- testcases[0].actual = testprogram();
-
- testcases[0].passed = writeTestCaseResult(
- testcases[0].expect,
- testcases[0].actual,
- testcases[0].description +" = "+ testcases[0].actual );
-
- testcases[0].reason += ( testcases[0].passed ) ? "" : "wrong value ";
-
- stopTest();
-
- return ( testcases );
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-2.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-2.js
deleted file mode 100644
index 788a5d0..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-2.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.2-2.js
- ECMA Section: 12.6.2 The for Statement
-
- 1. first expression is not present.
- 2. second expression is not present
- 3. third expression is present
-
-
- Author: christine@netscape.com
- Date: 15 september 1997
-*/
- var SECTION = "12.6.2-2";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = getTestCases();
-
- test();
-
-function getTestCases() {
- var array = new Array();
- array[0] = new TestCase( SECTION, "for statement", 99, "" );
- return ( array );
-}
-
-function testprogram() {
- myVar = 0;
-
- for ( ; ; myVar++ ) {
- if ( myVar < 99 ) {
- continue;
- } else {
- break;
- }
- }
-
- return myVar;
-}
-function test() {
- testcases[0].actual = testprogram();
-
- testcases[0].passed = writeTestCaseResult(
- testcases[0].expect,
- testcases[0].actual,
- testcases[0].description +" = "+ testcases[0].actual );
-
- testcases[0].reason += ( testcases[0].passed ) ? "" : "wrong value ";
-
- stopTest();
- return ( testcases );
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-3.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-3.js
deleted file mode 100644
index 706f224..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-3.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.2-3.js
- ECMA Section: 12.6.2 The for Statement
-
- 1. first expression is not present.
- 2. second expression is present
- 3. third expression is present
-
-
- Author: christine@netscape.com
- Date: 15 september 1997
-*/
- var SECTION = "12.6.2-3";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = new Array();
- testcases[0] = new TestCase( SECTION, "for statement", 100, "" );
-
- test();
-
-function testprogram() {
- myVar = 0;
-
- for ( ; myVar < 100 ; myVar++ ) {
- continue;
- }
-
- return myVar;
-}
-function test() {
- testcases[0].actual = testprogram();
-
- testcases[0].passed = writeTestCaseResult(
- testcases[0].expect,
- testcases[0].actual,
- testcases[0].description +" = "+ testcases[0].actual );
-
- testcases[0].reason += ( testcases[0].passed ) ? "" : "wrong value ";
- stopTest();
-
- return ( testcases );
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-4.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-4.js
deleted file mode 100644
index 887dea4..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-4.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.2-4.js
- ECMA Section: 12.6.2 The for Statement
-
- 1. first expression is not present.
- 2. second expression is present
- 3. third expression is present
-
-
- Author: christine@netscape.com
- Date: 15 september 1997
-*/
-
- var SECTION = "12.6.2-4";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = new Array();
-
- testcases[testcases.length] = new TestCase( SECTION,
- "for statement", 100, testprogram() );
-
- test();
-
-function testprogram() {
- myVar = 0;
-
- for ( ; myVar < 100 ; myVar++ ) {
- }
-
- return myVar;
-}
-function test() {
- testcases[0].passed = writeTestCaseResult(
- testcases[0].expect,
- testcases[0].actual,
- testcases[0].description +" = "+ testcases[0].actual );
-
- testcases[0].reason += ( testcases[0].passed ) ? "" : "wrong value ";
- stopTest();
- return ( testcases );
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-5.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-5.js
deleted file mode 100644
index 3404ecf..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-5.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.2-5.js
- ECMA Section: 12.6.2 The for Statement
-
- 1. first expression is not present.
- 2. second expression is present
- 3. third expression is present
-
-
- Author: christine@netscape.com
- Date: 15 september 1997
-*/
- var SECTION = "12.6.2-5";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = getTestCases();
-
- test();
-
-function getTestCases() {
- var array = new Array();
- array[0] = new TestCase( SECTION, "for statement", 99, "" );
- return ( array );
-}
-
-function testprogram() {
- myVar = 0;
-
- for ( ; myVar < 100 ; myVar++ ) {
- if (myVar == 99)
- break;
- }
-
- return myVar;
-}
-function test() {
- testcases[0].actual = testprogram();
- testcases[0].passed = writeTestCaseResult(
- testcases[0].expect,
- testcases[0].actual,
- testcases[0].description +" = "+ testcases[0].actual );
-
- testcases[0].reason += ( testcases[0].passed ) ? "" : "wrong value ";
- stopTest();
- return ( testcases );
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-6.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-6.js
deleted file mode 100644
index 1ed50d8..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-6.js
+++ /dev/null
@@ -1,75 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.2-6.js
- ECMA Section: 12.6.2 The for Statement
-
- 1. first expression is present.
- 2. second expression is not present
- 3. third expression is present
-
-
- Author: christine@netscape.com
- Date: 15 september 1997
-*/
- var SECTION = "12.6.2-6";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = getTestCases();
-
- test();
-
-function getTestCases() {
- var array = new Array();
- array[0] = new TestCase( "12.6.2-6", "for statement", 256, "" );
- return ( array );
-}
-
-function testprogram() {
- var myVar;
-
- for ( myVar=2; ; myVar *= myVar ) {
-
- if (myVar > 100)
- break;
- continue;
- }
-
- return myVar;
-}
-function test() {
- testcases[0].actual = testprogram();
-
- testcases[0].passed = writeTestCaseResult(
- testcases[0].expect,
- testcases[0].actual,
- testcases[0].description +" = "+ testcases[0].actual );
-
- testcases[0].reason += ( testcases[0].passed ) ? "" : "wrong value ";
-
- stopTest();
- return ( testcases );
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-7.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-7.js
deleted file mode 100644
index ec9f246..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-7.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.2-7.js
- ECMA Section: 12.6.2 The for Statement
-
- 1. first expression is present.
- 2. second expression is not present
- 3. third expression is present
-
-
- Author: christine@netscape.com
- Date: 15 september 1997
-*/
- var SECTION = "12.6.2-7";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = getTestCases();
-
- test();
-
-function getTestCases() {
- var array = new Array();
- array[0] = new TestCase( SECTION, "for statement", 256, "" );
- return ( array );
-}
-
-function testprogram() {
- var myVar;
-
- for ( myVar=2; myVar < 100 ; myVar *= myVar ) {
-
- continue;
- }
-
- return myVar;
-}
-function test() {
- testcases[0].actual = testprogram();
-
- testcases[0].passed = writeTestCaseResult(
- testcases[0].expect,
- testcases[0].actual,
- testcases[0].description +" = "+ testcases[0].actual );
-
- testcases[0].reason += ( testcases[0].passed ) ? "" : "wrong value ";
- stopTest();
- return ( testcases );
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-8.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-8.js
deleted file mode 100644
index ecabc06..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-8.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.2-8.js
- ECMA Section: 12.6.2 The for Statement
-
- 1. first expression is present.
- 2. second expression is present
- 3. third expression is present
-
-
- Author: christine@netscape.com
- Date: 15 september 1997
-*/
- var SECTION = "12.6.2-8";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = getTestCases();
-
- test();
-
-function getTestCases() {
- var array = new Array();
- array[0] = new TestCase( SECTION, "for statement", 256, "" );
- return ( array );
-}
-function testprogram() {
- var myVar;
-
- for ( myVar=2; myVar < 256; myVar *= myVar ) {
- }
-
- return myVar;
-}
-function test() {
- testcases[0].actual = testprogram();
-
- testcases[0].passed = writeTestCaseResult(
- testcases[0].expect,
- testcases[0].actual,
- testcases[0].description +" = "+ testcases[0].actual );
-
- testcases[0].reason += ( testcases[0].passed ) ? "" : "wrong value ";
- stopTest();
- return ( testcases );
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-9-n.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-9-n.js
deleted file mode 100644
index ef7c12e..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.2-9-n.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.2-9-n.js
- ECMA Section: 12.6.2 The for Statement
-
- 1. first expression is not present.
- 2. second expression is not present
- 3. third expression is not present
-
-
- Author: christine@netscape.com
- Date: 15 september 1997
-*/
-
-
- var SECTION = "12.6.2-9-n";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = new Array();
-
- testcases[testcases.length] = new TestCase( SECTION,
- "for (i)",
- "error",
- "" );
-
- for (i) {
- }
-
- test();
-
-function test() {
- testcases[0].passed = writeTestCaseResult(
- testcases[0].expect,
- testcases[0].actual,
- testcases[0].description +" = "+ testcases[0].actual );
-
- testcases[0].reason += ( testcases[0].passed ) ? "" : "wrong value ";
-
- stopTest();
- return ( testcases );
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-1.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-1.js
deleted file mode 100644
index 9b2aa2b..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-1.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.3-1.js
- ECMA Section: 12.6.3 The for...in Statement
- Description:
-
- Author: christine@netscape.com
- Date: 11 september 1997
-*/
-
- var SECTION = "12.6.3-1";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for..in statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = getTestCases();
-
- test();
-
-function getTestCases() {
- var array = new Array();
- var item = 0;
-
- array[item++] = new TestCase( SECTION,
- "var x; Number.prototype.foo = 34; for ( j in 7 ) x = j; x",
- "foo",
- eval("var x; Number.prototype.foo = 34; for ( j in 7 ){x = j;} x") );
-
- return ( array );
-}
-
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
-function MyObject(a, b, c, d, e) {
-
-
-} \ No newline at end of file
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-10.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-10.js
deleted file mode 100644
index f2f042b..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-10.js
+++ /dev/null
@@ -1,112 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.3-10.js
- ECMA Section: 12.6.3 The for...in Statement
- Description:
- The production IterationStatement : for ( LeftHandSideExpression in Expression )
- Statement is evaluated as follows:
-
- 1. Evaluate the Expression.
- 2. Call GetValue(Result(1)).
- 3. Call ToObject(Result(2)).
- 4. Let C be "normal completion".
- 5. Get the name of the next property of Result(3) that doesn't have the
- DontEnum attribute. If there is no such property, go to step 14.
- 6. Evaluate the LeftHandSideExpression (it may be evaluated repeatedly).
- 7. Call PutValue(Result(6), Result(5)). PutValue( V, W ):
- 1. If Type(V) is not Reference, generate a runtime error.
- 2. Call GetBase(V).
- 3. If Result(2) is null, go to step 6.
- 4. Call the [[Put]] method of Result(2), passing GetPropertyName(V)
- for the property name and W for the value.
- 5. Return.
- 6. Call the [[Put]] method for the global object, passing
- GetPropertyName(V) for the property name and W for the value.
- 7. Return.
- 8. Evaluate Statement.
- 9. If Result(8) is a value completion, change C to be "normal completion
- after value V" where V is the value carried by Result(8).
- 10. If Result(8) is a break completion, go to step 14.
- 11. If Result(8) is a continue completion, go to step 5.
- 12. If Result(8) is a return completion, return Result(8).
- 13. Go to step 5.
- 14. Return C.
-
- Author: christine@netscape.com
- Date: 11 september 1997
-*/
- var SECTION = "12.6.3-10";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for..in statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = new Array();
-
- // for ( LeftHandSideExpression in Expression )
- // LeftHandSideExpression:NewExpression:MemberExpression
-
- var count = 0;
- function f() { count++; return new Array("h","e","l","l","o"); }
-
- var result = "";
- for ( p in f() ) { result += f()[p] };
-
- testcases[testcases.length] = new TestCase( SECTION,
- "count = 0; result = \"\"; "+
- "function f() { count++; return new Array(\"h\",\"e\",\"l\",\"l\",\"o\"); }"+
- "for ( p in f() ) { result += f()[p] }; count",
- 6,
- count );
-
- testcases[testcases.length] = new TestCase( SECTION,
- "result",
- "hello",
- result );
-
- // LeftHandSideExpression:NewExpression:MemberExpression [ Expression ]
- // LeftHandSideExpression:NewExpression:MemberExpression . Identifier
- // LeftHandSideExpression:NewExpression:new MemberExpression Arguments
- // LeftHandSideExpression:NewExpression:PrimaryExpression:( Expression )
- // LeftHandSideExpression:CallExpression:MemberExpression Arguments
- // LeftHandSideExpression:CallExpression Arguments
- // LeftHandSideExpression:CallExpression [ Expression ]
- // LeftHandSideExpression:CallExpression . Identifier
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
-
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-11.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-11.js
deleted file mode 100644
index 579845a..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-11.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.3-11.js
- ECMA Section: 12.6.3 The for...in Statement
- Description:
- The production IterationStatement : for ( LeftHandSideExpression in Expression )
- Statement is evaluated as follows:
-
- 1. Evaluate the Expression.
- 2. Call GetValue(Result(1)).
- 3. Call ToObject(Result(2)).
- 4. Let C be "normal completion".
- 5. Get the name of the next property of Result(3) that doesn't have the
- DontEnum attribute. If there is no such property, go to step 14.
- 6. Evaluate the LeftHandSideExpression (it may be evaluated repeatedly).
- 7. Call PutValue(Result(6), Result(5)). PutValue( V, W ):
- 1. If Type(V) is not Reference, generate a runtime error.
- 2. Call GetBase(V).
- 3. If Result(2) is null, go to step 6.
- 4. Call the [[Put]] method of Result(2), passing GetPropertyName(V)
- for the property name and W for the value.
- 5. Return.
- 6. Call the [[Put]] method for the global object, passing
- GetPropertyName(V) for the property name and W for the value.
- 7. Return.
- 8. Evaluate Statement.
- 9. If Result(8) is a value completion, change C to be "normal completion
- after value V" where V is the value carried by Result(8).
- 10. If Result(8) is a break completion, go to step 14.
- 11. If Result(8) is a continue completion, go to step 5.
- 12. If Result(8) is a return completion, return Result(8).
- 13. Go to step 5.
- 14. Return C.
-
- Author: christine@netscape.com
- Date: 11 september 1997
-*/
- var SECTION = "12.6.3-11";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for..in statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = new Array();
-
-// 5. Get the name of the next property of Result(3) that doesn't have the
-// DontEnum attribute. If there is no such property, go to step 14.
-
- var result = "";
-
- for ( p in Number ) { result += String(p) };
-
- testcases[testcases.length] = new TestCase( SECTION,
- "result = \"\"; for ( p in Number ) { result += String(p) };",
- "",
- result );
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-12.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-12.js
deleted file mode 100644
index b5c4b18..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-12.js
+++ /dev/null
@@ -1,100 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.3-12.js
- ECMA Section: 12.6.3 The for...in Statement
- Description:
-
- This is a regression test for http://bugzilla.mozilla.org/show_bug.cgi?id=9802.
-
- The production IterationStatement : for ( LeftHandSideExpression in Expression )
- Statement is evaluated as follows:
-
- 1. Evaluate the Expression.
- 2. Call GetValue(Result(1)).
- 3. Call ToObject(Result(2)).
- 4. Let C be "normal completion".
- 5. Get the name of the next property of Result(3) that doesn't have the
- DontEnum attribute. If there is no such property, go to step 14.
- 6. Evaluate the LeftHandSideExpression (it may be evaluated repeatedly).
- 7. Call PutValue(Result(6), Result(5)). PutValue( V, W ):
- 1. If Type(V) is not Reference, generate a runtime error.
- 2. Call GetBase(V).
- 3. If Result(2) is null, go to step 6.
- 4. Call the [[Put]] method of Result(2), passing GetPropertyName(V)
- for the property name and W for the value.
- 5. Return.
- 6. Call the [[Put]] method for the global object, passing
- GetPropertyName(V) for the property name and W for the value.
- 7. Return.
- 8. Evaluate Statement.
- 9. If Result(8) is a value completion, change C to be "normal completion
- after value V" where V is the value carried by Result(8).
- 10. If Result(8) is a break completion, go to step 14.
- 11. If Result(8) is a continue completion, go to step 5.
- 12. If Result(8) is a return completion, return Result(8).
- 13. Go to step 5.
- 14. Return C.
-
- Author: christine@netscape.com
- Date: 11 september 1997
-*/
- var SECTION = "12.6.3-12";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for..in statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = new Array();
-
- var result = "PASSED";
-
- for ( aVar in this ) {
- if (aVar == "aVar") {
- result = "FAILED"
- }
- };
-
- testcases[testcases.length] = new TestCase(
- SECTION,
- "var result=''; for ( aVar in this ) { " +
- "if (aVar == 'aVar') {return a failure}; result",
- "PASSED",
- result );
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
-
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-19.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-19.js
deleted file mode 100644
index 4f386d8..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-19.js
+++ /dev/null
@@ -1,114 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.3-1.js
- ECMA Section: 12.6.3 The for...in Statement
- Description:
- The production IterationStatement : for ( LeftHandSideExpression in Expression )
- Statement is evaluated as follows:
-
- 1. Evaluate the Expression.
- 2. Call GetValue(Result(1)).
- 3. Call ToObject(Result(2)).
- 4. Let C be "normal completion".
- 5. Get the name of the next property of Result(3) that doesn't have the
- DontEnum attribute. If there is no such property, go to step 14.
- 6. Evaluate the LeftHandSideExpression (it may be evaluated repeatedly).
- 7. Call PutValue(Result(6), Result(5)). PutValue( V, W ):
- 1. If Type(V) is not Reference, generate a runtime error.
- 2. Call GetBase(V).
- 3. If Result(2) is null, go to step 6.
- 4. Call the [[Put]] method of Result(2), passing GetPropertyName(V)
- for the property name and W for the value.
- 5. Return.
- 6. Call the [[Put]] method for the global object, passing
- GetPropertyName(V) for the property name and W for the value.
- 7. Return.
- 8. Evaluate Statement.
- 9. If Result(8) is a value completion, change C to be "normal completion
- after value V" where V is the value carried by Result(8).
- 10. If Result(8) is a break completion, go to step 14.
- 11. If Result(8) is a continue completion, go to step 5.
- 12. If Result(8) is a return completion, return Result(8).
- 13. Go to step 5.
- 14. Return C.
-
- Author: christine@netscape.com
- Date: 11 september 1997
-*/
- var SECTION = "12.6.3-4";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for..in statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = new Array();
-
- // for ( LeftHandSideExpression in Expression )
- // LeftHandSideExpression:NewExpression:MemberExpression
-
- var count = 0;
- function f() { count++; return new Array("h","e","l","l","o"); }
-
- var result = "";
- for ( p in f() ) { result += f()[p] };
-
- testcases[testcases.length] = new TestCase( SECTION,
- "count = 0; result = \"\"; "+
- "function f() { count++; return new Array(\"h\",\"e\",\"l\",\"l\",\"o\"); }"+
- "for ( p in f() ) { result += f()[p] }; count",
- 6,
- count );
-
- testcases[testcases.length] = new TestCase( SECTION,
- "result",
- "hello",
- result );
-
-
-
- // LeftHandSideExpression:NewExpression:MemberExpression [ Expression ]
- // LeftHandSideExpression:NewExpression:MemberExpression . Identifier
- // LeftHandSideExpression:NewExpression:new MemberExpression Arguments
- // LeftHandSideExpression:NewExpression:PrimaryExpression:( Expression )
- // LeftHandSideExpression:CallExpression:MemberExpression Arguments
- // LeftHandSideExpression:CallExpression Arguments
- // LeftHandSideExpression:CallExpression [ Expression ]
- // LeftHandSideExpression:CallExpression . Identifier
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
-
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-2.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-2.js
deleted file mode 100644
index f025a09..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-2.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.3-2.js
- ECMA Section: 12.6.3 The for...in Statement
- Description: Check the Boolean Object
-
-
- Author: christine@netscape.com
- Date: 11 september 1997
-*/
-
- var SECTION = "12.6.3-2";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for..in statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = getTestCases();
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
-function getTestCases() {
- var array = new Array();
- var item = 0;
-
- array[item++] = new TestCase( SECTION,
- "Boolean.prototype.foo = 34; for ( j in Boolean ) Boolean[j]",
- 34,
- eval("Boolean.prototype.foo = 34; for ( j in Boolean ) Boolean[j] ") );
-
- return ( array );
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-3.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-3.js
deleted file mode 100644
index 32cce34..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-3.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.3-3.js
- ECMA Section: for..in loops
- Description:
-
- This verifies the fix to
- http://scopus.mcom.com/bugsplat/show_bug.cgi?id=112156
- for..in should take general lvalue for first argument
-
- Author: christine@netscape.com
- Date: 12 november 1997
-*/
-
- var SECTION = "12.6.3-3";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for..in statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = new Array();
-
-
- var o = {};
-
- var result = "";
-
- for ( o.a in [1,2,3] ) { result += String( [1,2,3][o.a] ); }
-
- testcases[testcases.length] = new TestCase( SECTION,
- "for ( o.a in [1,2,3] ) { result += String( [1,2,3][o.a] ); } result",
- "123",
- result );
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-4.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-4.js
deleted file mode 100644
index d0876b6..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-4.js
+++ /dev/null
@@ -1,193 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.3-1.js
- ECMA Section: 12.6.3 The for...in Statement
- Description:
- The production IterationStatement : for ( LeftHandSideExpression in Expression )
- Statement is evaluated as follows:
-
- 1. Evaluate the Expression.
- 2. Call GetValue(Result(1)).
- 3. Call ToObject(Result(2)).
- 4. Let C be "normal completion".
- 5. Get the name of the next property of Result(3) that doesn't have the
- DontEnum attribute. If there is no such property, go to step 14.
- 6. Evaluate the LeftHandSideExpression (it may be evaluated repeatedly).
- 7. Call PutValue(Result(6), Result(5)). PutValue( V, W ):
- 1. If Type(V) is not Reference, generate a runtime error.
- 2. Call GetBase(V).
- 3. If Result(2) is null, go to step 6.
- 4. Call the [[Put]] method of Result(2), passing GetPropertyName(V)
- for the property name and W for the value.
- 5. Return.
- 6. Call the [[Put]] method for the global object, passing
- GetPropertyName(V) for the property name and W for the value.
- 7. Return.
- 8. Evaluate Statement.
- 9. If Result(8) is a value completion, change C to be "normal completion
- after value V" where V is the value carried by Result(8).
- 10. If Result(8) is a break completion, go to step 14.
- 11. If Result(8) is a continue completion, go to step 5.
- 12. If Result(8) is a return completion, return Result(8).
- 13. Go to step 5.
- 14. Return C.
-
- Author: christine@netscape.com
- Date: 11 september 1997
-*/
- var SECTION = "12.6.3-4";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for..in statment";
- var BUGNUMBER="http://scopus.mcom.com/bugsplat/show_bug.cgi?id=344855";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = new Array();
-
- // for ( LeftHandSideExpression in Expression )
- // LeftHandSideExpression:NewExpression:MemberExpression
-
- var o = new MyObject();
- var result = 0;
-
- for ( MyObject in o ) {
- result += o[MyObject];
- }
-
- testcases[testcases.length] = new TestCase( SECTION,
- "for ( MyObject in o ) { result += o[MyObject] }",
- 6,
- result );
-
- var result = 0;
-
- for ( value in o ) {
- result += o[value];
- }
-
- testcases[testcases.length] = new TestCase( SECTION,
- "for ( value in o ) { result += o[value]",
- 6,
- result );
-
- var value = "value";
- var result = 0;
- for ( value in o ) {
- result += o[value];
- }
-
- testcases[testcases.length] = new TestCase( SECTION,
- "value = \"value\"; for ( value in o ) { result += o[value]",
- 6,
- result );
-
- var value = 0;
- var result = 0;
- for ( value in o ) {
- result += o[value];
- }
-
- testcases[testcases.length] = new TestCase( SECTION,
- "value = 0; for ( value in o ) { result += o[value]",
- 6,
- result );
-
- // this causes a segv
-
- var ob = { 0:"hello" };
- var result = 0;
- for ( ob[0] in o ) {
- result += o[ob[0]];
- }
- testcases[testcases.length] = new TestCase( SECTION,
- "ob = { 0:\"hello\" }; for ( ob[0] in o ) { result += o[ob[0]]",
- 6,
- result );
-
- var result = 0;
- for ( ob["0"] in o ) {
- result += o[ob["0"]];
- }
- testcases[testcases.length] = new TestCase( SECTION,
- "value = 0; for ( ob[\"0\"] in o ) { result += o[o[\"0\"]]",
- 6,
- result );
-
- var result = 0;
- var ob = { value:"hello" };
- for ( ob[value] in o ) {
- result += o[ob[value]];
- }
- testcases[testcases.length] = new TestCase( SECTION,
- "ob = { 0:\"hello\" }; for ( ob[value] in o ) { result += o[ob[value]]",
- 6,
- result );
-
- var result = 0;
- for ( ob["value"] in o ) {
- result += o[ob["value"]];
- }
- testcases[testcases.length] = new TestCase( SECTION,
- "value = 0; for ( ob[\"value\"] in o ) { result += o[ob[\"value\"]]",
- 6,
- result );
-
- var result = 0;
- for ( ob.value in o ) {
- result += o[ob.value];
- }
- testcases[testcases.length] = new TestCase( SECTION,
- "value = 0; for ( ob.value in o ) { result += o[ob.value]",
- 6,
- result );
-
- // LeftHandSideExpression:NewExpression:MemberExpression [ Expression ]
- // LeftHandSideExpression:NewExpression:MemberExpression . Identifier
- // LeftHandSideExpression:NewExpression:new MemberExpression Arguments
- // LeftHandSideExpression:NewExpression:PrimaryExpression:( Expression )
- // LeftHandSideExpression:CallExpression:MemberExpression Arguments
- // LeftHandSideExpression:CallExpression Arguments
- // LeftHandSideExpression:CallExpression [ Expression ]
- // LeftHandSideExpression:CallExpression . Identifier
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
-function MyObject() {
- this.value = 2;
- this[0] = 4;
- return this;
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-5-n.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-5-n.js
deleted file mode 100644
index 1fb4ce5..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-5-n.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.3-1.js
- ECMA Section: 12.6.3 The for...in Statement
- Description:
- The production IterationStatement : for ( LeftHandSideExpression in Expression )
- Statement is evaluated as follows:
-
- 1. Evaluate the Expression.
- 2. Call GetValue(Result(1)).
- 3. Call ToObject(Result(2)).
- 4. Let C be "normal completion".
- 5. Get the name of the next property of Result(3) that doesn't have the
- DontEnum attribute. If there is no such property, go to step 14.
- 6. Evaluate the LeftHandSideExpression ( it may be evaluated repeatedly).
- 7. Call PutValue(Result(6), Result(5)). PutValue( V, W ):
- 1. If Type(V) is not Reference, generate a runtime error.
- 2. Call GetBase(V).
- 3. If Result(2) is null, go to step 6.
- 4. Call the [[Put]] method of Result(2), passing GetPropertyName(V)
- for the property name and W for the value.
- 5. Return.
- 6. Call the [[Put]] method for the global object, passing
- GetPropertyName(V) for the property name and W for the value.
- 7. Return.
- 8. Evaluate Statement.
- 9. If Result(8) is a value completion, change C to be "normal completion
- after value V" where V is the value carried by Result(8).
- 10. If Result(8) is a break completion, go to step 14.
- 11. If Result(8) is a continue completion, go to step 5.
- 12. If Result(8) is a return completion, return Result(8).
- 13. Go to step 5.
- 14. Return C.
-
- Author: christine@netscape.com
- Date: 11 september 1997
-*/
- var SECTION = "12.6.3-4";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for..in statment";
- var error = err;
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = new Array();
-
- // for ( LeftHandSideExpression in Expression )
- // LeftHandSideExpression:NewExpression:MemberExpression
-
- testcases[testcases.length] = new TestCase( SECTION,
- "more than one member expression",
- "error",
- "" );
-
- var o = new MyObject();
- var result = 0;
-
- for ( var i, p in this) {
- result += this[p];
- }
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
-function MyObject() {
- this.value = 2;
- this[0] = 4;
- return this;
-} \ No newline at end of file
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-6-n.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-6-n.js
deleted file mode 100644
index bd6bb1b..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-6-n.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.3-1.js
- ECMA Section: 12.6.3 The for...in Statement
- Description:
- The production IterationStatement : for ( LeftHandSideExpression in Expression )
- Statement is evaluated as follows:
-
- 1. Evaluate the Expression.
- 2. Call GetValue(Result(1)).
- 3. Call ToObject(Result(2)).
- 4. Let C be "normal completion".
- 5. Get the name of the next property of Result(3) that doesn't have the
- DontEnum attribute. If there is no such property, go to step 14.
- 6. Evaluate the LeftHandSideExpression ( it may be evaluated repeatedly).
- 7. Call PutValue(Result(6), Result(5)). PutValue( V, W ):
- 1. If Type(V) is not Reference, generate a runtime error.
- 2. Call GetBase(V).
- 3. If Result(2) is null, go to step 6.
- 4. Call the [[Put]] method of Result(2), passing GetPropertyName(V)
- for the property name and W for the value.
- 5. Return.
- 6. Call the [[Put]] method for the global object, passing
- GetPropertyName(V) for the property name and W for the value.
- 7. Return.
- 8. Evaluate Statement.
- 9. If Result(8) is a value completion, change C to be "normal completion
- after value V" where V is the value carried by Result(8).
- 10. If Result(8) is a break completion, go to step 14.
- 11. If Result(8) is a continue completion, go to step 5.
- 12. If Result(8) is a return completion, return Result(8).
- 13. Go to step 5.
- 14. Return C.
-
- Author: christine@netscape.com
- Date: 11 september 1997
-*/
- var SECTION = "12.6.3-4";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for..in statment";
- var error = err;
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = new Array();
-
- // for ( LeftHandSideExpression in Expression )
- // LeftHandSideExpression:NewExpression:MemberExpression
-
- testcases[testcases.length] = new TestCase( SECTION,
- "bad left-hand side expression",
- "error",
- "" );
-
- var o = new MyObject();
- var result = 0;
-
- for ( this in o) {
- result += this[p];
- }
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
-function MyObject() {
- this.value = 2;
- this[0] = 4;
- return this;
-} \ No newline at end of file
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-7-n.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-7-n.js
deleted file mode 100644
index 5dfad13..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-7-n.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.3-1.js
- ECMA Section: 12.6.3 The for...in Statement
- Description:
- The production IterationStatement : for ( LeftHandSideExpression in Expression )
- Statement is evaluated as follows:
-
- 1. Evaluate the Expression.
- 2. Call GetValue(Result(1)).
- 3. Call ToObject(Result(2)).
- 4. Let C be "normal completion".
- 5. Get the name of the next property of Result(3) that doesn't have the
- DontEnum attribute. If there is no such property, go to step 14.
- 6. Evaluate the LeftHandSideExpression ( it may be evaluated repeatedly).
- 7. Call PutValue(Result(6), Result(5)). PutValue( V, W ):
- 1. If Type(V) is not Reference, generate a runtime error.
- 2. Call GetBase(V).
- 3. If Result(2) is null, go to step 6.
- 4. Call the [[Put]] method of Result(2), passing GetPropertyName(V)
- for the property name and W for the value.
- 5. Return.
- 6. Call the [[Put]] method for the global object, passing
- GetPropertyName(V) for the property name and W for the value.
- 7. Return.
- 8. Evaluate Statement.
- 9. If Result(8) is a value completion, change C to be "normal completion
- after value V" where V is the value carried by Result(8).
- 10. If Result(8) is a break completion, go to step 14.
- 11. If Result(8) is a continue completion, go to step 5.
- 12. If Result(8) is a return completion, return Result(8).
- 13. Go to step 5.
- 14. Return C.
-
- Author: christine@netscape.com
- Date: 11 september 1997
-*/
- var SECTION = "12.6.3-4";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for..in statment";
- var error = err;
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = new Array();
-
- // for ( LeftHandSideExpression in Expression )
- // LeftHandSideExpression:NewExpression:MemberExpression
-
- testcases[testcases.length] = new TestCase( SECTION,
- "bad left-hand side expression",
- "error",
- "" );
-
- var o = new MyObject();
- var result = 0;
-
- for ( "a" in o) {
- result += this[p];
- }
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
-function MyObject() {
- this.value = 2;
- this[0] = 4;
- return this;
-} \ No newline at end of file
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-8-n.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-8-n.js
deleted file mode 100644
index ac93487..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-8-n.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.3-8-n.js
- ECMA Section: 12.6.3 The for...in Statement
- Description:
- The production IterationStatement : for ( LeftHandSideExpression in Expression )
- Statement is evaluated as follows:
-
- 1. Evaluate the Expression.
- 2. Call GetValue(Result(1)).
- 3. Call ToObject(Result(2)).
- 4. Let C be "normal completion".
- 5. Get the name of the next property of Result(3) that doesn't have the
- DontEnum attribute. If there is no such property, go to step 14.
- 6. Evaluate the LeftHandSideExpression ( it may be evaluated repeatedly).
- 7. Call PutValue(Result(6), Result(5)). PutValue( V, W ):
- 1. If Type(V) is not Reference, generate a runtime error.
- 2. Call GetBase(V).
- 3. If Result(2) is null, go to step 6.
- 4. Call the [[Put]] method of Result(2), passing GetPropertyName(V)
- for the property name and W for the value.
- 5. Return.
- 6. Call the [[Put]] method for the global object, passing
- GetPropertyName(V) for the property name and W for the value.
- 7. Return.
- 8. Evaluate Statement.
- 9. If Result(8) is a value completion, change C to be "normal completion
- after value V" where V is the value carried by Result(8).
- 10. If Result(8) is a break completion, go to step 14.
- 11. If Result(8) is a continue completion, go to step 5.
- 12. If Result(8) is a return completion, return Result(8).
- 13. Go to step 5.
- 14. Return C.
-
- Author: christine@netscape.com
- Date: 11 september 1997
-*/
- var SECTION = "12.6.3-4";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for..in statment";
- var error = err;
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = new Array();
-
- // for ( LeftHandSideExpression in Expression )
- // LeftHandSideExpression:NewExpression:MemberExpression
-
- testcases[testcases.length] = new TestCase( SECTION,
- "bad left-hand side expression",
- "error",
- "" );
-
- var o = new MyObject();
- var result = 0;
-
- for ( 1 in o) {
- result += this[p];
- }
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
-function MyObject() {
- this.value = 2;
- this[0] = 4;
- return this;
-} \ No newline at end of file
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-9-n.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-9-n.js
deleted file mode 100644
index 06000a4..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.6.3-9-n.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.6.3-9-n.js
- ECMA Section: 12.6.3 The for...in Statement
- Description:
- The production IterationStatement : for ( LeftHandSideExpression in Expression )
- Statement is evaluated as follows:
-
- 1. Evaluate the Expression.
- 2. Call GetValue(Result(1)).
- 3. Call ToObject(Result(2)).
- 4. Let C be "normal completion".
- 5. Get the name of the next property of Result(3) that doesn't have the
- DontEnum attribute. If there is no such property, go to step 14.
- 6. Evaluate the LeftHandSideExpression ( it may be evaluated repeatedly).
- 7. Call PutValue(Result(6), Result(5)). PutValue( V, W ):
- 1. If Type(V) is not Reference, generate a runtime error.
- 2. Call GetBase(V).
- 3. If Result(2) is null, go to step 6.
- 4. Call the [[Put]] method of Result(2), passing GetPropertyName(V)
- for the property name and W for the value.
- 5. Return.
- 6. Call the [[Put]] method for the global object, passing
- GetPropertyName(V) for the property name and W for the value.
- 7. Return.
- 8. Evaluate Statement.
- 9. If Result(8) is a value completion, change C to be "normal completion
- after value V" where V is the value carried by Result(8).
- 10. If Result(8) is a break completion, go to step 14.
- 11. If Result(8) is a continue completion, go to step 5.
- 12. If Result(8) is a return completion, return Result(8).
- 13. Go to step 5.
- 14. Return C.
-
- Author: christine@netscape.com
- Date: 11 september 1997
-*/
- var SECTION = "12.6.3-9-n";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The for..in statment";
- var error = err;
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = new Array();
-
- // for ( LeftHandSideExpression in Expression )
- // LeftHandSideExpression:NewExpression:MemberExpression
-
- testcases[testcases.length] = new TestCase( SECTION,
- "object is not defined",
- "error",
- "" );
-
- var o = new MyObject();
- var result = 0;
-
- for ( var o in foo) {
- result += this[o];
- }
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
-function MyObject() {
- this.value = 2;
- this[0] = 4;
- return this;
-} \ No newline at end of file
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.7-1-n.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.7-1-n.js
deleted file mode 100644
index b9b13e8..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.7-1-n.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.7-1-n.js
- ECMA Section: 12.7 The continue statement
- Description:
-
- Author: christine@netscape.com
- Date: 12 november 1997
-*/
- var SECTION = "12.7.1-n";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The continue statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = getTestCases();
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
-
- testcases[tc].actual = eval( testcases[tc].actual );
-
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
-function getTestCases() {
- var array = new Array();
- var item = 0;
-
- array[item++] = new TestCase( SECTION,
- "continue",
- "error",
- "continue" );
-
- return ( array );
-}
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.8-1-n.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.8-1-n.js
deleted file mode 100644
index 9594a73..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.8-1-n.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.8-1-n.js
- ECMA Section: 12.8 The break statement
- Description:
-
- Author: christine@netscape.com
- Date: 12 november 1997
-*/
-
- var SECTION = "12.8-1-n";
- var VERSION = "ECMA_1";
- startTest();
- var TITLE = "The break in statment";
-
- writeHeaderToLog( SECTION + " "+ TITLE);
-
- var testcases = getTestCases();
-
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
-
- testcases[tc].actual = eval( testcases[tc].actual );
-
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
-function getTestCases() {
- var array = new Array();
- var item = 0;
-
- array[item++] = new TestCase( SECTION,
- "break",
- "error",
- "break" );
-
- return ( array );
-}
-
diff --git a/JavaScriptCore/tests/mozilla/ecma/Statements/12.9-1-n.js b/JavaScriptCore/tests/mozilla/ecma/Statements/12.9-1-n.js
deleted file mode 100644
index c0383c2..0000000
--- a/JavaScriptCore/tests/mozilla/ecma/Statements/12.9-1-n.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/* The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released March
- * 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape Communications
- * Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *
- */
-/**
- File Name: 12.9-1-n.js
- ECMA Section: 12.9 The return statement
- Description:
-
- Author: christine@netscape.com
- Date: 12 november 1997
-*/
- var SECTION = "12.9-1-n";
- var VERSION = "ECMA_1";
- startTest();
- var testcases = getTestCases();
-
- writeHeaderToLog( SECTION + " The return statement");
- test();
-
-function test() {
- for ( tc=0; tc < testcases.length; tc++ ) {
-
- testcases[tc].actual = eval( testcases[tc].actual );
-
- testcases[tc].passed = writeTestCaseResult(
- testcases[tc].expect,
- testcases[tc].actual,
- testcases[tc].description +" = "+
- testcases[tc].actual );
-
- testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value ";
- }
- stopTest();
- return ( testcases );
-}
-function getTestCases() {
- var array = new Array();
- var item = 0;
-
- array[item++] = new TestCase( SECTION,
- "return",
- "error",
- "return" );
-
- return ( array );
-}