From 1a4793926f0d898b27dad3a38b4dda63db46042e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= <andre.bargull@gmail.com> Date: Thu, 11 Dec 2014 18:01:59 +0100 Subject: [PATCH] Fix strict mode errors in language/expressions - Add missing noStrict flags when tests explicitly require non-strict semantics (e.g. unqualified delete, with statement) - Change `throw new Exception(...)` to `$ERROR(...)` in call/* - Replace dynamic strict mode check with noStrict flag in call/11.2.3-3_8 - Align assignment/11.13.1_A3.1 with 11.13.1_A3.2 to avoid creating implicit global variable - Split test into multiple files when undeclared variable are under test - addition/S11.6.1_A2.4_T3 - division/11.5.2_A2.4_T3 - does-not-equals/11.9.2_A2.4_T3 - equals/S11.9.1_A2.4_T3 - greater-than/S11.8.2_A2.4_T3 - greater-than-or-equal/S11.8.4_A2.4_T3 - in/S11.8.7_A2.4_T3 - instanceof/11.8.6_A2.4_T3 - left-shift/S11.7.1_A2.4_T3 - less-than/S11.8.1_A2.4_T3 - less-than-or-equal/S11.8.3_A2.4_T3 - modulus/S11.5.3_A2.4_T3 - multiplication/11.5.1_A2.4_T3 - right-shift/11.7.2_A2.4_T3 - strict-does-not-equals/11.9.5_A2.4_T3 - strict-equals/11.9.4_A2.4_T3 - subtraction/11.6.2_A2.4_T3 - unsigned-right-shift/11.7.3_A2.4_T3 - Add declaration when implicit global variable creation not part of the test - assignment/11.13.1_A4_T1 - compound-assignment/S11.13.2_A3.1_T* - compound-assignment/S11.13.2_A3.2_T* - grouping/11.1.6_A3_T5 - instanceof/S15.3.5.3_* - Split test into multiple files when unqualified delete is used - delete/S11.4.1_A2.2_T1.js - delete/11.4.1_A3.2 - grouping/S11.1.6_A2 - grouping/S11.1.6_A3_T6 --- .../expressions/addition/S11.6.1_A2.4_T3.js | 5 -- .../expressions/addition/S11.6.1_A2.4_T4.js | 14 +++++ .../expressions/assignment/11.13.1-4-1.js | 1 + .../expressions/assignment/8.14.4-8-b_1.js | 1 + .../expressions/assignment/S11.13.1_A3.1.js | 6 +- .../expressions/assignment/S11.13.1_A4_T1.js | 1 + test/language/expressions/call/11.2.3-3_1.js | 2 +- test/language/expressions/call/11.2.3-3_2.js | 2 +- test/language/expressions/call/11.2.3-3_3.js | 2 +- test/language/expressions/call/11.2.3-3_4.js | 2 +- test/language/expressions/call/11.2.3-3_5.js | 2 +- test/language/expressions/call/11.2.3-3_6.js | 2 +- test/language/expressions/call/11.2.3-3_7.js | 2 +- test/language/expressions/call/11.2.3-3_8.js | 8 +-- .../expressions/call/S11.2.4_A1.4_T1.js | 1 + .../expressions/call/S11.2.4_A1.4_T3.js | 1 + .../compound-assignment/S11.13.2_A3.1_T1.js | 1 + .../compound-assignment/S11.13.2_A3.1_T10.js | 1 + .../compound-assignment/S11.13.2_A3.1_T11.js | 1 + .../compound-assignment/S11.13.2_A3.1_T2.js | 1 + .../compound-assignment/S11.13.2_A3.1_T3.js | 1 + .../compound-assignment/S11.13.2_A3.1_T4.js | 1 + .../compound-assignment/S11.13.2_A3.1_T5.js | 1 + .../compound-assignment/S11.13.2_A3.1_T6.js | 1 + .../compound-assignment/S11.13.2_A3.1_T7.js | 1 + .../compound-assignment/S11.13.2_A3.1_T8.js | 1 + .../compound-assignment/S11.13.2_A3.1_T9.js | 1 + .../compound-assignment/S11.13.2_A3.2_T1.js | 2 + .../compound-assignment/S11.13.2_A3.2_T10.js | 2 + .../compound-assignment/S11.13.2_A3.2_T11.js | 2 + .../compound-assignment/S11.13.2_A3.2_T2.js | 2 + .../compound-assignment/S11.13.2_A3.2_T3.js | 2 + .../compound-assignment/S11.13.2_A3.2_T4.js | 2 + .../compound-assignment/S11.13.2_A3.2_T5.js | 2 + .../compound-assignment/S11.13.2_A3.2_T6.js | 2 + .../compound-assignment/S11.13.2_A3.2_T7.js | 2 + .../compound-assignment/S11.13.2_A3.2_T8.js | 2 + .../compound-assignment/S11.13.2_A3.2_T9.js | 2 + .../language/expressions/delete/11.4.1-0-1.js | 1 + .../language/expressions/delete/11.4.1-3-1.js | 1 + .../expressions/delete/11.4.1-4.a-11.js | 1 + .../expressions/delete/11.4.1-4.a-12.js | 1 + .../expressions/delete/11.4.1-4.a-13.js | 1 + .../expressions/delete/11.4.1-4.a-16.js | 1 + .../expressions/delete/11.4.1-4.a-3.js | 1 + .../expressions/delete/11.4.1-4.a-4.js | 1 + .../expressions/delete/11.4.1-4.a-5.js | 1 + .../expressions/delete/11.4.1-4.a-6.js | 1 + .../expressions/delete/11.4.1-4.a-7.js | 1 + .../expressions/delete/11.4.1-4.a-8.js | 1 + .../expressions/delete/11.4.1-4.a-9.js | 1 + .../language/expressions/delete/11.4.1-5-1.js | 1 + .../language/expressions/delete/11.4.1-5-2.js | 1 + .../language/expressions/delete/11.4.1-5-3.js | 1 + .../expressions/delete/S11.4.1_A2.2_T1.js | 6 +- .../expressions/delete/S11.4.1_A2.2_T3.js | 13 +++++ .../expressions/delete/S11.4.1_A3.1.js | 1 + .../expressions/delete/S11.4.1_A3.2_T1.js | 15 +++++ .../expressions/delete/S11.4.1_A3.2_T2.js | 15 +++++ .../{S11.4.1_A3.2.js => S11.4.1_A3.2_T3.js} | 17 +----- .../expressions/delete/S11.4.1_A3.3.js | 58 ------------------- .../expressions/delete/S11.4.1_A3.3_T1.js | 21 +++++++ .../expressions/delete/S11.4.1_A3.3_T2.js | 17 ++++++ .../expressions/delete/S11.4.1_A3.3_T3.js | 17 ++++++ .../expressions/delete/S11.4.1_A3.3_T4.js | 16 +++++ .../expressions/delete/S11.4.1_A3.3_T5.js | 18 ++++++ .../expressions/delete/S11.4.1_A3.3_T6.js | 16 +++++ .../language/expressions/delete/S11.4.1_A4.js | 1 + .../expressions/division/S11.5.2_A2.4_T3.js | 5 -- .../expressions/division/S11.5.2_A2.4_T4.js | 14 +++++ .../does-not-equals/S11.9.2_A2.4_T3.js | 5 -- .../does-not-equals/S11.9.2_A2.4_T4.js | 14 +++++ .../expressions/equals/S11.9.1_A2.4_T3.js | 5 -- .../expressions/equals/S11.9.1_A2.4_T4.js | 14 +++++ .../greater-than-or-equal/S11.8.4_A2.4_T3.js | 5 -- .../greater-than-or-equal/S11.8.4_A2.4_T4.js | 14 +++++ .../greater-than/S11.8.2_A2.4_T3.js | 5 -- .../greater-than/S11.8.2_A2.4_T4.js | 14 +++++ .../{S11.1.6_A2.js => S11.1.6_A2_T1.js} | 17 ++---- .../expressions/grouping/S11.1.6_A2_T2.js | 17 ++++++ .../expressions/grouping/S11.1.6_A3_T5.js | 1 + .../expressions/grouping/S11.1.6_A3_T6.js | 8 +-- .../expressions/grouping/S11.1.6_A3_T7.js | 13 +++++ .../expressions/in/S11.8.7_A2.4_T3.js | 5 -- .../expressions/in/S11.8.7_A2.4_T4.js | 14 +++++ .../expressions/instanceof/S11.8.6_A2.4_T3.js | 5 -- .../expressions/instanceof/S11.8.6_A2.4_T4.js | 14 +++++ .../expressions/instanceof/S15.3.5.3_A1_T1.js | 1 + .../expressions/instanceof/S15.3.5.3_A1_T2.js | 1 + .../expressions/instanceof/S15.3.5.3_A1_T3.js | 1 + .../expressions/instanceof/S15.3.5.3_A1_T4.js | 1 + .../expressions/instanceof/S15.3.5.3_A1_T5.js | 1 + .../expressions/instanceof/S15.3.5.3_A1_T6.js | 1 + .../expressions/instanceof/S15.3.5.3_A1_T7.js | 1 + .../expressions/instanceof/S15.3.5.3_A1_T8.js | 1 + .../expressions/instanceof/S15.3.5.3_A2_T2.js | 2 + .../expressions/instanceof/S15.3.5.3_A2_T5.js | 2 + .../expressions/instanceof/S15.3.5.3_A2_T6.js | 1 + .../expressions/instanceof/S15.3.5.3_A3_T1.js | 2 + .../expressions/instanceof/S15.3.5.3_A3_T2.js | 2 + .../expressions/left-shift/S11.7.1_A2.4_T3.js | 5 -- .../expressions/left-shift/S11.7.1_A2.4_T4.js | 14 +++++ .../less-than-or-equal/S11.8.3_A2.4_T3.js | 5 -- .../less-than-or-equal/S11.8.3_A2.4_T4.js | 14 +++++ .../expressions/less-than/S11.8.1_A2.4_T3.js | 5 -- .../expressions/less-than/S11.8.1_A2.4_T4.js | 14 +++++ .../expressions/modulus/S11.5.3_A2.4_T3.js | 5 -- .../expressions/modulus/S11.5.3_A2.4_T4.js | 14 +++++ .../multiplication/S11.5.1_A2.4_T3.js | 5 -- .../multiplication/S11.5.1_A2.4_T4.js | 14 +++++ .../right-shift/S11.7.2_A2.4_T3.js | 5 -- .../right-shift/S11.7.2_A2.4_T4.js | 14 +++++ .../strict-does-not-equals/S11.9.5_A2.4_T3.js | 5 -- .../strict-does-not-equals/S11.9.5_A2.4_T4.js | 14 +++++ .../strict-equals/S11.9.4_A2.4_T3.js | 5 -- .../strict-equals/S11.9.4_A2.4_T4.js | 14 +++++ .../subtraction/S11.6.2_A2.4_T3.js | 5 -- .../subtraction/S11.6.2_A2.4_T4.js | 14 +++++ .../unsigned-right-shift/S11.7.3_A2.4_T3.js | 5 -- .../unsigned-right-shift/S11.7.3_A2.4_T4.js | 14 +++++ 120 files changed, 527 insertions(+), 201 deletions(-) create mode 100644 test/language/expressions/addition/S11.6.1_A2.4_T4.js create mode 100755 test/language/expressions/delete/S11.4.1_A2.2_T3.js create mode 100755 test/language/expressions/delete/S11.4.1_A3.2_T1.js create mode 100755 test/language/expressions/delete/S11.4.1_A3.2_T2.js rename test/language/expressions/delete/{S11.4.1_A3.2.js => S11.4.1_A3.2_T3.js} (55%) delete mode 100644 test/language/expressions/delete/S11.4.1_A3.3.js create mode 100644 test/language/expressions/delete/S11.4.1_A3.3_T1.js create mode 100755 test/language/expressions/delete/S11.4.1_A3.3_T2.js create mode 100755 test/language/expressions/delete/S11.4.1_A3.3_T3.js create mode 100755 test/language/expressions/delete/S11.4.1_A3.3_T4.js create mode 100755 test/language/expressions/delete/S11.4.1_A3.3_T5.js create mode 100755 test/language/expressions/delete/S11.4.1_A3.3_T6.js create mode 100755 test/language/expressions/division/S11.5.2_A2.4_T4.js create mode 100755 test/language/expressions/does-not-equals/S11.9.2_A2.4_T4.js create mode 100755 test/language/expressions/equals/S11.9.1_A2.4_T4.js create mode 100755 test/language/expressions/greater-than-or-equal/S11.8.4_A2.4_T4.js create mode 100755 test/language/expressions/greater-than/S11.8.2_A2.4_T4.js rename test/language/expressions/grouping/{S11.1.6_A2.js => S11.1.6_A2_T1.js} (68%) mode change 100644 => 100755 create mode 100644 test/language/expressions/grouping/S11.1.6_A2_T2.js create mode 100755 test/language/expressions/grouping/S11.1.6_A3_T7.js create mode 100755 test/language/expressions/in/S11.8.7_A2.4_T4.js create mode 100755 test/language/expressions/instanceof/S11.8.6_A2.4_T4.js create mode 100755 test/language/expressions/left-shift/S11.7.1_A2.4_T4.js create mode 100755 test/language/expressions/less-than-or-equal/S11.8.3_A2.4_T4.js create mode 100755 test/language/expressions/less-than/S11.8.1_A2.4_T4.js create mode 100755 test/language/expressions/modulus/S11.5.3_A2.4_T4.js create mode 100755 test/language/expressions/multiplication/S11.5.1_A2.4_T4.js create mode 100755 test/language/expressions/right-shift/S11.7.2_A2.4_T4.js create mode 100755 test/language/expressions/strict-does-not-equals/S11.9.5_A2.4_T4.js create mode 100755 test/language/expressions/strict-equals/S11.9.4_A2.4_T4.js create mode 100755 test/language/expressions/subtraction/S11.6.2_A2.4_T4.js create mode 100755 test/language/expressions/unsigned-right-shift/S11.7.3_A2.4_T4.js diff --git a/test/language/expressions/addition/S11.6.1_A2.4_T3.js b/test/language/expressions/addition/S11.6.1_A2.4_T3.js index 186edf81c9..3354e28b6f 100644 --- a/test/language/expressions/addition/S11.6.1_A2.4_T3.js +++ b/test/language/expressions/addition/S11.6.1_A2.4_T3.js @@ -17,8 +17,3 @@ catch (e) { $ERROR('#1.2: x + (x = 1) throw ReferenceError. Actual: ' + (e)); } } - -//CHECK#2 -if ((y = 1) + y !== 2) { - $ERROR('#2: (y = 1) + y === 2. Actual: ' + ((y = 1) + y)); -} diff --git a/test/language/expressions/addition/S11.6.1_A2.4_T4.js b/test/language/expressions/addition/S11.6.1_A2.4_T4.js new file mode 100644 index 0000000000..9e67f2cad4 --- /dev/null +++ b/test/language/expressions/addition/S11.6.1_A2.4_T4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.6.1_A2.4_T4 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ + +//CHECK#1 +if ((y = 1) + y !== 2) { + $ERROR('#1: (y = 1) + y === 2. Actual: ' + ((y = 1) + y)); +} diff --git a/test/language/expressions/assignment/11.13.1-4-1.js b/test/language/expressions/assignment/11.13.1-4-1.js index 6880dcf547..11288101f0 100644 --- a/test/language/expressions/assignment/11.13.1-4-1.js +++ b/test/language/expressions/assignment/11.13.1-4-1.js @@ -10,6 +10,7 @@ es5id: 11.13.1-4-1 description: > simple assignment creates property on the global object if LeftHandSide is an unresolvable reference +flags: [noStrict] includes: - runTestCase.js - fnGlobalObject.js diff --git a/test/language/expressions/assignment/8.14.4-8-b_1.js b/test/language/expressions/assignment/8.14.4-8-b_1.js index 68466814a4..04b5e94d4b 100644 --- a/test/language/expressions/assignment/8.14.4-8-b_1.js +++ b/test/language/expressions/assignment/8.14.4-8-b_1.js @@ -7,6 +7,7 @@ /*--- es5id: 8.14.4-8-b_1 description: Non-writable property on a prototype written to. +flags: [noStrict] includes: [runTestCase.js] ---*/ diff --git a/test/language/expressions/assignment/S11.13.1_A3.1.js b/test/language/expressions/assignment/S11.13.1_A3.1.js index 99f36c01f5..5ac63875af 100644 --- a/test/language/expressions/assignment/S11.13.1_A3.1.js +++ b/test/language/expressions/assignment/S11.13.1_A3.1.js @@ -14,7 +14,7 @@ if (x !== 1) { } //CHECK#2 -y = 1; -if (y !== 1) { - $ERROR('#2: y = 1; y === 1. Actual: ' + (y)); +x = 1; +if (x !== 1) { + $ERROR('#2: x = 1; x === 1. Actual: ' + (x)); } diff --git a/test/language/expressions/assignment/S11.13.1_A4_T1.js b/test/language/expressions/assignment/S11.13.1_A4_T1.js index 6bb3846c1c..2ca8e54b8c 100644 --- a/test/language/expressions/assignment/S11.13.1_A4_T1.js +++ b/test/language/expressions/assignment/S11.13.1_A4_T1.js @@ -8,6 +8,7 @@ description: Syntax check ---*/ //CHECK#1 +var x; x = x = 1; if (x !== 1) { $ERROR('#1: The expression x = x = 1 is the same x = (x = 1), not (x = x) = 1. Actual: ' + (x)); diff --git a/test/language/expressions/call/11.2.3-3_1.js b/test/language/expressions/call/11.2.3-3_1.js index 25b66f4580..c1495dba64 100644 --- a/test/language/expressions/call/11.2.3-3_1.js +++ b/test/language/expressions/call/11.2.3-3_1.js @@ -19,7 +19,7 @@ function testcase() { var o = { }; try { o.bar( foo() ); - throw new Exception("o.bar does not exist!"); + $ERROR("o.bar does not exist!"); } catch(e) { return (e instanceof TypeError) && (fooCalled===true); } diff --git a/test/language/expressions/call/11.2.3-3_2.js b/test/language/expressions/call/11.2.3-3_2.js index 43e58d5d2d..92987c081e 100644 --- a/test/language/expressions/call/11.2.3-3_2.js +++ b/test/language/expressions/call/11.2.3-3_2.js @@ -19,7 +19,7 @@ function testcase() { var o = { }; try { o.bar( foo() ); - throw new Exception("o.bar does not exist!"); + $ERROR("o.bar does not exist!"); } catch(e) { return (e instanceof TypeError) && (fooCalled===true); } diff --git a/test/language/expressions/call/11.2.3-3_3.js b/test/language/expressions/call/11.2.3-3_3.js index 2f3445f773..51c43dd399 100644 --- a/test/language/expressions/call/11.2.3-3_3.js +++ b/test/language/expressions/call/11.2.3-3_3.js @@ -19,7 +19,7 @@ function testcase() { var o = { }; try { o.bar.gar( foo() ); - throw new Exception("o.bar does not exist!"); + $ERROR("o.bar does not exist!"); } catch(e) { return (e instanceof TypeError) && (fooCalled===false); } diff --git a/test/language/expressions/call/11.2.3-3_4.js b/test/language/expressions/call/11.2.3-3_4.js index 4b725d1855..328aac8ea0 100644 --- a/test/language/expressions/call/11.2.3-3_4.js +++ b/test/language/expressions/call/11.2.3-3_4.js @@ -21,7 +21,7 @@ function testcase() { set: function(x) {this.barSetter = true; }}); try { o.bar( foo() ); - throw new Exception("o.bar does not exist!"); + $ERROR("o.bar does not exist!"); } catch(e) { return (e instanceof TypeError) && (fooCalled===true) && (o.barGetter===true) && (o.barSetter===undefined); } diff --git a/test/language/expressions/call/11.2.3-3_5.js b/test/language/expressions/call/11.2.3-3_5.js index 6bc71138bf..93bc870910 100644 --- a/test/language/expressions/call/11.2.3-3_5.js +++ b/test/language/expressions/call/11.2.3-3_5.js @@ -19,7 +19,7 @@ function testcase() { var o = { }; try { eval("o.bar( foo() );"); - throw new Exception("o.bar does not exist!"); + $ERROR("o.bar does not exist!"); } catch(e) { return (e instanceof TypeError) && (fooCalled===true); } diff --git a/test/language/expressions/call/11.2.3-3_6.js b/test/language/expressions/call/11.2.3-3_6.js index e484b615e7..798e7bcdf3 100644 --- a/test/language/expressions/call/11.2.3-3_6.js +++ b/test/language/expressions/call/11.2.3-3_6.js @@ -18,7 +18,7 @@ function testcase() { set: function(x) {this.barSetter = true; }}); try { o.foo( o.bar ); - throw new Exception("o.foo does not exist!"); + $ERROR("o.foo does not exist!"); } catch(e) { return (e instanceof TypeError) && (o.barGetter===true) && (o.barSetter===undefined); } diff --git a/test/language/expressions/call/11.2.3-3_7.js b/test/language/expressions/call/11.2.3-3_7.js index 8d5bc30abd..ad6743f51c 100644 --- a/test/language/expressions/call/11.2.3-3_7.js +++ b/test/language/expressions/call/11.2.3-3_7.js @@ -18,7 +18,7 @@ function testcase() { set: function(x) {this.barSetter = true; }}); try { o.foo( o["bar"] ); - throw new Exception("o.foo does not exist!"); + $ERROR("o.foo does not exist!"); } catch(e) { return (e instanceof TypeError) && (o.barGetter===true) && (o.barSetter===undefined); } diff --git a/test/language/expressions/call/11.2.3-3_8.js b/test/language/expressions/call/11.2.3-3_8.js index fd264aa859..78d463a25a 100644 --- a/test/language/expressions/call/11.2.3-3_8.js +++ b/test/language/expressions/call/11.2.3-3_8.js @@ -9,22 +9,18 @@ es5id: 11.2.3-3_8 description: > Call arguments are evaluated before the check is made to see if the object is actually callable (global object) +flags: [noStrict] includes: - runTestCase.js - - fnGlobalObject.js ---*/ function testcase() { - if (this!==fnGlobalObject()) { - return; - } - var fooCalled = false; function foo(){ fooCalled = true; } try { this.bar( foo() ); - throw new Exception("this.bar does not exist!"); + $ERROR("this.bar does not exist!"); } catch(e) { return (e instanceof TypeError) && (fooCalled===true); } diff --git a/test/language/expressions/call/S11.2.4_A1.4_T1.js b/test/language/expressions/call/S11.2.4_A1.4_T1.js index a4eb249e2c..56b2ec3086 100644 --- a/test/language/expressions/call/S11.2.4_A1.4_T1.js +++ b/test/language/expressions/call/S11.2.4_A1.4_T1.js @@ -10,6 +10,7 @@ description: > ArgumentList, in order, followed at the end by GetValue(AssignmentExpression), which is the last item of the new list +flags: [noStrict] ---*/ function f_arg() { diff --git a/test/language/expressions/call/S11.2.4_A1.4_T3.js b/test/language/expressions/call/S11.2.4_A1.4_T3.js index 72bf97a640..4559c344e1 100644 --- a/test/language/expressions/call/S11.2.4_A1.4_T3.js +++ b/test/language/expressions/call/S11.2.4_A1.4_T3.js @@ -10,6 +10,7 @@ description: > ArgumentList, in order, followed at the end by GetValue(AssignmentExpression), which is the last item of the new list +flags: [noStrict] ---*/ function f_arg(x,y,z) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T1.js b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T1.js index 8eabda1295..e28f9082a0 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T1.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T1.js @@ -15,6 +15,7 @@ if (x !== -1) { } //CHECK#2 +var y; y = 1; y *= -1; if (y !== -1) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T10.js b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T10.js index c079766068..450a7a92b9 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T10.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T10.js @@ -15,6 +15,7 @@ if (x !== 1) { } //CHECK#2 +var y; y = 1; y ^= 0; if (y !== 1) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T11.js b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T11.js index f1ff9dc384..c4eaee24b1 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T11.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T11.js @@ -15,6 +15,7 @@ if (x !== 1) { } //CHECK#2 +var y; y = 1; y |= 0; if (y !== 1) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T2.js b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T2.js index 1dadbb2647..950ff818a0 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T2.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T2.js @@ -15,6 +15,7 @@ if (x !== -1) { } //CHECK#2 +var y; y = 1; y /= -1; if (y !== -1) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T3.js b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T3.js index 6bd03a441d..028c7ad40b 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T3.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T3.js @@ -15,6 +15,7 @@ if (x !== -1) { } //CHECK#2 +var y; y = -1; y %= 2; if (y !== -1) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T4.js b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T4.js index e9cb914939..6bbbcccfa8 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T4.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T4.js @@ -15,6 +15,7 @@ if (x !== 2) { } //CHECK#2 +var y; y = 1; y += 1; if (y !== 2) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T5.js b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T5.js index 43f30546ba..1ee5d6c0d5 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T5.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T5.js @@ -15,6 +15,7 @@ if (x !== -2) { } //CHECK#2 +var y; y = -1; y -= 1; if (y !== -2) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T6.js b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T6.js index e935cdfd78..bd13b51ed6 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T6.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T6.js @@ -15,6 +15,7 @@ if (x !== 2) { } //CHECK#2 +var y; y = 1; y <<= 1; if (y !== 2) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T7.js b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T7.js index c29b2d04bd..c63dab71ca 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T7.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T7.js @@ -15,6 +15,7 @@ if (x !== 2) { } //CHECK#2 +var y; y = 4; y >>= 1; if (y !== 2) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T8.js b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T8.js index dd27c8fc5d..ecdea09107 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T8.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T8.js @@ -15,6 +15,7 @@ if (x !== 2) { } //CHECK#2 +var y; y = 4; y >>>= 1; if (y !== 2) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T9.js b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T9.js index f268113c0b..f137347487 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.1_T9.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.1_T9.js @@ -15,6 +15,7 @@ if (x !== 1) { } //CHECK#2 +var y; y = 1; y &= 1; if (y !== 1) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T1.js b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T1.js index 8829ba1de1..2eee2021bc 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T1.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T1.js @@ -15,6 +15,8 @@ if (x1 !== -1) { } //CHECK#2 +var y; +var y1; y = 1; y1 = (y *= -1); if (y1 !== -1) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T10.js b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T10.js index 04c77c8099..2a0232c666 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T10.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T10.js @@ -15,6 +15,8 @@ if (x1 !== 1) { } //CHECK#2 +var y; +var y1; y = 1; y1 = (y ^= 0); if (y1 !== 1) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T11.js b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T11.js index 23a326b01b..5fc85731a4 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T11.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T11.js @@ -15,6 +15,8 @@ if (x1 !== 1) { } //CHECK#2 +var y; +var y1; y = 1; y1 = (y |= 0); if (y1 !== 1) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T2.js b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T2.js index bae64b71d3..81eed82481 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T2.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T2.js @@ -15,6 +15,8 @@ if (x1 !== -1) { } //CHECK#2 +var y; +var y1; y = 1; y1 = (y /= -1); if (y1 !== -1) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T3.js b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T3.js index 081264d7fa..a7fd78678e 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T3.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T3.js @@ -15,6 +15,8 @@ if (x1 !== -1) { } //CHECK#2 +var y; +var y1; y = -1; y1 = (y %= 2); if (y1 !== -1) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T4.js b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T4.js index e1ff3715ce..b671506286 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T4.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T4.js @@ -15,6 +15,8 @@ if (x1 !== 2) { } //CHECK#2 +var y; +var y1; y = 1; y1 = (y += 1); if (y1 !== 2) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T5.js b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T5.js index de2cce7f58..2275b5a0c0 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T5.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T5.js @@ -15,6 +15,8 @@ if (x1 !== -2) { } //CHECK#2 +var y; +var y1; y = -1; y1 = (y -= 1); if (y1 !== -2) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T6.js b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T6.js index 9406b51ec4..8214229331 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T6.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T6.js @@ -15,6 +15,8 @@ if (x1 !== 2) { } //CHECK#2 +var y; +var y1; y = 1; y1 = (y <<= 1); if (y1 !== 2) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T7.js b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T7.js index 85c0691db6..a48fdfb6b7 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T7.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T7.js @@ -15,6 +15,8 @@ if (x1 !== 2) { } //CHECK#2 +var y; +var y1; y = 4; y1 = (y >>= 1); if (y1 !== 2) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T8.js b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T8.js index 1ce1911c0e..66356af16c 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T8.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T8.js @@ -15,6 +15,8 @@ if (x1 !== 2) { } //CHECK#2 +var y; +var y1; y = 4; y1 = (y >>>= 1); if (y1 !== 2) { diff --git a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T9.js b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T9.js index db8362f239..9b5f3fbc1b 100644 --- a/test/language/expressions/compound-assignment/S11.13.2_A3.2_T9.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A3.2_T9.js @@ -15,6 +15,8 @@ if (x1 !== 1) { } //CHECK#2 +var y; +var y1; y = 1; y1 = (y &= 1); if (y1 !== 1) { diff --git a/test/language/expressions/delete/11.4.1-0-1.js b/test/language/expressions/delete/11.4.1-0-1.js index b1e924387c..7bcf99a86e 100644 --- a/test/language/expressions/delete/11.4.1-0-1.js +++ b/test/language/expressions/delete/11.4.1-0-1.js @@ -10,6 +10,7 @@ info: > language provides no way to directly exercise [[Delete]], the tests are placed here. es5id: 11.4.1-0-1 description: delete operator as UnaryExpression +flags: [noStrict] includes: [runTestCase.js] ---*/ diff --git a/test/language/expressions/delete/11.4.1-3-1.js b/test/language/expressions/delete/11.4.1-3-1.js index 1da46b3767..aac7f0af7d 100644 --- a/test/language/expressions/delete/11.4.1-3-1.js +++ b/test/language/expressions/delete/11.4.1-3-1.js @@ -9,6 +9,7 @@ es5id: 11.4.1-3-1 description: > delete operator returns true when deleting an unresolvable reference +flags: [noStrict] includes: [runTestCase.js] ---*/ diff --git a/test/language/expressions/delete/11.4.1-4.a-11.js b/test/language/expressions/delete/11.4.1-4.a-11.js index 0cc425d629..a4f4b01a3f 100644 --- a/test/language/expressions/delete/11.4.1-4.a-11.js +++ b/test/language/expressions/delete/11.4.1-4.a-11.js @@ -12,6 +12,7 @@ es5id: 11.4.1-4.a-11 description: > delete operator returns true on deleting arguments propterties(arguments.callee) +flags: [noStrict] includes: [runTestCase.js] ---*/ diff --git a/test/language/expressions/delete/11.4.1-4.a-12.js b/test/language/expressions/delete/11.4.1-4.a-12.js index b1b1e2ac43..cf708f8938 100644 --- a/test/language/expressions/delete/11.4.1-4.a-12.js +++ b/test/language/expressions/delete/11.4.1-4.a-12.js @@ -10,6 +10,7 @@ info: > language provides no way to directly exercise [[Delete]], the tests are placed here. es5id: 11.4.1-4.a-12 description: delete operator returns false when deleting a property(length) +flags: [noStrict] includes: [runTestCase.js] ---*/ diff --git a/test/language/expressions/delete/11.4.1-4.a-13.js b/test/language/expressions/delete/11.4.1-4.a-13.js index 680341179f..69966f3cf8 100644 --- a/test/language/expressions/delete/11.4.1-4.a-13.js +++ b/test/language/expressions/delete/11.4.1-4.a-13.js @@ -10,6 +10,7 @@ info: > language provides no way to directly exercise [[Delete]], the tests are placed here. es5id: 11.4.1-4.a-13 description: delete operator returns false when deleting Array object +flags: [noStrict] includes: [runTestCase.js] ---*/ diff --git a/test/language/expressions/delete/11.4.1-4.a-16.js b/test/language/expressions/delete/11.4.1-4.a-16.js index 0b716d7cad..bb324b7aaa 100644 --- a/test/language/expressions/delete/11.4.1-4.a-16.js +++ b/test/language/expressions/delete/11.4.1-4.a-16.js @@ -10,6 +10,7 @@ info: > language provides no way to directly exercise [[Delete]], the tests are placed here. es5id: 11.4.1-4.a-16 description: delete operator returns false on deleting arguments object +flags: [noStrict] includes: [runTestCase.js] ---*/ diff --git a/test/language/expressions/delete/11.4.1-4.a-3.js b/test/language/expressions/delete/11.4.1-4.a-3.js index eea4bd84ec..1fc6659b6f 100644 --- a/test/language/expressions/delete/11.4.1-4.a-3.js +++ b/test/language/expressions/delete/11.4.1-4.a-3.js @@ -12,6 +12,7 @@ es5id: 11.4.1-4.a-3 description: > delete operator returns false when deleting a non-configurable data property +flags: [noStrict] includes: [runTestCase.js] ---*/ diff --git a/test/language/expressions/delete/11.4.1-4.a-4.js b/test/language/expressions/delete/11.4.1-4.a-4.js index 736e70f441..d5bc35d08a 100644 --- a/test/language/expressions/delete/11.4.1-4.a-4.js +++ b/test/language/expressions/delete/11.4.1-4.a-4.js @@ -12,6 +12,7 @@ es5id: 11.4.1-4.a-4 description: > delete operator returns false when deleting a non-configurable data property (NaN) +flags: [noStrict] includes: [runTestCase.js] ---*/ diff --git a/test/language/expressions/delete/11.4.1-4.a-5.js b/test/language/expressions/delete/11.4.1-4.a-5.js index 723f10dce0..c53aa0a006 100644 --- a/test/language/expressions/delete/11.4.1-4.a-5.js +++ b/test/language/expressions/delete/11.4.1-4.a-5.js @@ -12,6 +12,7 @@ es5id: 11.4.1-4.a-5 description: > delete operator returns false when deleting the environment object inside 'with' +flags: [noStrict] includes: [runTestCase.js] ---*/ diff --git a/test/language/expressions/delete/11.4.1-4.a-6.js b/test/language/expressions/delete/11.4.1-4.a-6.js index c940630fdd..f49044f573 100644 --- a/test/language/expressions/delete/11.4.1-4.a-6.js +++ b/test/language/expressions/delete/11.4.1-4.a-6.js @@ -10,6 +10,7 @@ info: > language provides no way to directly exercise [[Delete]], the tests are placed here. es5id: 11.4.1-4.a-6 description: delete operator returns true when deleting a property inside 'with' +flags: [noStrict] includes: [runTestCase.js] ---*/ diff --git a/test/language/expressions/delete/11.4.1-4.a-7.js b/test/language/expressions/delete/11.4.1-4.a-7.js index 3379e544e3..e41da2ed49 100644 --- a/test/language/expressions/delete/11.4.1-4.a-7.js +++ b/test/language/expressions/delete/11.4.1-4.a-7.js @@ -10,6 +10,7 @@ info: > language provides no way to directly exercise [[Delete]], the tests are placed here. es5id: 11.4.1-4.a-7 description: delete operator inside 'eval' +flags: [noStrict] includes: [runTestCase.js] ---*/ diff --git a/test/language/expressions/delete/11.4.1-4.a-8.js b/test/language/expressions/delete/11.4.1-4.a-8.js index 4b28f9c84d..3492b07623 100644 --- a/test/language/expressions/delete/11.4.1-4.a-8.js +++ b/test/language/expressions/delete/11.4.1-4.a-8.js @@ -10,6 +10,7 @@ info: > language provides no way to directly exercise [[Delete]], the tests are placed here. es5id: 11.4.1-4.a-8 description: delete operator returns true for built-in objects (JSON) +flags: [noStrict] includes: [runTestCase.js] ---*/ diff --git a/test/language/expressions/delete/11.4.1-4.a-9.js b/test/language/expressions/delete/11.4.1-4.a-9.js index e690954c74..0b6b234909 100644 --- a/test/language/expressions/delete/11.4.1-4.a-9.js +++ b/test/language/expressions/delete/11.4.1-4.a-9.js @@ -12,6 +12,7 @@ es5id: 11.4.1-4.a-9 description: > delete operator returns false when deleting a non-configurable data property (Math.LN2) +flags: [noStrict] includes: [runTestCase.js] ---*/ diff --git a/test/language/expressions/delete/11.4.1-5-1.js b/test/language/expressions/delete/11.4.1-5-1.js index cde7ae1ced..cdd7d2f1c2 100644 --- a/test/language/expressions/delete/11.4.1-5-1.js +++ b/test/language/expressions/delete/11.4.1-5-1.js @@ -9,6 +9,7 @@ es5id: 11.4.1-5-1 description: > delete operator returns false when deleting a direct reference to a var +flags: [noStrict] includes: [runTestCase.js] ---*/ diff --git a/test/language/expressions/delete/11.4.1-5-2.js b/test/language/expressions/delete/11.4.1-5-2.js index bdfc64b396..fa560adc9f 100644 --- a/test/language/expressions/delete/11.4.1-5-2.js +++ b/test/language/expressions/delete/11.4.1-5-2.js @@ -9,6 +9,7 @@ es5id: 11.4.1-5-2 description: > delete operator returns false when deleting a direct reference to a function argument +flags: [noStrict] includes: [runTestCase.js] ---*/ diff --git a/test/language/expressions/delete/11.4.1-5-3.js b/test/language/expressions/delete/11.4.1-5-3.js index bff19aad08..1ded937657 100644 --- a/test/language/expressions/delete/11.4.1-5-3.js +++ b/test/language/expressions/delete/11.4.1-5-3.js @@ -9,6 +9,7 @@ es5id: 11.4.1-5-3 description: > delete operator returns false when deleting a direct reference to a function name +flags: [noStrict] includes: - runTestCase.js - fnExists.js diff --git a/test/language/expressions/delete/S11.4.1_A2.2_T1.js b/test/language/expressions/delete/S11.4.1_A2.2_T1.js index 333d1e0502..17eb9cf20a 100644 --- a/test/language/expressions/delete/S11.4.1_A2.2_T1.js +++ b/test/language/expressions/delete/S11.4.1_A2.2_T1.js @@ -5,14 +5,10 @@ info: If GetBase(x) doesn't have a property GetPropertyName(x), return true es5id: 11.4.1_A2.2_T1 description: Checking undeclared variable case +flags: [noStrict] ---*/ //CHECK#1 if (delete x !== true) { $ERROR('#1: delete x === true'); } - -//CHECK#2 -if (delete this.x !== true) { - $ERROR('#2: delete this.x === true'); -} diff --git a/test/language/expressions/delete/S11.4.1_A2.2_T3.js b/test/language/expressions/delete/S11.4.1_A2.2_T3.js new file mode 100755 index 0000000000..cf63124c66 --- /dev/null +++ b/test/language/expressions/delete/S11.4.1_A2.2_T3.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: If GetBase(x) doesn't have a property GetPropertyName(x), return true +es5id: 11.4.1_A2.2_T3 +description: Checking undeclared variable case +---*/ + +//CHECK#1 +if (delete this.x !== true) { + $ERROR('#1: delete this.x === true'); +} diff --git a/test/language/expressions/delete/S11.4.1_A3.1.js b/test/language/expressions/delete/S11.4.1_A3.1.js index d60cb66e21..8a5fd33e89 100644 --- a/test/language/expressions/delete/S11.4.1_A3.1.js +++ b/test/language/expressions/delete/S11.4.1_A3.1.js @@ -5,6 +5,7 @@ info: If the property has the DontDelete attribute, return false es5id: 11.4.1_A3.1 description: Checking declared variable +flags: [noStrict] ---*/ //CHECK#1 diff --git a/test/language/expressions/delete/S11.4.1_A3.2_T1.js b/test/language/expressions/delete/S11.4.1_A3.2_T1.js new file mode 100755 index 0000000000..8953c007b2 --- /dev/null +++ b/test/language/expressions/delete/S11.4.1_A3.2_T1.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: If the property doesn't have the DontDelete attribute, return true +es5id: 11.4.1_A3.2_T1 +description: Checking declared variable +flags: [noStrict] +---*/ + +//CHECK#1 +x = 1; +if (delete x !== true) { + $ERROR('#1: x = 1; delete x === true'); +} diff --git a/test/language/expressions/delete/S11.4.1_A3.2_T2.js b/test/language/expressions/delete/S11.4.1_A3.2_T2.js new file mode 100755 index 0000000000..5a4771d6e1 --- /dev/null +++ b/test/language/expressions/delete/S11.4.1_A3.2_T2.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: If the property doesn't have the DontDelete attribute, return true +es5id: 11.4.1_A3.2_T2 +description: Checking declared variable +---*/ + +//CHECK#1 +function MyFunction(){}; +MyFunction.prop = 1; +if (delete MyFunction.prop !== true) { + $ERROR('#1: function MyFunction(){}; MyFunction.prop = 1; delete MyFunction.prop === true'); +} diff --git a/test/language/expressions/delete/S11.4.1_A3.2.js b/test/language/expressions/delete/S11.4.1_A3.2_T3.js similarity index 55% rename from test/language/expressions/delete/S11.4.1_A3.2.js rename to test/language/expressions/delete/S11.4.1_A3.2_T3.js index d912b3d1a3..799354e5fa 100644 --- a/test/language/expressions/delete/S11.4.1_A3.2.js +++ b/test/language/expressions/delete/S11.4.1_A3.2_T3.js @@ -3,27 +3,14 @@ /*--- info: If the property doesn't have the DontDelete attribute, return true -es5id: 11.4.1_A3.2 +es5id: 11.4.1_A3.2_T3 description: Checking declared variable ---*/ //CHECK#1 -x = 1; -if (delete x !== true) { - $ERROR('#1: x = 1; delete x === true'); -} - -//CHECK#2 -function MyFunction(){}; -MyFunction.prop = 1; -if (delete MyFunction.prop !== true) { - $ERROR('#2: function MyFunction(){}; MyFunction.prop = 1; delete MyFunction.prop === true'); -} - -//CHECK#3 function MyFunction(){}; var MyObject = new MyFunction(); MyObject.prop = 1; if (delete MyObject.prop !== true) { - $ERROR('#3: function MyFunction(){}; var MyObject = new MyFunction(); MyFunction.prop = 1; delete MyObject.prop === true'); + $ERROR('#1: function MyFunction(){}; var MyObject = new MyFunction(); MyFunction.prop = 1; delete MyObject.prop === true'); } diff --git a/test/language/expressions/delete/S11.4.1_A3.3.js b/test/language/expressions/delete/S11.4.1_A3.3.js deleted file mode 100644 index 913e346834..0000000000 --- a/test/language/expressions/delete/S11.4.1_A3.3.js +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: If the property doesn't have the DontDelete attribute, remove the property -es5id: 11.4.1_A3.3 -description: Checking declared variable ----*/ - -//CHECK#1 -try { - x = 1; - delete x; - x; - $ERROR('#1: x = 1; delete x; x is not exist'); -} catch (e) { - if (e instanceof ReferenceError !== true) { - $ERROR('#1: x = 1; delete x; x is not exist'); - } -} - - -//CHECK#2 -function MyFunction(){}; -MyFunction.prop = 1; -delete MyFunction.prop; -if (MyFunction.prop !== undefined) { - $ERROR('#2: function MyFunction(){}; MyFunction.prop = 1; delete MyFunction.prop; MyFunction.prop === undefined. Actual: ' + (MyFunction.prop)); - -} - -//CHECK#3 -function MyFunction(){}; -var MyObjectVar = new MyFunction(); -MyObjectVar.prop = 1; -delete MyObjectVar.prop; -if (MyObjectVar.prop !== undefined) { - $ERROR('#3: function MyFunction(){}; var MyObjectVar = new MyFunction(); MyFunction.prop = 1; delete MyObjectVar.prop; MyObjectVar.prop === undefined. Actual: ' + (MyObjectVar.prop)); -} - -//CHECK#4 -if (delete MyObjectVar !== false) { - $ERROR('#4: function MyFunction(){}; var MyObjectVar = new MyFunction(); delete MyObjectVar === false'); -} - -//CHECK#5 -function MyFunction(){}; -MyObjectNotVar = new MyFunction(); -MyObjectNotVar.prop = 1; -delete MyObjectNotVar.prop; -if (MyObjectNotVar.prop !== undefined) { - $ERROR('#5: function MyFunction(){}; MyObjectNotVar = new MyFunction(); MyFunction.prop = 1; delete MyObjectNotVar.prop; MyObjectNotVar.prop === undefined. Actual: ' + (MyObjectNotVar.prop)); -} - -//CHECK#6 -if (delete MyObjectNotVar !== true) { - $ERROR('#6: function MyFunction(){}; var MyObjectNotVar = new MyFunction(); delete MyObjectNotVar === true'); -} diff --git a/test/language/expressions/delete/S11.4.1_A3.3_T1.js b/test/language/expressions/delete/S11.4.1_A3.3_T1.js new file mode 100644 index 0000000000..99e0644856 --- /dev/null +++ b/test/language/expressions/delete/S11.4.1_A3.3_T1.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: If the property doesn't have the DontDelete attribute, remove the property +es5id: 11.4.1_A3.3_T1 +description: Checking declared variable +flags: [noStrict] +---*/ + +//CHECK#1 +try { + x = 1; + delete x; + x; + $ERROR('#1: x = 1; delete x; x is not exist'); +} catch (e) { + if (e instanceof ReferenceError !== true) { + $ERROR('#1: x = 1; delete x; x is not exist'); + } +} diff --git a/test/language/expressions/delete/S11.4.1_A3.3_T2.js b/test/language/expressions/delete/S11.4.1_A3.3_T2.js new file mode 100755 index 0000000000..fa66d738f1 --- /dev/null +++ b/test/language/expressions/delete/S11.4.1_A3.3_T2.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: If the property doesn't have the DontDelete attribute, remove the property +es5id: 11.4.1_A3.3_T2 +description: Checking declared variable +---*/ + +//CHECK#1 +function MyFunction(){}; +MyFunction.prop = 1; +delete MyFunction.prop; +if (MyFunction.prop !== undefined) { + $ERROR('#1: function MyFunction(){}; MyFunction.prop = 1; delete MyFunction.prop; MyFunction.prop === undefined. Actual: ' + (MyFunction.prop)); + +} diff --git a/test/language/expressions/delete/S11.4.1_A3.3_T3.js b/test/language/expressions/delete/S11.4.1_A3.3_T3.js new file mode 100755 index 0000000000..23b019b356 --- /dev/null +++ b/test/language/expressions/delete/S11.4.1_A3.3_T3.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: If the property doesn't have the DontDelete attribute, remove the property +es5id: 11.4.1_A3.3_T3 +description: Checking declared variable +---*/ + +//CHECK#1 +function MyFunction(){}; +var MyObjectVar = new MyFunction(); +MyObjectVar.prop = 1; +delete MyObjectVar.prop; +if (MyObjectVar.prop !== undefined) { + $ERROR('#1: function MyFunction(){}; var MyObjectVar = new MyFunction(); MyFunction.prop = 1; delete MyObjectVar.prop; MyObjectVar.prop === undefined. Actual: ' + (MyObjectVar.prop)); +} diff --git a/test/language/expressions/delete/S11.4.1_A3.3_T4.js b/test/language/expressions/delete/S11.4.1_A3.3_T4.js new file mode 100755 index 0000000000..2eaf5fb530 --- /dev/null +++ b/test/language/expressions/delete/S11.4.1_A3.3_T4.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: If the property doesn't have the DontDelete attribute, remove the property +es5id: 11.4.1_A3.3_T4 +description: Checking declared variable +flags: [noStrict] +---*/ + +//CHECK#1 +function MyFunction(){}; +var MyObjectVar = new MyFunction(); +if (delete MyObjectVar !== false) { + $ERROR('#1: function MyFunction(){}; var MyObjectVar = new MyFunction(); delete MyObjectVar === false'); +} diff --git a/test/language/expressions/delete/S11.4.1_A3.3_T5.js b/test/language/expressions/delete/S11.4.1_A3.3_T5.js new file mode 100755 index 0000000000..fc537b309f --- /dev/null +++ b/test/language/expressions/delete/S11.4.1_A3.3_T5.js @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: If the property doesn't have the DontDelete attribute, remove the property +es5id: 11.4.1_A3.3_T5 +description: Checking declared variable +flags: [noStrict] +---*/ + +//CHECK#1 +function MyFunction(){}; +MyObjectNotVar = new MyFunction(); +MyObjectNotVar.prop = 1; +delete MyObjectNotVar.prop; +if (MyObjectNotVar.prop !== undefined) { + $ERROR('#1: function MyFunction(){}; MyObjectNotVar = new MyFunction(); MyFunction.prop = 1; delete MyObjectNotVar.prop; MyObjectNotVar.prop === undefined. Actual: ' + (MyObjectNotVar.prop)); +} diff --git a/test/language/expressions/delete/S11.4.1_A3.3_T6.js b/test/language/expressions/delete/S11.4.1_A3.3_T6.js new file mode 100755 index 0000000000..119a867078 --- /dev/null +++ b/test/language/expressions/delete/S11.4.1_A3.3_T6.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: If the property doesn't have the DontDelete attribute, remove the property +es5id: 11.4.1_A3.3_T6 +description: Checking declared variable +flags: [noStrict] +---*/ + +//CHECK#1 +function MyFunction(){}; +var MyObjectVar = new MyFunction(); +if (delete MyObjectNotVar !== true) { + $ERROR('#1: function MyFunction(){}; var MyObjectNotVar = new MyFunction(); delete MyObjectNotVar === true'); +} diff --git a/test/language/expressions/delete/S11.4.1_A4.js b/test/language/expressions/delete/S11.4.1_A4.js index cb2ee1a7a8..674fe6b866 100644 --- a/test/language/expressions/delete/S11.4.1_A4.js +++ b/test/language/expressions/delete/S11.4.1_A4.js @@ -7,6 +7,7 @@ info: > the object es5id: 11.4.1_A4 description: Checking two reference by one object +flags: [noStrict] ---*/ //CHECK#1 diff --git a/test/language/expressions/division/S11.5.2_A2.4_T3.js b/test/language/expressions/division/S11.5.2_A2.4_T3.js index 65f9e436f9..e03ab67521 100644 --- a/test/language/expressions/division/S11.5.2_A2.4_T3.js +++ b/test/language/expressions/division/S11.5.2_A2.4_T3.js @@ -17,8 +17,3 @@ catch (e) { $ERROR('#1.2: x / (x = 1) throw ReferenceError. Actual: ' + (e)); } } - -//CHECK#2 -if ((y = 1) / y !== 1) { - $ERROR('#2: (y = 1) / y === 1. Actual: ' + ((y = 1) / y)); -} diff --git a/test/language/expressions/division/S11.5.2_A2.4_T4.js b/test/language/expressions/division/S11.5.2_A2.4_T4.js new file mode 100755 index 0000000000..ea0aa897ee --- /dev/null +++ b/test/language/expressions/division/S11.5.2_A2.4_T4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.5.2_A2.4_T4 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ + +//CHECK#1 +if ((y = 1) / y !== 1) { + $ERROR('#1: (y = 1) / y === 1. Actual: ' + ((y = 1) / y)); +} diff --git a/test/language/expressions/does-not-equals/S11.9.2_A2.4_T3.js b/test/language/expressions/does-not-equals/S11.9.2_A2.4_T3.js index 39496dd98e..464c3074d4 100644 --- a/test/language/expressions/does-not-equals/S11.9.2_A2.4_T3.js +++ b/test/language/expressions/does-not-equals/S11.9.2_A2.4_T3.js @@ -17,8 +17,3 @@ catch (e) { $ERROR('#1.2: x != (x = 1) throw ReferenceError. Actual: ' + (e)); } } - -//CHECK#2 -if (((y = 1) != y) !== false) { - $ERROR('#2: ((y = 1) != y) === false'); -} diff --git a/test/language/expressions/does-not-equals/S11.9.2_A2.4_T4.js b/test/language/expressions/does-not-equals/S11.9.2_A2.4_T4.js new file mode 100755 index 0000000000..b3625e66f0 --- /dev/null +++ b/test/language/expressions/does-not-equals/S11.9.2_A2.4_T4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.9.2_A2.4_T4 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ + +//CHECK#1 +if (((y = 1) != y) !== false) { + $ERROR('#1: ((y = 1) != y) === false'); +} diff --git a/test/language/expressions/equals/S11.9.1_A2.4_T3.js b/test/language/expressions/equals/S11.9.1_A2.4_T3.js index 799ef11899..6cb93317ea 100644 --- a/test/language/expressions/equals/S11.9.1_A2.4_T3.js +++ b/test/language/expressions/equals/S11.9.1_A2.4_T3.js @@ -17,8 +17,3 @@ catch (e) { $ERROR('#1.2: x == (x = 1) throw ReferenceError. Actual: ' + (e)); } } - -//CHECK#2 -if (((y = 1) == y) !== true) { - $ERROR('#2: ((y = 1) == y) === true'); -} diff --git a/test/language/expressions/equals/S11.9.1_A2.4_T4.js b/test/language/expressions/equals/S11.9.1_A2.4_T4.js new file mode 100755 index 0000000000..2629103b9e --- /dev/null +++ b/test/language/expressions/equals/S11.9.1_A2.4_T4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.9.1_A2.4_T4 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ + +//CHECK#1 +if (((y = 1) == y) !== true) { + $ERROR('#1: ((y = 1) == y) === true'); +} diff --git a/test/language/expressions/greater-than-or-equal/S11.8.4_A2.4_T3.js b/test/language/expressions/greater-than-or-equal/S11.8.4_A2.4_T3.js index c3dac2a02c..2f747de988 100644 --- a/test/language/expressions/greater-than-or-equal/S11.8.4_A2.4_T3.js +++ b/test/language/expressions/greater-than-or-equal/S11.8.4_A2.4_T3.js @@ -17,8 +17,3 @@ catch (e) { $ERROR('#1.2: x >= (x = 1) throw ReferenceError. Actual: ' + (e)); } } - -//CHECK#2 -if ((y = 1) >= y !== true) { - $ERROR('#2: (y = 1) >= y === true'); -} diff --git a/test/language/expressions/greater-than-or-equal/S11.8.4_A2.4_T4.js b/test/language/expressions/greater-than-or-equal/S11.8.4_A2.4_T4.js new file mode 100755 index 0000000000..b153180fb6 --- /dev/null +++ b/test/language/expressions/greater-than-or-equal/S11.8.4_A2.4_T4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.4_A2.4_T4 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ + +//CHECK#1 +if ((y = 1) >= y !== true) { + $ERROR('#1: (y = 1) >= y === true'); +} diff --git a/test/language/expressions/greater-than/S11.8.2_A2.4_T3.js b/test/language/expressions/greater-than/S11.8.2_A2.4_T3.js index 76bac70103..146b858db2 100644 --- a/test/language/expressions/greater-than/S11.8.2_A2.4_T3.js +++ b/test/language/expressions/greater-than/S11.8.2_A2.4_T3.js @@ -17,8 +17,3 @@ catch (e) { $ERROR('#1.2: x > (x = 1) throw ReferenceError. Actual: ' + (e)); } } - -//CHECK#2 -if ((y = 1) > y !== false) { - $ERROR('#2: (y = 1) > y === false'); -} diff --git a/test/language/expressions/greater-than/S11.8.2_A2.4_T4.js b/test/language/expressions/greater-than/S11.8.2_A2.4_T4.js new file mode 100755 index 0000000000..d3b5fafab5 --- /dev/null +++ b/test/language/expressions/greater-than/S11.8.2_A2.4_T4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.2_A2.4_T4 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ + +//CHECK#1 +if ((y = 1) > y !== false) { + $ERROR('#1: (y = 1) > y === false'); +} diff --git a/test/language/expressions/grouping/S11.1.6_A2.js b/test/language/expressions/grouping/S11.1.6_A2_T1.js old mode 100644 new mode 100755 similarity index 68% rename from test/language/expressions/grouping/S11.1.6_A2.js rename to test/language/expressions/grouping/S11.1.6_A2_T1.js index eb6bd364ff..4d70a0b2e8 --- a/test/language/expressions/grouping/S11.1.6_A2.js +++ b/test/language/expressions/grouping/S11.1.6_A2_T1.js @@ -5,29 +5,24 @@ info: > "This" operator doesn't use GetValue. The operators "delete" and "typeof" can be applied to parenthesised expressions -es5id: 11.1.6_A2 +es5id: 11.1.6_A2_T1 description: > Applying "delete" and "typeof" operators to an undefined variable and a property of an object ---*/ //CHECK#1 -if (delete (x) !== true) { - $ERROR('#1: delete (x) === true'); -} - -//CHECK#2 if (typeof (x) !== "undefined") { - $ERROR('#2: typeof (x) === "undefined". Actual: ' + (typeof (x))); + $ERROR('#1: typeof (x) === "undefined". Actual: ' + (typeof (x))); } var object = {}; -//CHECK#3 +//CHECK#2 if (delete (object.prop) !== true) { - $ERROR('#3: var object = {}; delete (object.prop) === true'); + $ERROR('#2: var object = {}; delete (object.prop) === true'); } -//CHECK#4 +//CHECK#3 if (typeof (object.prop) !== "undefined") { - $ERROR('#4: var object = {}; typeof (object.prop) === "undefined". Actual: ' + (typeof (object.prop))); + $ERROR('#3: var object = {}; typeof (object.prop) === "undefined". Actual: ' + (typeof (object.prop))); } diff --git a/test/language/expressions/grouping/S11.1.6_A2_T2.js b/test/language/expressions/grouping/S11.1.6_A2_T2.js new file mode 100644 index 0000000000..d8b06c859d --- /dev/null +++ b/test/language/expressions/grouping/S11.1.6_A2_T2.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: > + "This" operator doesn't use GetValue. The operators "delete" and "typeof" + can be applied to parenthesised expressions +es5id: 11.1.6_A2_T2 +description: > + Applying "delete" operator to an undefined variable +flags: [noStrict] +---*/ + +//CHECK#1 +if (delete (x) !== true) { + $ERROR('#1: delete (x) === true'); +} diff --git a/test/language/expressions/grouping/S11.1.6_A3_T5.js b/test/language/expressions/grouping/S11.1.6_A3_T5.js index 8090be52e2..9f0e0ada1d 100644 --- a/test/language/expressions/grouping/S11.1.6_A3_T5.js +++ b/test/language/expressions/grouping/S11.1.6_A3_T5.js @@ -8,6 +8,7 @@ description: Using grouping operator in declaration of variables ---*/ //CHECK#1 +var x; (x) = 1; if (x !== 1) { $ERROR('#1: (x) = 1; x === 1. Actual: ' + (x)); diff --git a/test/language/expressions/grouping/S11.1.6_A3_T6.js b/test/language/expressions/grouping/S11.1.6_A3_T6.js index d8c0f41ed8..9aac19ada5 100644 --- a/test/language/expressions/grouping/S11.1.6_A3_T6.js +++ b/test/language/expressions/grouping/S11.1.6_A3_T6.js @@ -4,15 +4,11 @@ /*--- info: "\"This\" operator only evaluates Expression" es5id: 11.1.6_A3_T6 -description: Applying grouping operator to delete and typeof operators +description: Applying grouping operator to delete operator +flags: [noStrict] ---*/ //CHECK#1 if (delete (x) !== true) { $ERROR('#1: delete (x) === true'); } - -//CHECK#2 -if (typeof (x) !== "undefined") { - $ERROR('#2: typeof (x) === "undefined". Actual: ' + (typeof (x))); -} diff --git a/test/language/expressions/grouping/S11.1.6_A3_T7.js b/test/language/expressions/grouping/S11.1.6_A3_T7.js new file mode 100755 index 0000000000..509cc267cc --- /dev/null +++ b/test/language/expressions/grouping/S11.1.6_A3_T7.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "\"This\" operator only evaluates Expression" +es5id: 11.1.6_A3_T7 +description: Applying grouping operator to typeof operator +---*/ + +//CHECK#1 +if (typeof (x) !== "undefined") { + $ERROR('#1: typeof (x) === "undefined". Actual: ' + (typeof (x))); +} diff --git a/test/language/expressions/in/S11.8.7_A2.4_T3.js b/test/language/expressions/in/S11.8.7_A2.4_T3.js index 497a9d32be..cfae8d8956 100644 --- a/test/language/expressions/in/S11.8.7_A2.4_T3.js +++ b/test/language/expressions/in/S11.8.7_A2.4_T3.js @@ -17,8 +17,3 @@ catch (e) { $ERROR('#1.2: max_value in (max_value = "MAX_VALUE", Number) throw ReferenceError. Actual: ' + (e)); } } - -//CHECK#2 -if ((NUMBER = Number, "MAX_VALUE") in NUMBER !== true) { - $ERROR('#2: (NUMBER = Number, "MAX_VALUE") in NUMBER !== true'); -} diff --git a/test/language/expressions/in/S11.8.7_A2.4_T4.js b/test/language/expressions/in/S11.8.7_A2.4_T4.js new file mode 100755 index 0000000000..524a8c6938 --- /dev/null +++ b/test/language/expressions/in/S11.8.7_A2.4_T4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.7_A2.4_T4 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ + +//CHECK#1 +if ((NUMBER = Number, "MAX_VALUE") in NUMBER !== true) { + $ERROR('#1: (NUMBER = Number, "MAX_VALUE") in NUMBER !== true'); +} diff --git a/test/language/expressions/instanceof/S11.8.6_A2.4_T3.js b/test/language/expressions/instanceof/S11.8.6_A2.4_T3.js index 00d741a020..2775cf1501 100644 --- a/test/language/expressions/instanceof/S11.8.6_A2.4_T3.js +++ b/test/language/expressions/instanceof/S11.8.6_A2.4_T3.js @@ -17,8 +17,3 @@ catch (e) { $ERROR('#1.2: object instanceof (object = {}, Object) throw ReferenceError. Actual: ' + (e)); } } - -//CHECK#2 -if ((OBJECT = Object, {}) instanceof OBJECT !== true) { - $ERROR('#2: (OBJECT = Object, {}) instanceof OBJECT !== true'); -} diff --git a/test/language/expressions/instanceof/S11.8.6_A2.4_T4.js b/test/language/expressions/instanceof/S11.8.6_A2.4_T4.js new file mode 100755 index 0000000000..3be8567903 --- /dev/null +++ b/test/language/expressions/instanceof/S11.8.6_A2.4_T4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.6_A2.4_T4 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ + +//CHECK#1 +if ((OBJECT = Object, {}) instanceof OBJECT !== true) { + $ERROR('#1: (OBJECT = Object, {}) instanceof OBJECT !== true'); +} diff --git a/test/language/expressions/instanceof/S15.3.5.3_A1_T1.js b/test/language/expressions/instanceof/S15.3.5.3_A1_T1.js index 4b817a2160..f24108b6f1 100644 --- a/test/language/expressions/instanceof/S15.3.5.3_A1_T1.js +++ b/test/language/expressions/instanceof/S15.3.5.3_A1_T1.js @@ -10,6 +10,7 @@ es5id: 15.3.5.3_A1_T1 description: V is number ---*/ +var FACTORY; FACTORY = Function("name","this.name=name;"); //CHECK#1 diff --git a/test/language/expressions/instanceof/S15.3.5.3_A1_T2.js b/test/language/expressions/instanceof/S15.3.5.3_A1_T2.js index cf93a6dc11..8ab2ef4780 100644 --- a/test/language/expressions/instanceof/S15.3.5.3_A1_T2.js +++ b/test/language/expressions/instanceof/S15.3.5.3_A1_T2.js @@ -10,6 +10,7 @@ es5id: 15.3.5.3_A1_T2 description: V is string ---*/ +var FACTORY; FACTORY = Function("name","this.name=name;"); //CHECK#1 diff --git a/test/language/expressions/instanceof/S15.3.5.3_A1_T3.js b/test/language/expressions/instanceof/S15.3.5.3_A1_T3.js index ce515e4252..3093b99aa9 100644 --- a/test/language/expressions/instanceof/S15.3.5.3_A1_T3.js +++ b/test/language/expressions/instanceof/S15.3.5.3_A1_T3.js @@ -10,6 +10,7 @@ es5id: 15.3.5.3_A1_T3 description: V is boolean true ---*/ +var FACTORY; FACTORY = Function("name","this.name=name;"); //CHECK#1 diff --git a/test/language/expressions/instanceof/S15.3.5.3_A1_T4.js b/test/language/expressions/instanceof/S15.3.5.3_A1_T4.js index 287877b3b9..e2eaead738 100644 --- a/test/language/expressions/instanceof/S15.3.5.3_A1_T4.js +++ b/test/language/expressions/instanceof/S15.3.5.3_A1_T4.js @@ -10,6 +10,7 @@ es5id: 15.3.5.3_A1_T4 description: V is boolean false ---*/ +var FACTORY; FACTORY = Function("name","this.name=name;"); //CHECK#1 diff --git a/test/language/expressions/instanceof/S15.3.5.3_A1_T5.js b/test/language/expressions/instanceof/S15.3.5.3_A1_T5.js index ba9d71d030..91c8a9cd5a 100644 --- a/test/language/expressions/instanceof/S15.3.5.3_A1_T5.js +++ b/test/language/expressions/instanceof/S15.3.5.3_A1_T5.js @@ -10,6 +10,7 @@ es5id: 15.3.5.3_A1_T5 description: V is void 0 ---*/ +var FACTORY; FACTORY = Function("name","this.name=name;"); //CHECK#1 diff --git a/test/language/expressions/instanceof/S15.3.5.3_A1_T6.js b/test/language/expressions/instanceof/S15.3.5.3_A1_T6.js index 6124c4c575..ab6a80d432 100644 --- a/test/language/expressions/instanceof/S15.3.5.3_A1_T6.js +++ b/test/language/expressions/instanceof/S15.3.5.3_A1_T6.js @@ -10,6 +10,7 @@ es5id: 15.3.5.3_A1_T6 description: V is null ---*/ +var FACTORY; FACTORY = Function("name","this.name=name;"); //CHECK#1 diff --git a/test/language/expressions/instanceof/S15.3.5.3_A1_T7.js b/test/language/expressions/instanceof/S15.3.5.3_A1_T7.js index 89962be679..a6c1f7b2c5 100644 --- a/test/language/expressions/instanceof/S15.3.5.3_A1_T7.js +++ b/test/language/expressions/instanceof/S15.3.5.3_A1_T7.js @@ -10,6 +10,7 @@ es5id: 15.3.5.3_A1_T7 description: V is undefined ---*/ +var FACTORY; FACTORY = Function("name","this.name=name;"); //CHECK#1 diff --git a/test/language/expressions/instanceof/S15.3.5.3_A1_T8.js b/test/language/expressions/instanceof/S15.3.5.3_A1_T8.js index 0727b3f0c1..6efb538d8d 100644 --- a/test/language/expressions/instanceof/S15.3.5.3_A1_T8.js +++ b/test/language/expressions/instanceof/S15.3.5.3_A1_T8.js @@ -10,6 +10,7 @@ es5id: 15.3.5.3_A1_T8 description: V is undefined variable ---*/ +var FACTORY; FACTORY = Function("name","this.name=name;"); //CHECK#1 diff --git a/test/language/expressions/instanceof/S15.3.5.3_A2_T2.js b/test/language/expressions/instanceof/S15.3.5.3_A2_T2.js index 1bfc025c55..bd99332602 100644 --- a/test/language/expressions/instanceof/S15.3.5.3_A2_T2.js +++ b/test/language/expressions/instanceof/S15.3.5.3_A2_T2.js @@ -12,10 +12,12 @@ description: F.prototype is undefined, and V is empty object includes: [$FAIL.js] ---*/ +var FACTORY; FACTORY = new Function; FACTORY.prototype = undefined; +var obj; obj={}; //CHECK#1 diff --git a/test/language/expressions/instanceof/S15.3.5.3_A2_T5.js b/test/language/expressions/instanceof/S15.3.5.3_A2_T5.js index 045a9b3ab4..a615e68e5f 100644 --- a/test/language/expressions/instanceof/S15.3.5.3_A2_T5.js +++ b/test/language/expressions/instanceof/S15.3.5.3_A2_T5.js @@ -13,10 +13,12 @@ description: F.prototype is void 0, and V is new F includes: [$FAIL.js] ---*/ +var FACTORY; FACTORY = Function("this.prop=1;"); FACTORY.prototype.name = "fairy"; +var instance; instance = new FACTORY; FACTORY.prototype = void 0; diff --git a/test/language/expressions/instanceof/S15.3.5.3_A2_T6.js b/test/language/expressions/instanceof/S15.3.5.3_A2_T6.js index 3e08d96600..7330927599 100644 --- a/test/language/expressions/instanceof/S15.3.5.3_A2_T6.js +++ b/test/language/expressions/instanceof/S15.3.5.3_A2_T6.js @@ -13,6 +13,7 @@ description: F.prototype is string, and V is function includes: [$FAIL.js] ---*/ +var FACTORY; FACTORY = new Function; FACTORY.prototype = "error"; diff --git a/test/language/expressions/instanceof/S15.3.5.3_A3_T1.js b/test/language/expressions/instanceof/S15.3.5.3_A3_T1.js index b560659f26..c7fd63afa2 100644 --- a/test/language/expressions/instanceof/S15.3.5.3_A3_T1.js +++ b/test/language/expressions/instanceof/S15.3.5.3_A3_T1.js @@ -14,10 +14,12 @@ es5id: 15.3.5.3_A3_T1 description: F.prototype.type is 1, and V is new F ---*/ +var FACTORY; FACTORY = Function("this.name=\"root\""); FACTORY.prototype.type=1; +var instance; instance = new FACTORY; //CHECK#1 diff --git a/test/language/expressions/instanceof/S15.3.5.3_A3_T2.js b/test/language/expressions/instanceof/S15.3.5.3_A3_T2.js index c6dc601d04..713a6d56f9 100644 --- a/test/language/expressions/instanceof/S15.3.5.3_A3_T2.js +++ b/test/language/expressions/instanceof/S15.3.5.3_A3_T2.js @@ -14,8 +14,10 @@ es5id: 15.3.5.3_A3_T2 description: F.prototype is Object.prototype, and V is empty object ---*/ +var FAKEFACTORY; FAKEFACTORY = Function(); +var fakeinstance; fakeinstance = {}; //CHECK#1 diff --git a/test/language/expressions/left-shift/S11.7.1_A2.4_T3.js b/test/language/expressions/left-shift/S11.7.1_A2.4_T3.js index c5b1a19733..017af2101f 100644 --- a/test/language/expressions/left-shift/S11.7.1_A2.4_T3.js +++ b/test/language/expressions/left-shift/S11.7.1_A2.4_T3.js @@ -17,8 +17,3 @@ catch (e) { $ERROR('#1.2: x << (x = 1) throw ReferenceError. Actual: ' + (e)); } } - -//CHECK#2 -if ((y = 1) << y !== 2) { - $ERROR('#2: (y = 1) << y === 2. Actual: ' + ((y = 1) << y)); -} diff --git a/test/language/expressions/left-shift/S11.7.1_A2.4_T4.js b/test/language/expressions/left-shift/S11.7.1_A2.4_T4.js new file mode 100755 index 0000000000..885b8e2d91 --- /dev/null +++ b/test/language/expressions/left-shift/S11.7.1_A2.4_T4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.7.1_A2.4_T4 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ + +//CHECK#1 +if ((y = 1) << y !== 2) { + $ERROR('#1: (y = 1) << y === 2. Actual: ' + ((y = 1) << y)); +} diff --git a/test/language/expressions/less-than-or-equal/S11.8.3_A2.4_T3.js b/test/language/expressions/less-than-or-equal/S11.8.3_A2.4_T3.js index 848a590cdf..b07c1dcd37 100644 --- a/test/language/expressions/less-than-or-equal/S11.8.3_A2.4_T3.js +++ b/test/language/expressions/less-than-or-equal/S11.8.3_A2.4_T3.js @@ -17,8 +17,3 @@ catch (e) { $ERROR('#1.2: x <= (x = 1) throw ReferenceError. Actual: ' + (e)); } } - -//CHECK#2 -if ((y = 1) <= y !== true) { - $ERROR('#2: (y = 1) <= y === true'); -} diff --git a/test/language/expressions/less-than-or-equal/S11.8.3_A2.4_T4.js b/test/language/expressions/less-than-or-equal/S11.8.3_A2.4_T4.js new file mode 100755 index 0000000000..9deaa72d6e --- /dev/null +++ b/test/language/expressions/less-than-or-equal/S11.8.3_A2.4_T4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.3_A2.4_T4 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ + +//CHECK#1 +if ((y = 1) <= y !== true) { + $ERROR('#1: (y = 1) <= y === true'); +} diff --git a/test/language/expressions/less-than/S11.8.1_A2.4_T3.js b/test/language/expressions/less-than/S11.8.1_A2.4_T3.js index 1aafa984f7..e976549708 100644 --- a/test/language/expressions/less-than/S11.8.1_A2.4_T3.js +++ b/test/language/expressions/less-than/S11.8.1_A2.4_T3.js @@ -17,8 +17,3 @@ catch (e) { $ERROR('#1.2: x < (x = 1) throw ReferenceError. Actual: ' + (e)); } } - -//CHECK#2 -if ((y = 1) < y !== false) { - $ERROR('#2: (y = 1) < y === false'); -} diff --git a/test/language/expressions/less-than/S11.8.1_A2.4_T4.js b/test/language/expressions/less-than/S11.8.1_A2.4_T4.js new file mode 100755 index 0000000000..0e16895bf3 --- /dev/null +++ b/test/language/expressions/less-than/S11.8.1_A2.4_T4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.8.1_A2.4_T4 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ + +//CHECK#1 +if ((y = 1) < y !== false) { + $ERROR('#1: (y = 1) < y === false'); +} diff --git a/test/language/expressions/modulus/S11.5.3_A2.4_T3.js b/test/language/expressions/modulus/S11.5.3_A2.4_T3.js index 3675bf82c7..08b905382c 100644 --- a/test/language/expressions/modulus/S11.5.3_A2.4_T3.js +++ b/test/language/expressions/modulus/S11.5.3_A2.4_T3.js @@ -17,8 +17,3 @@ catch (e) { $ERROR('#1.2: x % (x = 1) throw ReferenceError. Actual: ' + (e)); } } - -//CHECK#2 -if ((y = 1) % y !== 0) { - $ERROR('#2: (y = 1) % y === 0. Actual: ' + ((y = 1) % y)); -} diff --git a/test/language/expressions/modulus/S11.5.3_A2.4_T4.js b/test/language/expressions/modulus/S11.5.3_A2.4_T4.js new file mode 100755 index 0000000000..8e16de1d9e --- /dev/null +++ b/test/language/expressions/modulus/S11.5.3_A2.4_T4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.5.3_A2.4_T4 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ + +//CHECK#1 +if ((y = 1) % y !== 0) { + $ERROR('#1: (y = 1) % y === 0. Actual: ' + ((y = 1) % y)); +} diff --git a/test/language/expressions/multiplication/S11.5.1_A2.4_T3.js b/test/language/expressions/multiplication/S11.5.1_A2.4_T3.js index 9c971e050c..1d9817d2ac 100644 --- a/test/language/expressions/multiplication/S11.5.1_A2.4_T3.js +++ b/test/language/expressions/multiplication/S11.5.1_A2.4_T3.js @@ -17,8 +17,3 @@ catch (e) { $ERROR('#1.2: x * (x = 1) throw ReferenceError. Actual: ' + (e)); } } - -//CHECK#2 -if ((y = 1) * y !== 1) { - $ERROR('#2: (y = 1) * y === 1. Actual: ' + ((y = 1) * y)); -} diff --git a/test/language/expressions/multiplication/S11.5.1_A2.4_T4.js b/test/language/expressions/multiplication/S11.5.1_A2.4_T4.js new file mode 100755 index 0000000000..526728a7ff --- /dev/null +++ b/test/language/expressions/multiplication/S11.5.1_A2.4_T4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.5.1_A2.4_T4 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ + +//CHECK#1 +if ((y = 1) * y !== 1) { + $ERROR('#1: (y = 1) * y === 1. Actual: ' + ((y = 1) * y)); +} diff --git a/test/language/expressions/right-shift/S11.7.2_A2.4_T3.js b/test/language/expressions/right-shift/S11.7.2_A2.4_T3.js index f1489904ad..b16b2e3b66 100644 --- a/test/language/expressions/right-shift/S11.7.2_A2.4_T3.js +++ b/test/language/expressions/right-shift/S11.7.2_A2.4_T3.js @@ -17,8 +17,3 @@ catch (e) { $ERROR('#1.2: x >> (x = 1) throw ReferenceError. Actual: ' + (e)); } } - -//CHECK#2 -if ((y = 1) >> y !== 0) { - $ERROR('#2: (y = 1) >> y === 0. Actual: ' + ((y = 1) >> y)); -} diff --git a/test/language/expressions/right-shift/S11.7.2_A2.4_T4.js b/test/language/expressions/right-shift/S11.7.2_A2.4_T4.js new file mode 100755 index 0000000000..e01f1d6141 --- /dev/null +++ b/test/language/expressions/right-shift/S11.7.2_A2.4_T4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.7.2_A2.4_T4 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ + +//CHECK#1 +if ((y = 1) >> y !== 0) { + $ERROR('#1: (y = 1) >> y === 0. Actual: ' + ((y = 1) >> y)); +} diff --git a/test/language/expressions/strict-does-not-equals/S11.9.5_A2.4_T3.js b/test/language/expressions/strict-does-not-equals/S11.9.5_A2.4_T3.js index bdefcb3281..e5a8433a68 100644 --- a/test/language/expressions/strict-does-not-equals/S11.9.5_A2.4_T3.js +++ b/test/language/expressions/strict-does-not-equals/S11.9.5_A2.4_T3.js @@ -17,8 +17,3 @@ catch (e) { $ERROR('#1.2: x !== (x = 1) throw ReferenceError. Actual: ' + (e)); } } - -//CHECK#2 -if ((y = 1) !== y) { - $ERROR('#2: (y = 1) === y'); -} diff --git a/test/language/expressions/strict-does-not-equals/S11.9.5_A2.4_T4.js b/test/language/expressions/strict-does-not-equals/S11.9.5_A2.4_T4.js new file mode 100755 index 0000000000..ae76fb3df6 --- /dev/null +++ b/test/language/expressions/strict-does-not-equals/S11.9.5_A2.4_T4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.9.5_A2.4_T4 +description: Checking undeclarated variables +flags: [noStrict] +---*/ + +//CHECK#1 +if ((y = 1) !== y) { + $ERROR('#1: (y = 1) === y'); +} diff --git a/test/language/expressions/strict-equals/S11.9.4_A2.4_T3.js b/test/language/expressions/strict-equals/S11.9.4_A2.4_T3.js index 2a1cc2e395..485fbb826b 100644 --- a/test/language/expressions/strict-equals/S11.9.4_A2.4_T3.js +++ b/test/language/expressions/strict-equals/S11.9.4_A2.4_T3.js @@ -17,8 +17,3 @@ catch (e) { $ERROR('#1.2: x === (x = 1) throw ReferenceError. Actual: ' + (e)); } } - -//CHECK#2 -if (!((y = 1) === y)) { - $ERROR('#2: (y = 1) === y'); -} diff --git a/test/language/expressions/strict-equals/S11.9.4_A2.4_T4.js b/test/language/expressions/strict-equals/S11.9.4_A2.4_T4.js new file mode 100755 index 0000000000..b0bbe487a7 --- /dev/null +++ b/test/language/expressions/strict-equals/S11.9.4_A2.4_T4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.9.4_A2.4_T4 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ + +//CHECK#1 +if (!((y = 1) === y)) { + $ERROR('#1: (y = 1) === y'); +} diff --git a/test/language/expressions/subtraction/S11.6.2_A2.4_T3.js b/test/language/expressions/subtraction/S11.6.2_A2.4_T3.js index d6aa5fb0e6..772701029c 100644 --- a/test/language/expressions/subtraction/S11.6.2_A2.4_T3.js +++ b/test/language/expressions/subtraction/S11.6.2_A2.4_T3.js @@ -17,8 +17,3 @@ catch (e) { $ERROR('#1.2: x - (x = 1) throw ReferenceError. Actual: ' + (e)); } } - -//CHECK#2 -if ((y = 1) - y !== 0) { - $ERROR('#2: (y = 1) - y === 0. Actual: ' + ((y = 1) - y)); -} diff --git a/test/language/expressions/subtraction/S11.6.2_A2.4_T4.js b/test/language/expressions/subtraction/S11.6.2_A2.4_T4.js new file mode 100755 index 0000000000..3b9a8bb60f --- /dev/null +++ b/test/language/expressions/subtraction/S11.6.2_A2.4_T4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.6.2_A2.4_T4 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ + +//CHECK#1 +if ((y = 1) - y !== 0) { + $ERROR('#1: (y = 1) - y === 0. Actual: ' + ((y = 1) - y)); +} diff --git a/test/language/expressions/unsigned-right-shift/S11.7.3_A2.4_T3.js b/test/language/expressions/unsigned-right-shift/S11.7.3_A2.4_T3.js index d44c785df5..2ed045c77b 100644 --- a/test/language/expressions/unsigned-right-shift/S11.7.3_A2.4_T3.js +++ b/test/language/expressions/unsigned-right-shift/S11.7.3_A2.4_T3.js @@ -17,8 +17,3 @@ catch (e) { $ERROR('#1.2: x >>> (x = 1) throw ReferenceError. Actual: ' + (e)); } } - -//CHECK#2 -if ((y = 1) >>> y !== 0) { - $ERROR('#2: (y = 1) >>> y === 0. Actual: ' + ((y = 1) >>> y)); -} diff --git a/test/language/expressions/unsigned-right-shift/S11.7.3_A2.4_T4.js b/test/language/expressions/unsigned-right-shift/S11.7.3_A2.4_T4.js new file mode 100755 index 0000000000..4debe6c909 --- /dev/null +++ b/test/language/expressions/unsigned-right-shift/S11.7.3_A2.4_T4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: First expression is evaluated first, and then second expression +es5id: 11.7.3_A2.4_T4 +description: Checking with undeclarated variables +flags: [noStrict] +---*/ + +//CHECK#1 +if ((y = 1) >>> y !== 0) { + $ERROR('#1: (y = 1) >>> y === 0. Actual: ' + ((y = 1) >>> y)); +} -- GitLab