diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /js/src/tests/test262/ch11/11.13/11.13.2 | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/tests/test262/ch11/11.13/11.13.2')
300 files changed, 10935 insertions, 0 deletions
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-1-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-1-s.js new file mode 100644 index 000000000..3a8522a32 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-1-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-1-s.js
+ * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(*=) evaluates to an unresolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ try {
+ eval("_11_13_2_1 *= 1;");
+ return false;
+ } catch (e) {
+ return e instanceof ReferenceError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-10-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-10-s.js new file mode 100644 index 000000000..e0c7dddb4 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-10-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-10-s.js
+ * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(^=) evaluates to an unresolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ try {
+ eval("_11_13_2_10 ^= 1;");
+ return false;
+ } catch (e) {
+ return e instanceof ReferenceError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-11-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-11-s.js new file mode 100644 index 000000000..60d2e8a63 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-11-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-11-s.js
+ * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(|=) evaluates to an unresolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ try {
+ eval("_11_13_2_11 |= 1;");
+ return false;
+ } catch (e) {
+ return e instanceof ReferenceError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-12-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-12-s.js new file mode 100644 index 000000000..ae0eff54b --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-12-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-12-s.js
+ * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(*=) evaluates to a resolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _11_13_2_12 = 5
+ _11_13_2_12 *= 2;
+ return _11_13_2_12 === 10;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-13-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-13-s.js new file mode 100644 index 000000000..3dc5a0f34 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-13-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-13-s.js
+ * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(/=) evaluates to a resolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _11_13_2_13 = 6
+ _11_13_2_13 /= 2;
+ return _11_13_2_13 === 3;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-14-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-14-s.js new file mode 100644 index 000000000..578fae60e --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-14-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-14-s.js
+ * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(%=) evaluates to a resolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _11_13_2_14 = 5
+ _11_13_2_14 %= 2;
+ return _11_13_2_14 === 1;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-15-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-15-s.js new file mode 100644 index 000000000..832e1f98d --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-15-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-15-s.js
+ * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(>>>=) evaluates to a resolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _11_13_2_15 = 8
+ _11_13_2_15 >>>= 2;
+ return _11_13_2_15 === 2;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-16-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-16-s.js new file mode 100644 index 000000000..ae83bb032 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-16-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-16-s.js
+ * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(-=) evaluates to a resolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _11_13_2_16 = 5
+ _11_13_2_16 -= 2;
+ return _11_13_2_16 === 3;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-17-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-17-s.js new file mode 100644 index 000000000..f78dd1b8b --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-17-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-17-s.js
+ * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(<<=) evaluates to a resolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _11_13_2_17 = 1;
+ _11_13_2_17 <<= 2;
+ return _11_13_2_17 === 4;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-18-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-18-s.js new file mode 100644 index 000000000..cb2af550d --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-18-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-18-s.js
+ * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(>>=) evaluates to a resolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _11_13_2_18 = 4
+ _11_13_2_18 >>= 2;
+ return _11_13_2_18 === 1;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-19-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-19-s.js new file mode 100644 index 000000000..187d7c78a --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-19-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-19-s.js
+ * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(+=) evaluates to a resolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _11_13_2_19 = -1
+ _11_13_2_19 += 10;
+ return _11_13_2_19 === 9;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-2-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-2-s.js new file mode 100644 index 000000000..395bed37d --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-2-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-2-s.js
+ * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(/=) evaluates to an unresolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ try {
+ eval("_11_13_2_2 /= 1;");
+ return false;
+ } catch (e) {
+ return e instanceof ReferenceError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-20-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-20-s.js new file mode 100644 index 000000000..8f1547ca7 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-20-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-20-s.js
+ * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(&=) evaluates to a resolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _11_13_2_20 = 5
+ _11_13_2_20 &= 3;
+ return _11_13_2_20 === 1;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-21-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-21-s.js new file mode 100644 index 000000000..3cf11ab55 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-21-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-21-s.js
+ * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(^=) evaluates to a resolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _11_13_2_21 = 5
+ _11_13_2_21 ^= 3;
+ return _11_13_2_21 === 6;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-22-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-22-s.js new file mode 100644 index 000000000..b525c1621 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-22-s.js @@ -0,0 +1,19 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-22-s.js
+ * @description Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(|=) evaluates to a resolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var _11_13_2_22 = 5
+ _11_13_2_22 |= 2;
+ return _11_13_2_22 === 7;
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-23-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-23-s.js new file mode 100644 index 000000000..f6b492dc3 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-23-s.js @@ -0,0 +1,30 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-23-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(*=) is a reference to a data property with the attribute value {[[Writable]]:false}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ value: 10,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop *= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 10;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-24-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-24-s.js new file mode 100644 index 000000000..7c0886277 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-24-s.js @@ -0,0 +1,30 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-24-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(/=) is a reference to a data property with the attribute value {[[Writable]]:false}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ value: 10,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop /= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 10;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-25-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-25-s.js new file mode 100644 index 000000000..3f52583c3 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-25-s.js @@ -0,0 +1,30 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-25-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(%=) is a reference to a data property with the attribute value {[[Writable]]:false}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ value: 10,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop %= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 10;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-26-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-26-s.js new file mode 100644 index 000000000..a13b710d8 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-26-s.js @@ -0,0 +1,30 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-26-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(+=) is a reference to a data property with the attribute value {[[Writable]]:false}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ value: 10,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop += 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 10;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-27-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-27-s.js new file mode 100644 index 000000000..c8b649257 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-27-s.js @@ -0,0 +1,30 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-27-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(-=) is a reference to a data property with the attribute value {[[Writable]]:false}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ value: 10,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop -= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 10;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-28-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-28-s.js new file mode 100644 index 000000000..326c710e1 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-28-s.js @@ -0,0 +1,30 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-28-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(<<=) is a reference to a data property with the attribute value {[[Writable]]:false}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ value: 10,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop <<= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 10;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-29-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-29-s.js new file mode 100644 index 000000000..dac5aff74 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-29-s.js @@ -0,0 +1,30 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-29-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(>>=) is a reference to a data property with the attribute value {[[Writable]]:false}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ value: 10,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop >>= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 10;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-3-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-3-s.js new file mode 100644 index 000000000..efbbe64ab --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-3-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-3-s.js
+ * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(%=) evaluates to an unresolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ try {
+ eval("_11_13_2_3 %= 1;");
+ return false;
+ } catch (e) {
+ return e instanceof ReferenceError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-30-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-30-s.js new file mode 100644 index 000000000..77b4a3f99 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-30-s.js @@ -0,0 +1,30 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-30-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(>>>=) is a reference to a data property with the attribute value {[[Writable]]:false}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ value: 10,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop >>>= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 10;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-31-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-31-s.js new file mode 100644 index 000000000..1a42e5ac1 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-31-s.js @@ -0,0 +1,30 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-31-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(&=) is a reference to a data property with the attribute value {[[Writable]]:false}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ value: 10,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop &= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 10;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-32-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-32-s.js new file mode 100644 index 000000000..63ed6d804 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-32-s.js @@ -0,0 +1,30 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-32-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(^=) is a reference to a data property with the attribute value {[[Writable]]:false}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ value: 10,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop ^= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 10;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-33-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-33-s.js new file mode 100644 index 000000000..a0b27a8f3 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-33-s.js @@ -0,0 +1,30 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-33-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(|=) is a reference to a data property with the attribute value {[[Writable]]:false}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ value: 10,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop |= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 10;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-34-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-34-s.js new file mode 100644 index 000000000..196038b2b --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-34-s.js @@ -0,0 +1,32 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-34-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(*=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ get: function () {
+ return 11;
+ },
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop *= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 11;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-35-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-35-s.js new file mode 100644 index 000000000..2a7dba157 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-35-s.js @@ -0,0 +1,32 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-35-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(/=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ get: function () {
+ return 11;
+ },
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop /= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 11;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-36-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-36-s.js new file mode 100644 index 000000000..2e1204180 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-36-s.js @@ -0,0 +1,32 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-36-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(%=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ get: function () {
+ return 11;
+ },
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop %= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 11;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-37-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-37-s.js new file mode 100644 index 000000000..e426178ab --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-37-s.js @@ -0,0 +1,32 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-37-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(+=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ get: function () {
+ return 11;
+ },
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop += 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 11;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-38-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-38-s.js new file mode 100644 index 000000000..a522f871e --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-38-s.js @@ -0,0 +1,32 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-38-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(-=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ get: function () {
+ return 11;
+ },
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop -= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 11;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-39-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-39-s.js new file mode 100644 index 000000000..a682e1466 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-39-s.js @@ -0,0 +1,32 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-39-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(<<=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ get: function () {
+ return 11;
+ },
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop <<= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 11;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-4-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-4-s.js new file mode 100644 index 000000000..e565ceccc --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-4-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-4-s.js
+ * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(+=) evaluates to an unresolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ try {
+ eval("_11_13_2_4 += 1;");
+ return false;
+ } catch (e) {
+ return e instanceof ReferenceError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-40-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-40-s.js new file mode 100644 index 000000000..2f31f32bb --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-40-s.js @@ -0,0 +1,32 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-40-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(>>=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ get: function () {
+ return 11;
+ },
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop >>= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 11;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-41-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-41-s.js new file mode 100644 index 000000000..acc1d54ff --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-41-s.js @@ -0,0 +1,32 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-41-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(>>>=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ get: function () {
+ return 11;
+ },
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop >>>= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 11;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-42-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-42-s.js new file mode 100644 index 000000000..6b2f4642a --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-42-s.js @@ -0,0 +1,32 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-42-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(&=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ get: function () {
+ return 11;
+ },
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop &= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 11;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-43-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-43-s.js new file mode 100644 index 000000000..72aafec6e --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-43-s.js @@ -0,0 +1,32 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-43-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(^=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ get: function () {
+ return 11;
+ },
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop ^= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 11;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-44-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-44-s.js new file mode 100644 index 000000000..33a47ddb9 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-44-s.js @@ -0,0 +1,32 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-44-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(|=) is a reference of to an accessor property with the attribute value {[[Set]]:undefined}
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ get: function () {
+ return 11;
+ },
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ try {
+ obj.prop |= 20;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.prop === 11;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-45-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-45-s.js new file mode 100644 index 000000000..5122b4bdf --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-45-s.js @@ -0,0 +1,25 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-45-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(*=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.preventExtensions(obj);
+
+ try {
+ obj.len *= 10;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-46-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-46-s.js new file mode 100644 index 000000000..382f41c25 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-46-s.js @@ -0,0 +1,25 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-46-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(/=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.preventExtensions(obj);
+
+ try {
+ obj.len /= 10;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-47-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-47-s.js new file mode 100644 index 000000000..4e3761c20 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-47-s.js @@ -0,0 +1,25 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-47-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(%=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.preventExtensions(obj);
+
+ try {
+ obj.len %= 10;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-48-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-48-s.js new file mode 100644 index 000000000..fa14cbf86 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-48-s.js @@ -0,0 +1,25 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-48-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(+=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.preventExtensions(obj);
+
+ try {
+ obj.len += 10;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-49-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-49-s.js new file mode 100644 index 000000000..b9105eca8 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-49-s.js @@ -0,0 +1,25 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-49-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(-=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.preventExtensions(obj);
+
+ try {
+ obj.len -= 10;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-5-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-5-s.js new file mode 100644 index 000000000..09fdb5fa9 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-5-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-5-s.js
+ * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(-=) evaluates to an unresolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ try {
+ eval("_11_13_2_5 -= 1;");
+ return false;
+ } catch (e) {
+ return e instanceof ReferenceError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-50-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-50-s.js new file mode 100644 index 000000000..7ae50545b --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-50-s.js @@ -0,0 +1,25 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-50-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(<<=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.preventExtensions(obj);
+
+ try {
+ obj.len <<= 10;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-51-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-51-s.js new file mode 100644 index 000000000..7818d3d81 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-51-s.js @@ -0,0 +1,25 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-51-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(>>=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.preventExtensions(obj);
+
+ try {
+ obj.len >>= 10;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-52-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-52-s.js new file mode 100644 index 000000000..0668c86e6 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-52-s.js @@ -0,0 +1,25 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-52-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(>>>=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.preventExtensions(obj);
+
+ try {
+ obj.len >>>= 10;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-53-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-53-s.js new file mode 100644 index 000000000..64bdafb9b --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-53-s.js @@ -0,0 +1,25 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-53-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(&=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.preventExtensions(obj);
+
+ try {
+ obj.len &= 10;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-54-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-54-s.js new file mode 100644 index 000000000..f5439a483 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-54-s.js @@ -0,0 +1,25 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-54-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(^=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.preventExtensions(obj);
+
+ try {
+ obj.len ^= 10;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-55-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-55-s.js new file mode 100644 index 000000000..e44a53038 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-55-s.js @@ -0,0 +1,25 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-55-s.js
+ * @description Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(|=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var obj = {};
+ Object.preventExtensions(obj);
+
+ try {
+ obj.len |= 10;
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-1-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-1-s.js new file mode 100644 index 000000000..6bbe5ceb7 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-1-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-1-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(*=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = eval;
+ try {
+ eval("eval *= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === eval;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-10-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-10-s.js new file mode 100644 index 000000000..acf0fc522 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-10-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-10-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(^=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = eval;
+ try {
+ eval("eval ^= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === eval;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-11-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-11-s.js new file mode 100644 index 000000000..7273172df --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-11-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-11-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(|=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = eval;
+ try {
+ eval("eval |= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === eval;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-12-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-12-s.js new file mode 100644 index 000000000..b3eaf8e76 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-12-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-12-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(*=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = arguments;
+ try {
+ eval("arguments *= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === arguments;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-13-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-13-s.js new file mode 100644 index 000000000..f553885ba --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-13-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-13-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(/=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = arguments;
+ try {
+ eval("arguments /= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === arguments;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-14-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-14-s.js new file mode 100644 index 000000000..f039ab988 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-14-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-14-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(%=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = arguments;
+ try {
+ eval("arguments %= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === arguments;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-15-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-15-s.js new file mode 100644 index 000000000..cd473315c --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-15-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-15-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(+=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = arguments;
+ try {
+ eval("arguments += 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === arguments;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-16-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-16-s.js new file mode 100644 index 000000000..4c7038b79 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-16-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-16-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(-=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = arguments;
+ try {
+ eval("arguments -= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === arguments;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-17-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-17-s.js new file mode 100644 index 000000000..1b0efaf36 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-17-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-17-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(<<=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = arguments;
+ try {
+ eval("arguments <<= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === arguments;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-18-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-18-s.js new file mode 100644 index 000000000..0413ebfeb --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-18-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-18-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(>>=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = arguments;
+ try {
+ eval("arguments >>= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === arguments;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-19-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-19-s.js new file mode 100644 index 000000000..8af9d1b37 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-19-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-19-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(>>>=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = arguments;
+ try {
+ eval("arguments >>>= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === arguments;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-1gs.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-1gs.js new file mode 100644 index 000000000..a3f33416c --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-1gs.js @@ -0,0 +1,16 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-1gs.js
+ * @description Strict Mode - SyntaxError is throw if the identifier eval appears as the LeftHandSideExpression of a Compound Assignment operator(*=)
+ * @onlyStrict
+ * @negative ^((?!NotEarlyError).)*$
+ */
+
+"use strict";
+throw NotEarlyError;
+eval *= 20;
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-2-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-2-s.js new file mode 100644 index 000000000..f342f29ef --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-2-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-2-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(/=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = eval;
+ try {
+ eval("eval /= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === eval;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-20-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-20-s.js new file mode 100644 index 000000000..468a01dab --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-20-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-20-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(&=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = arguments;
+ try {
+ eval("arguments &= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === arguments;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-21-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-21-s.js new file mode 100644 index 000000000..6ce81e359 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-21-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-21-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(^=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = arguments;
+ try {
+ eval("arguments ^= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === arguments;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-22-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-22-s.js new file mode 100644 index 000000000..48a6651c2 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-22-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-22-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(|=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = arguments;
+ try {
+ eval("arguments |= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === arguments;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-3-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-3-s.js new file mode 100644 index 000000000..133e41d16 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-3-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-3-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(%=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = eval;
+ try {
+ eval("eval %= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === eval;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-4-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-4-s.js new file mode 100644 index 000000000..c5314930e --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-4-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-4-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(+=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = eval;
+ try {
+ eval("eval += 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === eval;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-5-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-5-s.js new file mode 100644 index 000000000..394632041 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-5-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-5-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(-=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = eval;
+ try {
+ eval("eval -= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === eval;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-6-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-6-s.js new file mode 100644 index 000000000..e3e709b76 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-6-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-6-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(<<=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = eval;
+ try {
+ eval("eval <<= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === eval;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-7-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-7-s.js new file mode 100644 index 000000000..f07505be0 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-7-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-7-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(>>=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = eval;
+ try {
+ eval("eval >>= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === eval;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-8-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-8-s.js new file mode 100644 index 000000000..8a2226ae1 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-8-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-8-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(>>>=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = eval;
+ try {
+ eval("eval >>>= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === eval;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-9-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-9-s.js new file mode 100644 index 000000000..4f5817fdb --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-9-s.js @@ -0,0 +1,23 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-9-s.js
+ * @description Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(&=)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ var blah = eval;
+ try {
+ eval("eval &= 20;");
+ return false;
+ } catch (e) {
+ return e instanceof SyntaxError && blah === eval;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-s.js new file mode 100644 index 000000000..832d3afd0 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-6-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-6-s.js
+ * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(<<=) evaluates to an unresolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ try {
+ eval("_11_13_2_6 <<= 1;");
+ return false;
+ } catch (e) {
+ return e instanceof ReferenceError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-7-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-7-s.js new file mode 100644 index 000000000..8a290330a --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-7-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-7-s.js
+ * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(>>=) evaluates to an unresolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ try {
+ eval("_11_13_2_7 >>= 1;");
+ return false;
+ } catch (e) {
+ return e instanceof ReferenceError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-8-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-8-s.js new file mode 100644 index 000000000..4f4167f87 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-8-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-8-s.js
+ * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(>>>=) evaluates to an unresolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ try {
+ eval("_11_13_2_8 >>>= 1;");
+ return false;
+ } catch (e) {
+ return e instanceof ReferenceError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-9-s.js b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-9-s.js new file mode 100644 index 000000000..3393d5c27 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/11.13.2-9-s.js @@ -0,0 +1,22 @@ +/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch11/11.13/11.13.2/11.13.2-9-s.js
+ * @description Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(&=) evaluates to an unresolvable reference
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ try {
+ eval("_11_13_2_9 &= 1;");
+ return false;
+ } catch (e) {
+ return e instanceof ReferenceError;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T1.js new file mode 100644 index 000000000..db0495c5c --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T1.js @@ -0,0 +1,71 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed + * + * @path ch11/11.13/11.13.2/S11.13.2_A1_T1.js + * @description Checking by using eval, check operator is x *= y + */ + +//CHECK#1 +x = -1; +if ((eval("x\u0009*=\u0009-1")) !== 1) { + $ERROR('#1: x = -1; (x\\u0009*=\\u0009-1) === 1'); +} + +//CHECK#2 +x = -1; +if ((eval("x\u000B*=\u000B-1")) !== 1) { + $ERROR('#2: x = -1; (x\\u000B*=\\u000B-1) === 1'); +} + +//CHECK#3 +x = -1; +if ((eval("x\u000C*=\u000C-1")) !== 1) { + $ERROR('#3: x = -1; (x\\u000C*=\\u000C-1) === 1'); +} + +//CHECK#4 +x = -1; +if ((eval("x\u0020*=\u0020-1")) !== 1) { + $ERROR('#4: x = -1; (x\\u0020*=\\u0020-1) === 1'); +} + +//CHECK#5 +x = -1; +if ((eval("x\u00A0*=\u00A0-1")) !== 1) { + $ERROR('#5: x = -1; (x\\u00A0*=\\u00A0-1) === 1'); +} + +//CHECK#6 +x = -1; +if ((eval("x\u000A*=\u000A-1")) !== 1) { + $ERROR('#6: x = -1; (x\\u000A*=\\u000A-1) === 1'); +} + +//CHECK#7 +x = -1; +if ((eval("x\u000D*=\u000D-1")) !== 1) { + $ERROR('#7: x = -1; (x\\u000D*=\\u000D-1) === 1'); +} + +//CHECK#8 +x = -1; +if ((eval("x\u2028*=\u2028-1")) !== 1) { + $ERROR('#8: x = -1; (x\\u2028*=\\u2028-1) === 1'); +} + +//CHECK#9 +x = -1; +if ((eval("x\u2029*=\u2029-1")) !== 1) { + $ERROR('#9: x = -1; (x\\u2029*=\\u2029-1) === 1'); +} + + +//CHECK#10 +x = -1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029*=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029-1")) !== 1) { + $ERROR('#10: x = -1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029*=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-1) === 1'); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T10.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T10.js new file mode 100644 index 000000000..3487b3dd0 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T10.js @@ -0,0 +1,71 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed + * + * @path ch11/11.13/11.13.2/S11.13.2_A1_T10.js + * @description Checking by using eval, check operator is x ^= y + */ + +//CHECK#1 +x = 1; +if ((eval("x\u0009^=\u00091")) !== 0) { + $ERROR('#1: x = 1; (x\\u0009^=\\u00091) === 0'); +} + +//CHECK#2 +x = 1; +if ((eval("x\u000B^=\u000B1")) !== 0) { + $ERROR('#2: x = 1; (x\\u000B^=\\u000B1) === 0'); +} + +//CHECK#3 +x = 1; +if ((eval("x\u000C^=\u000C1")) !== 0) { + $ERROR('#3: x = 1; (x\\u000C^=\\u000C1) === 0'); +} + +//CHECK#4 +x = 1; +if ((eval("x\u0020^=\u00201")) !== 0) { + $ERROR('#4: x = 1; (x\\u0020^=\\u00201) === 0'); +} + +//CHECK#5 +x = 1; +if ((eval("x\u00A0^=\u00A01")) !== 0) { + $ERROR('#5: x = 1; (x\\u00A0^=\\u00A01) === 0'); +} + +//CHECK#6 +x = 1; +if ((eval("x\u000A^=\u000A1")) !== 0) { + $ERROR('#6: x = 1; (x\\u000A^=\\u000A1) === 0'); +} + +//CHECK#7 +x = 1; +if ((eval("x\u000D^=\u000D1")) !== 0) { + $ERROR('#7: x = 1; (x\\u000D^=\\u000D1) === 0'); +} + +//CHECK#8 +x = 1; +if ((eval("x\u2028^=\u20281")) !== 0) { + $ERROR('#8: x = 1; (x\\u2028^=\\u20281) === 0'); +} + +//CHECK#9 +x = 1; +if ((eval("x\u2029^=\u20291")) !== 0) { + $ERROR('#9: x = 1; (x\\u2029^=\\u20291) === 0'); +} + + +//CHECK#10 +x = 1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029^=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 0) { + $ERROR('#10: x = 1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029^=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 0'); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T11.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T11.js new file mode 100644 index 000000000..fc81632c0 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T11.js @@ -0,0 +1,71 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed + * + * @path ch11/11.13/11.13.2/S11.13.2_A1_T11.js + * @description Checking by using eval, check operator is x |= y + */ + +//CHECK#1 +x = 0; +if ((eval("x\u0009|=\u00091")) !== 1) { + $ERROR('#1: x = 0; (x\\u0009|=\\u00091) === 1'); +} + +//CHECK#2 +x = 0; +if ((eval("x\u000B|=\u000B1")) !== 1) { + $ERROR('#2: x = 0; (x\\u000B|=\\u000B1) === 1'); +} + +//CHECK#3 +x = 0; +if ((eval("x\u000C|=\u000C1")) !== 1) { + $ERROR('#3: x = 0; (x\\u000C|=\\u000C1) === 1'); +} + +//CHECK#4 +x = 0; +if ((eval("x\u0020|=\u00201")) !== 1) { + $ERROR('#4: x = 0; (x\\u0020|=\\u00201) === 1'); +} + +//CHECK#5 +x = 0; +if ((eval("x\u00A0|=\u00A01")) !== 1) { + $ERROR('#5: x = 0; (x\\u00A0|=\\u00A01) === 1'); +} + +//CHECK#6 +x = 0; +if ((eval("x\u000A|=\u000A1")) !== 1) { + $ERROR('#6: x = 0; (x\\u000A|=\\u000A1) === 1'); +} + +//CHECK#7 +x = 0; +if ((eval("x\u000D|=\u000D1")) !== 1) { + $ERROR('#7: x = 0; (x\\u000D|=\\u000D1) === 1'); +} + +//CHECK#8 +x = 0; +if ((eval("x\u2028|=\u20281")) !== 1) { + $ERROR('#8: x = 0; (x\\u2028|=\\u20281) === 1'); +} + +//CHECK#9 +x = 0; +if ((eval("x\u2029|=\u20291")) !== 1) { + $ERROR('#9: x = 0; (x\\u2029|=\\u20291) === 1'); +} + + +//CHECK#10 +x = 0; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029|=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 1) { + $ERROR('#10: x = 0; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029|=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 1'); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T2.js new file mode 100644 index 000000000..1e15c0115 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T2.js @@ -0,0 +1,71 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed + * + * @path ch11/11.13/11.13.2/S11.13.2_A1_T2.js + * @description Checking by using eval, check operator is x /= y + */ + +//CHECK#1 +x = -1; +if ((eval("x\u0009/=\u0009-1")) !== 1) { + $ERROR('#1: x = -1; (x\\u0009/=\\u0009-1) === 1'); +} + +//CHECK#2 +x = -1; +if ((eval("x\u000B/=\u000B-1")) !== 1) { + $ERROR('#2: x = -1; (x\\u000B/=\\u000B-1) === 1'); +} + +//CHECK#3 +x = -1; +if ((eval("x\u000C/=\u000C-1")) !== 1) { + $ERROR('#3: x = -1; (x\\u000C/=\\u000C-1) === 1'); +} + +//CHECK#4 +x = -1; +if ((eval("x\u0020/=\u0020-1")) !== 1) { + $ERROR('#4: x = -1; (x\\u0020/=\\u0020-1) === 1'); +} + +//CHECK#5 +x = -1; +if ((eval("x\u00A0/=\u00A0-1")) !== 1) { + $ERROR('#5: x = -1; (x\\u00A0/=\\u00A0-1) === 1'); +} + +//CHECK#6 +x = -1; +if ((eval("x\u000A/=\u000A-1")) !== 1) { + $ERROR('#6: x = -1; (x\\u000A/=\\u000A-1) === 1'); +} + +//CHECK#7 +x = -1; +if ((eval("x\u000D/=\u000D-1")) !== 1) { + $ERROR('#7: x = -1; (x\\u000D/=\\u000D-1) === 1'); +} + +//CHECK#8 +x = -1; +if ((eval("x\u2028/=\u2028-1")) !== 1) { + $ERROR('#8: x = -1; (x\\u2028/=\\u2028-1) === 1'); +} + +//CHECK#9 +x = -1; +if ((eval("x\u2029/=\u2029-1")) !== 1) { + $ERROR('#9: x = -1; (x\\u2029/=\\u2029-1) === 1'); +} + + +//CHECK#10 +x = -1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029/=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029-1")) !== 1) { + $ERROR('#10: x = -1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029/=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-1) === 1'); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T3.js new file mode 100644 index 000000000..1e2a6760a --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T3.js @@ -0,0 +1,71 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed + * + * @path ch11/11.13/11.13.2/S11.13.2_A1_T3.js + * @description Checking by using eval, check operator is x %= y + */ + +//CHECK#1 +x = -1; +if ((eval("x\u0009%=\u0009-1")) !== 0) { + $ERROR('#1: x = -1; (x\\u0009%=\\u0009-1) === 0'); +} + +//CHECK#2 +x = -1; +if ((eval("x\u000B%=\u000B-1")) !== 0) { + $ERROR('#2: x = -1; (x\\u000B%=\\u000B-1) === 0'); +} + +//CHECK#3 +x = -1; +if ((eval("x\u000C%=\u000C-1")) !== 0) { + $ERROR('#3: x = -1; (x\\u000C%=\\u000C-1) === 0'); +} + +//CHECK#4 +x = -1; +if ((eval("x\u0020%=\u0020-1")) !== 0) { + $ERROR('#4: x = -1; (x\\u0020%=\\u0020-1) === 0'); +} + +//CHECK#5 +x = -1; +if ((eval("x\u00A0%=\u00A0-1")) !== 0) { + $ERROR('#5: x = -1; (x\\u00A0%=\\u00A0-1) === 0'); +} + +//CHECK#6 +x = -1; +if ((eval("x\u000A%=\u000A-1")) !== 0) { + $ERROR('#6: x = -1; (x\\u000A%=\\u000A-1) === 0'); +} + +//CHECK#7 +x = -1; +if ((eval("x\u000D%=\u000D-1")) !== 0) { + $ERROR('#7: x = -1; (x\\u000D%=\\u000D-1) === 0'); +} + +//CHECK#8 +x = -1; +if ((eval("x\u2028%=\u2028-1")) !== 0) { + $ERROR('#8: x = -1; (x\\u2028%=\\u2028-1) === 0'); +} + +//CHECK#9 +x = -1; +if ((eval("x\u2029%=\u2029-1")) !== 0) { + $ERROR('#9: x = -1; (x\\u2029%=\\u2029-1) === 0'); +} + + +//CHECK#10 +x = -1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029%=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029-1")) !== 0) { + $ERROR('#10: x = -1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029%=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-1) === 0'); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T4.js new file mode 100644 index 000000000..fa97eb77f --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T4.js @@ -0,0 +1,71 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed + * + * @path ch11/11.13/11.13.2/S11.13.2_A1_T4.js + * @description Checking by using eval, check operator is x += y + */ + +//CHECK#1 +x = -1; +if ((eval("x\u0009+=\u0009-1")) !== -2) { + $ERROR('#1: x = -1; (x\\u0009+=\\u0009-1) === -2'); +} + +//CHECK#2 +x = -1; +if ((eval("x\u000B+=\u000B-1")) !== -2) { + $ERROR('#2: x = -1; (x\\u000B+=\\u000B-1) === -2'); +} + +//CHECK#3 +x = -1; +if ((eval("x\u000C+=\u000C-1")) !== -2) { + $ERROR('#3: x = -1; (x\\u000C+=\\u000C-1) === -2'); +} + +//CHECK#4 +x = -1; +if ((eval("x\u0020+=\u0020-1")) !== -2) { + $ERROR('#4: x = -1; (x\\u0020+=\\u0020-1) === -2'); +} + +//CHECK#5 +x = -1; +if ((eval("x\u00A0+=\u00A0-1")) !== -2) { + $ERROR('#5: x = -1; (x\\u00A0+=\\u00A0-1) === -2'); +} + +//CHECK#6 +x = -1; +if ((eval("x\u000A+=\u000A-1")) !== -2) { + $ERROR('#6: x = -1; (x\\u000A+=\\u000A-1) === -2'); +} + +//CHECK#7 +x = -1; +if ((eval("x\u000D+=\u000D-1")) !== -2) { + $ERROR('#7: x = -1; (x\\u000D+=\\u000D-1) === -2'); +} + +//CHECK#8 +x = -1; +if ((eval("x\u2028+=\u2028-1")) !== -2) { + $ERROR('#8: x = -1; (x\\u2028+=\\u2028-1) === -2'); +} + +//CHECK#9 +x = -1; +if ((eval("x\u2029+=\u2029-1")) !== -2) { + $ERROR('#9: x = -1; (x\\u2029+=\\u2029-1) === -2'); +} + + +//CHECK#10 +x = -1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029+=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029-1")) !== -2) { + $ERROR('#10: x = -1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029+=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-1) === -2'); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T5.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T5.js new file mode 100644 index 000000000..d4fc5a620 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T5.js @@ -0,0 +1,71 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed + * + * @path ch11/11.13/11.13.2/S11.13.2_A1_T5.js + * @description Checking by using eval, check operator is x -= y + */ + +//CHECK#1 +x = -1; +if ((eval("x\u0009-=\u00091")) !== -2) { + $ERROR('#1: x = -1; (x\\u0009-=\\u00091) === -2'); +} + +//CHECK#2 +x = -1; +if ((eval("x\u000B-=\u000B1")) !== -2) { + $ERROR('#2: x = -1; (x\\u000B-=\\u000B1) === -2'); +} + +//CHECK#3 +x = -1; +if ((eval("x\u000C-=\u000C1")) !== -2) { + $ERROR('#3: x = -1; (x\\u000C-=\\u000C1) === -2'); +} + +//CHECK#4 +x = -1; +if ((eval("x\u0020-=\u00201")) !== -2) { + $ERROR('#4: x = -1; (x\\u0020-=\\u00201) === -2'); +} + +//CHECK#5 +x = -1; +if ((eval("x\u00A0-=\u00A01")) !== -2) { + $ERROR('#5: x = -1; (x\\u00A0-=\\u00A01) === -2'); +} + +//CHECK#6 +x = -1; +if ((eval("x\u000A-=\u000A1")) !== -2) { + $ERROR('#6: x = -1; (x\\u000A-=\\u000A1) === -2'); +} + +//CHECK#7 +x = -1; +if ((eval("x\u000D-=\u000D1")) !== -2) { + $ERROR('#7: x = -1; (x\\u000D-=\\u000D1) === -2'); +} + +//CHECK#8 +x = -1; +if ((eval("x\u2028-=\u20281")) !== -2) { + $ERROR('#8: x = -1; (x\\u2028-=\\u20281) === -2'); +} + +//CHECK#9 +x = -1; +if ((eval("x\u2029-=\u20291")) !== -2) { + $ERROR('#9: x = -1; (x\\u2029-=\\u20291) === -2'); +} + + +//CHECK#10 +x = -1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029-=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== -2) { + $ERROR('#10: x = -1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === -2'); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T6.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T6.js new file mode 100644 index 000000000..65370cf1b --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T6.js @@ -0,0 +1,71 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed + * + * @path ch11/11.13/11.13.2/S11.13.2_A1_T6.js + * @description Checking by using eval, check operator is x <<= y + */ + +//CHECK#1 +x = 1; +if ((eval("x\u0009<<=\u00091")) !== 2) { + $ERROR('#1: x = 1; (x\\u0009<<=\\u00091) === 2'); +} + +//CHECK#2 +x = 1; +if ((eval("x\u000B<<=\u000B1")) !== 2) { + $ERROR('#2: x = 1; (x\\u000B<<=\\u000B1) === 2'); +} + +//CHECK#3 +x = 1; +if ((eval("x\u000C<<=\u000C1")) !== 2) { + $ERROR('#3: x = 1; (x\\u000C<<=\\u000C1) === 2'); +} + +//CHECK#4 +x = 1; +if ((eval("x\u0020<<=\u00201")) !== 2) { + $ERROR('#4: x = 1; (x\\u0020<<=\\u00201) === 2'); +} + +//CHECK#5 +x = 1; +if ((eval("x\u00A0<<=\u00A01")) !== 2) { + $ERROR('#5: x = 1; (x\\u00A0<<=\\u00A01) === 2'); +} + +//CHECK#6 +x = 1; +if ((eval("x\u000A<<=\u000A1")) !== 2) { + $ERROR('#6: x = 1; (x\\u000A<<=\\u000A1) === 2'); +} + +//CHECK#7 +x = 1; +if ((eval("x\u000D<<=\u000D1")) !== 2) { + $ERROR('#7: x = 1; (x\\u000D<<=\\u000D1) === 2'); +} + +//CHECK#8 +x = 1; +if ((eval("x\u2028<<=\u20281")) !== 2) { + $ERROR('#8: x = 1; (x\\u2028<<=\\u20281) === 2'); +} + +//CHECK#9 +x = 1; +if ((eval("x\u2029<<=\u20291")) !== 2) { + $ERROR('#9: x = 1; (x\\u2029<<=\\u20291) === 2'); +} + + +//CHECK#10 +x = 1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029<<=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 2) { + $ERROR('#10: x = 1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029<<=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 2'); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T7.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T7.js new file mode 100644 index 000000000..5093eaeca --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T7.js @@ -0,0 +1,71 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed + * + * @path ch11/11.13/11.13.2/S11.13.2_A1_T7.js + * @description Checking by using eval, check operator is x >>= y + */ + +//CHECK#1 +x = 1; +if ((eval("x\u0009>>=\u00091")) !== 0) { + $ERROR('#1: x = 1; (x\\u0009>>=\\u00091) === 0'); +} + +//CHECK#2 +x = 1; +if ((eval("x\u000B>>=\u000B1")) !== 0) { + $ERROR('#2: x = 1; (x\\u000B>>=\\u000B1) === 0'); +} + +//CHECK#3 +x = 1; +if ((eval("x\u000C>>=\u000C1")) !== 0) { + $ERROR('#3: x = 1; (x\\u000C>>=\\u000C1) === 0'); +} + +//CHECK#4 +x = 1; +if ((eval("x\u0020>>=\u00201")) !== 0) { + $ERROR('#4: x = 1; (x\\u0020>>=\\u00201) === 0'); +} + +//CHECK#5 +x = 1; +if ((eval("x\u00A0>>=\u00A01")) !== 0) { + $ERROR('#5: x = 1; (x\\u00A0>>=\\u00A01) === 0'); +} + +//CHECK#6 +x = 1; +if ((eval("x\u000A>>=\u000A1")) !== 0) { + $ERROR('#6: x = 1; (x\\u000A>>=\\u000A1) === 0'); +} + +//CHECK#7 +x = 1; +if ((eval("x\u000D>>=\u000D1")) !== 0) { + $ERROR('#7: x = 1; (x\\u000D>>=\\u000D1) === 0'); +} + +//CHECK#8 +x = 1; +if ((eval("x\u2028>>=\u20281")) !== 0) { + $ERROR('#8: x = 1; (x\\u2028>>=\\u20281) === 0'); +} + +//CHECK#9 +x = 1; +if ((eval("x\u2029>>=\u20291")) !== 0) { + $ERROR('#9: x = 1; (x\\u2029>>=\\u20291) === 0'); +} + + +//CHECK#10 +x = 1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029>>=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 0) { + $ERROR('#10: x = 1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029>>=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 0'); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T8.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T8.js new file mode 100644 index 000000000..8469f353d --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T8.js @@ -0,0 +1,71 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed + * + * @path ch11/11.13/11.13.2/S11.13.2_A1_T8.js + * @description Checking by using eval, check operator is x >>>= y + */ + +//CHECK#1 +x = 1; +if ((eval("x\u0009>>>=\u00091")) !== 0) { + $ERROR('#1: x = 1; (x\\u0009>>>=\\u00091) === 0'); +} + +//CHECK#2 +x = 1; +if ((eval("x\u000B>>>=\u000B1")) !== 0) { + $ERROR('#2: x = 1; (x\\u000B>>>=\\u000B1) === 0'); +} + +//CHECK#3 +x = 1; +if ((eval("x\u000C>>>=\u000C1")) !== 0) { + $ERROR('#3: x = 1; (x\\u000C>>>=\\u000C1) === 0'); +} + +//CHECK#4 +x = 1; +if ((eval("x\u0020>>>=\u00201")) !== 0) { + $ERROR('#4: x = 1; (x\\u0020>>>=\\u00201) === 0'); +} + +//CHECK#5 +x = 1; +if ((eval("x\u00A0>>>=\u00A01")) !== 0) { + $ERROR('#5: x = 1; (x\\u00A0>>>=\\u00A01) === 0'); +} + +//CHECK#6 +x = 1; +if ((eval("x\u000A>>>=\u000A1")) !== 0) { + $ERROR('#6: x = 1; (x\\u000A>>>=\\u000A1) === 0'); +} + +//CHECK#7 +x = 1; +if ((eval("x\u000D>>>=\u000D1")) !== 0) { + $ERROR('#7: x = 1; (x\\u000D>>>=\\u000D1) === 0'); +} + +//CHECK#8 +x = 1; +if ((eval("x\u2028>>>=\u20281")) !== 0) { + $ERROR('#8: x = 1; (x\\u2028>>>=\\u20281) === 0'); +} + +//CHECK#9 +x = 1; +if ((eval("x\u2029>>>=\u20291")) !== 0) { + $ERROR('#9: x = 1; (x\\u2029>>>=\\u20291) === 0'); +} + + +//CHECK#10 +x = 1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029>>>=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 0) { + $ERROR('#10: x = 1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029>>>=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 0'); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T9.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T9.js new file mode 100644 index 000000000..c73eac5e1 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A1_T9.js @@ -0,0 +1,71 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed + * + * @path ch11/11.13/11.13.2/S11.13.2_A1_T9.js + * @description Checking by using eval, check operator is x &= y + */ + +//CHECK#1 +x = 1; +if ((eval("x\u0009&=\u00091")) !== 1) { + $ERROR('#1: x = 1; (x\\u0009&=\\u00091) === 1'); +} + +//CHECK#2 +x = 1; +if ((eval("x\u000B&=\u000B1")) !== 1) { + $ERROR('#2: x = 1; (x\\u000B&=\\u000B1) === 1'); +} + +//CHECK#3 +x = 1; +if ((eval("x\u000C&=\u000C1")) !== 1) { + $ERROR('#3: x = 1; (x\\u000C&=\\u000C1) === 1'); +} + +//CHECK#4 +x = 1; +if ((eval("x\u0020&=\u00201")) !== 1) { + $ERROR('#4: x = 1; (x\\u0020&=\\u00201) === 1'); +} + +//CHECK#5 +x = 1; +if ((eval("x\u00A0&=\u00A01")) !== 1) { + $ERROR('#5: x = 1; (x\\u00A0&=\\u00A01) === 1'); +} + +//CHECK#6 +x = 1; +if ((eval("x\u000A&=\u000A1")) !== 1) { + $ERROR('#6: x = 1; (x\\u000A&=\\u000A1) === 1'); +} + +//CHECK#7 +x = 1; +if ((eval("x\u000D&=\u000D1")) !== 1) { + $ERROR('#7: x = 1; (x\\u000D&=\\u000D1) === 1'); +} + +//CHECK#8 +x = 1; +if ((eval("x\u2028&=\u20281")) !== 1) { + $ERROR('#8: x = 1; (x\\u2028&=\\u20281) === 1'); +} + +//CHECK#9 +x = 1; +if ((eval("x\u2029&=\u20291")) !== 1) { + $ERROR('#9: x = 1; (x\\u2029&=\\u20291) === 1'); +} + + +//CHECK#10 +x = 1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029&=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 1) { + $ERROR('#10: x = 1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029&=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 1'); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.1.js new file mode 100644 index 000000000..e6a01dd52 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.1.js @@ -0,0 +1,26 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.1.js + * @description Either Type is not Reference or GetBase is not null, check opeartor is "x *= y" + */ + +//CHECK#1 +var x = 1; +var z = (x *= -1); +if (z !== -1) { + $ERROR('#1: var x = 1; var z = (x *= -1); z === -1. Actual: ' + (z)); +} + +//CHECK#2 +var x = 1; +var y = -1; +var z = (x *= y); +if (z !== -1) { + $ERROR('#2: var x = 1; var y = -1; var z = (x *= y); z === -1. Actual: ' + (z)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.10.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.10.js new file mode 100644 index 000000000..a85d13eb0 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.10.js @@ -0,0 +1,26 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.10.js + * @description Either Type is not Reference or GetBase is not null, check opeartor is "x ^= y" + */ + +//CHECK#1 +var x = 1; +var z = (x ^= 1); +if (z !== 0) { + $ERROR('#1: var x = 1; var z = (x ^= 1); z === 0. Actual: ' + (z)); +} + +//CHECK#2 +var x = 1; +var y = 1; +var z = (x ^= y); +if (z !== 0) { + $ERROR('#2: var x = 1; var y = 1; var z = (x ^= y); z === 0. Actual: ' + (z)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.11.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.11.js new file mode 100644 index 000000000..925ed41d6 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.11.js @@ -0,0 +1,26 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.11.js + * @description Either Type is not Reference or GetBase is not null, check opeartor is "x |= y" + */ + +//CHECK#1 +var x = 0; +var z = (x |= 1); +if (z !== 1) { + $ERROR('#1: var x = 0; var z = (x |= 1); z === 1. Actual: ' + (z)); +} + +//CHECK#2 +var x = 0; +var y = 1; +var z = (x |= y); +if (z !== 1) { + $ERROR('#2: var x = 0; var y = 1; var z = (x |= y); z === 1. Actual: ' + (z)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.2.js new file mode 100644 index 000000000..d9ee6bd59 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.2.js @@ -0,0 +1,26 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.2.js + * @description Either Type is not Reference or GetBase is not null, check opeartor is "x /= y" + */ + +//CHECK#1 +var x = 1; +var z = (x /= -1); +if (z !== -1) { + $ERROR('#1: var x = 1; var z = (x /= -1); z === -1. Actual: ' + (z)); +} + +//CHECK#2 +var x = 1; +var y = -1; +var z = (x /= y); +if (z !== -1) { + $ERROR('#2: var x = 1; var y = -1; var z = (x /= y); z === -1. Actual: ' + (z)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.3.js new file mode 100644 index 000000000..70586cfbb --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.3.js @@ -0,0 +1,26 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.3.js + * @description Either Type is not Reference or GetBase is not null, check opeartor is "x %= y" + */ + +//CHECK#1 +var x = -1; +var z = (x %= 2); +if (z !== -1) { + $ERROR('#1: var x = -1; var z = (x %= 2); z === -1. Actual: ' + (z)); +} + +//CHECK#2 +var x = -1; +var y = 2; +var z = (x %= y); +if (z !== -1) { + $ERROR('#2: var x = -1; var y = 2; var z = (x %= y); z === -1. Actual: ' + (z)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.4.js new file mode 100644 index 000000000..7fcda2fec --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.4.js @@ -0,0 +1,26 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.4.js + * @description Either Type is not Reference or GetBase is not null, check opeartor is "x += y" + */ + +//CHECK#1 +var x = 1; +var z = (x += 1); +if (z !== 2) { + $ERROR('#1: var x = 1; var z = (x += 1); z === 2. Actual: ' + (z)); +} + +//CHECK#2 +var x = 1; +var y = 1; +var z = (x += y); +if (z !== 2) { + $ERROR('#2: var x = 1; var y = 1; var z = (x += y); z === 2. Actual: ' + (z)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.5.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.5.js new file mode 100644 index 000000000..db68d5585 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.5.js @@ -0,0 +1,26 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.5.js + * @description Either Type is not Reference or GetBase is not null, check opeartor is "x -= y" + */ + +//CHECK#1 +var x = 1; +var z = (x -= 1); +if (z !== 0) { + $ERROR('#1: var x = 1; var z = (x -= 1); z === 0. Actual: ' + (z)); +} + +//CHECK#2 +var x = 1; +var y = 1; +var z = (x -= y); +if (z !== 0) { + $ERROR('#2: var x = 1; var y = 1; var z = (x -= y); z === 0. Actual: ' + (z)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.6.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.6.js new file mode 100644 index 000000000..f6f5ac7ca --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.6.js @@ -0,0 +1,26 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.6.js + * @description Either Type is not Reference or GetBase is not null, check opeartor is "x <<= y" + */ + +//CHECK#1 +var x = 1; +var z = (x <<= 1); +if (z !== 2) { + $ERROR('#1: var x = 1; var z = (x <<= 1); z === 2. Actual: ' + (z)); +} + +//CHECK#2 +var x = 1; +var y = 1; +var z = (x <<= y); +if (z !== 2) { + $ERROR('#2: var x = 1; var y = 1; var z = (x <<= y); z === 2. Actual: ' + (z)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.7.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.7.js new file mode 100644 index 000000000..cdc37d9ba --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.7.js @@ -0,0 +1,26 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.7.js + * @description Either Type is not Reference or GetBase is not null, check opeartor is "x >>= y" + */ + +//CHECK#1 +var x = 4; +var z = (x >>= 1); +if (z !== 2) { + $ERROR('#1: var x = 4; var z = (x >>= 1); z === 2. Actual: ' + (z)); +} + +//CHECK#2 +var x = 4; +var y = 1; +var z = (x >>= y); +if (z !== 2) { + $ERROR('#2: var x = 4; var y = 1; var z = (x >>= y); z === 2. Actual: ' + (z)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.8.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.8.js new file mode 100644 index 000000000..e53d41a51 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.8.js @@ -0,0 +1,26 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.8.js + * @description Either Type is not Reference or GetBase is not null, check opeartor is "x >>>= y" + */ + +//CHECK#1 +var x = 4; +var z = (x >>>= 1); +if (z !== 2) { + $ERROR('#1: var x = 4; var z = (x >>>= 1); z === 2. Actual: ' + (z)); +} + +//CHECK#2 +var x = 4; +var y = 1; +var z = (x >>>= y); +if (z !== 2) { + $ERROR('#2: var x = 4; var y = 1; var z = (x >>>= y); z === 2. Actual: ' + (z)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.9.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.9.js new file mode 100644 index 000000000..a74dee97d --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T1.9.js @@ -0,0 +1,26 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T1.9.js + * @description Either Type is not Reference or GetBase is not null, check opeartor is "x &= y" + */ + +//CHECK#1 +var x = 1; +var z = (x &= 1); +if (z !== 1) { + $ERROR('#1: var x = 1; var z = (x &= 1); z === 1. Actual: ' + (z)); +} + +//CHECK#2 +var x = 1; +var y = 1; +var z = (x &= y); +if (z !== 1) { + $ERROR('#2: var x = 1; var y = 1; var z = (x &= y); z === 1. Actual: ' + (z)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.1.js new file mode 100644 index 000000000..eede73f3d --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.1.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.1.js + * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x *= y" + */ + +//CHECK#1 +try { + var x = 1; + var z = (x *= y); + $ERROR('#1.1: var x = 1; x *= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x *= y throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.10.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.10.js new file mode 100644 index 000000000..27c243325 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.10.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.10.js + * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x ^= y" + */ + +//CHECK#1 +try { + var x = 1; + var z = (x ^= y); + $ERROR('#1.1: var x = 1; x ^= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x ^= y throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.11.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.11.js new file mode 100644 index 000000000..22cd6c1b8 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.11.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.11.js + * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x |= y" + */ + +//CHECK#1 +try { + var x = 1; + var z = (x |= y); + $ERROR('#1.1: var x = 1; x |= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x |= y throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.2.js new file mode 100644 index 000000000..02a39f6c4 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.2.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.2.js + * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x /= y" + */ + +//CHECK#1 +try { + var x = 1; + var z = (x /= y); + $ERROR('#1.1: var x = 1; x /= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x /= y throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.3.js new file mode 100644 index 000000000..1d11d3bce --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.3.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.3.js + * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x %= y" + */ + +//CHECK#1 +try { + var x = 1; + var z = (x %= y); + $ERROR('#1.1: var x = 1; x %= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x %= y throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.4.js new file mode 100644 index 000000000..771302777 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.4.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.4.js + * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x += y" + */ + +//CHECK#1 +try { + var x = 1; + var z = (x += y); + $ERROR('#1.1: var x = 1; x += y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x += y throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.5.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.5.js new file mode 100644 index 000000000..500e5e6a9 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.5.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.5.js + * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x -= y" + */ + +//CHECK#1 +try { + var x = 1; + var z = (x -= y); + $ERROR('#1.1: var x = 1; x -= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x -= y throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.6.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.6.js new file mode 100644 index 000000000..9042f94bb --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.6.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.6.js + * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x <<= y" + */ + +//CHECK#1 +try { + var x = 1; + var z = (x <<= y); + $ERROR('#1.1: var x = 1; x <<= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x <<= y throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.7.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.7.js new file mode 100644 index 000000000..8c391557e --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.7.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.7.js + * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x >>= y" + */ + +//CHECK#1 +try { + var x = 1; + var z = (x >>= y); + $ERROR('#1.1: var x = 1; x >>= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x >>= y throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.8.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.8.js new file mode 100644 index 000000000..8db8963a9 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.8.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.8.js + * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x >>>= y" + */ + +//CHECK#1 +try { + var x = 1; + var z = (x >>>= y); + $ERROR('#1.1: var x = 1; x >>>= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x >>>= y throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.9.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.9.js new file mode 100644 index 000000000..a9155a34e --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T2.9.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T2.9.js + * @description If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x &= y" + */ + +//CHECK#1 +try { + var x = 1; + var z = (x &= y); + $ERROR('#1.1: var x = 1; x &= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x &= y throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.1.js new file mode 100644 index 000000000..247f69ebc --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.1.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. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.1.js + * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x *= y" + */ + +//CHECK#1 +try { + var z = (x *= 1); + $ERROR('#1.1: x *= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x *= 1 throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.10.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.10.js new file mode 100644 index 000000000..2c8495ca8 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.10.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. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.10.js + * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x ^= y" + */ + +//CHECK#1 +try { + var z = (x ^= 1); + $ERROR('#1.1: x ^= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x ^= 1 throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.11.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.11.js new file mode 100644 index 000000000..9901b9db1 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.11.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. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.11.js + * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x |= y" + */ + +//CHECK#1 +try { + var z = (x |= 1); + $ERROR('#1.1: x |= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x |= 1 throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.2.js new file mode 100644 index 000000000..6832765ef --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.2.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. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.2.js + * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x /= y" + */ + +//CHECK#1 +try { + var z = (x /= 1); + $ERROR('#1.1: x /= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x /= 1 throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.3.js new file mode 100644 index 000000000..dc0df0e52 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.3.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. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.3.js + * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x %= y" + */ + +//CHECK#1 +try { + var z = (x %= 1); + $ERROR('#1.1: x %= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x %= 1 throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.4.js new file mode 100644 index 000000000..a32957d99 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.4.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. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.4.js + * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x += y" + */ + +//CHECK#1 +try { + var z = (x += 1); + $ERROR('#1.1: x += 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x += 1 throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.5.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.5.js new file mode 100644 index 000000000..7e8f4601d --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.5.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. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.5.js + * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x -= y" + */ + +//CHECK#1 +try { + var z = (x -= 1); + $ERROR('#1.1: x -= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x -= 1 throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.6.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.6.js new file mode 100644 index 000000000..0c1d107bd --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.6.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. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.6.js + * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x <<= y" + */ + +//CHECK#1 +try { + var z = (x <<= 1); + $ERROR('#1.1: x <<= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x <<= 1 throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.7.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.7.js new file mode 100644 index 000000000..0fd60d869 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.7.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. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.7.js + * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x >>= y" + */ + +//CHECK#1 +try { + var z = (x >>= 1); + $ERROR('#1.1: x >>= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x >>= 1 throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.8.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.8.js new file mode 100644 index 000000000..57259d1da --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.8.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. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.8.js + * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x >>>= y" + */ + +//CHECK#1 +try { + var z = (x >>>= 1); + $ERROR('#1.1: x >>>= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x >>>= 1 throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.9.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.9.js new file mode 100644 index 000000000..eac242da4 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.1_T3.9.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. + +/** + * Operator uses GetValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.1_T3.9.js + * @description If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x &= y" + */ + +//CHECK#1 +try { + var z = (x &= 1); + $ERROR('#1.1: x &= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x &= 1 throw ReferenceError. Actual: ' + (e)); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T1.js new file mode 100644 index 000000000..d9ce71a56 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T1.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses PutValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T1.js + * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x *= y" + * @negative + */ + +//CHECK#1 +try { + var z = (1 *= 1); + $ERROR('#1.1: 1 *= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 *= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 *= 1); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T10.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T10.js new file mode 100644 index 000000000..38c494279 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T10.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses PutValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T10.js + * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x ^= y" + * @negative + */ + +//CHECK#1 +try { + var z = (1 ^= 1); + $ERROR('#1.1: 1 ^= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 ^= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 ^= 1); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T11.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T11.js new file mode 100644 index 000000000..45c162f86 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T11.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses PutValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T11.js + * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x |= y" + * @negative + */ + +//CHECK#1 +try { + var z = (1 |= 1); + $ERROR('#1.1: 1 |= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 |= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 |= 1); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T2.js new file mode 100644 index 000000000..7ba092e88 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T2.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses PutValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T2.js + * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x /= y" + * @negative + */ + +//CHECK#1 +try { + var z = (1 /= 1); + $ERROR('#1.1: 1 /= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 /= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 /= 1); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T3.js new file mode 100644 index 000000000..c26da6dd4 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T3.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses PutValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T3.js + * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x %= y" + * @negative + */ + +//CHECK#1 +try { + var z = (1 %= 1); + $ERROR('#1.1: 1 %= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 %= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 %= 1); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T4.js new file mode 100644 index 000000000..bbfbd0f41 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T4.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses PutValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T4.js + * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x += y" + * @negative + */ + +//CHECK#1 +try { + var z = (1 += 1); + $ERROR('#1.1: 1 += 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 += 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 += 1); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T5.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T5.js new file mode 100644 index 000000000..d9a53ecaf --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T5.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses PutValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T5.js + * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x -= y" + * @negative + */ + +//CHECK#1 +try { + var z = (1 -= 1); + $ERROR('#1.1: 1 -= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 -= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 -= 1); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T6.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T6.js new file mode 100644 index 000000000..34154341d --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T6.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses PutValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T6.js + * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x <<= y" + * @negative + */ + +//CHECK#1 +try { + var z = (1 <<= 1); + $ERROR('#1.1: 1 <<= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 <<= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 <<= 1); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T7.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T7.js new file mode 100644 index 000000000..6f0e3fd4d --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T7.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses PutValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T7.js + * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x >>= y" + * @negative + */ + +//CHECK#1 +try { + var z = (1 >>= 1); + $ERROR('#1.1: 1 >>= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 >>= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 >>= 1); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T8.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T8.js new file mode 100644 index 000000000..d82235391 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T8.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses PutValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T8.js + * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x >>>= y" + * @negative + */ + +//CHECK#1 +try { + var z = (1 >>>= 1); + $ERROR('#1.1: 1 >>>= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 >>>= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 >>>= 1); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T9.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T9.js new file mode 100644 index 000000000..f85aa27dd --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A2.2_T9.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator uses PutValue + * + * @path ch11/11.13/11.13.2/S11.13.2_A2.2_T9.js + * @description If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x &= y" + * @negative + */ + +//CHECK#1 +try { + var z = (1 &= 1); + $ERROR('#1.1: 1 &= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 &= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 &= 1); + } +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T1.js new file mode 100644 index 000000000..a50a1cba5 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T1.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y uses PutValue(x, x @ y) + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T1.js + * @description Checking Expression and Variable statements for x *= y + */ + +//CHECK#1 +var x = 1; +x *= -1; +if (x !== -1) { + $ERROR('#1: var x = 1; x *= -1; x === -1. Actual: ' + (x)); +} + +//CHECK#2 +y = 1; +y *= -1; +if (y !== -1) { + $ERROR('#2: y = 1; y *= -1; y === -1. Actual: ' + (y)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T10.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T10.js new file mode 100644 index 000000000..a552f7d08 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T10.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y uses PutValue(x, x @ y) + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T10.js + * @description Checking Expression and Variable statements for x ^= y + */ + +//CHECK#1 +var x = 0; +x ^= 1; +if (x !== 1) { + $ERROR('#1: var x = 0; x ^= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +y = 1; +y ^= 0; +if (y !== 1) { + $ERROR('#2: y = 1; y ^= 0; y === 1. Actual: ' + (y)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T11.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T11.js new file mode 100644 index 000000000..6bacd0744 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T11.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y uses PutValue(x, x @ y) + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T11.js + * @description Checking Expression and Variable statements for x |= y + */ + +//CHECK#1 +var x = 0; +x |= 1; +if (x !== 1) { + $ERROR('#1: var x = 0; x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +y = 1; +y |= 0; +if (y !== 1) { + $ERROR('#2: y = 1; y |= 0; y === 1. Actual: ' + (y)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T2.js new file mode 100644 index 000000000..2b07ad143 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T2.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y uses PutValue(x, x @ y) + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T2.js + * @description Checking Expression and Variable statements for x /= y + */ + +//CHECK#1 +var x = 1; +x /= -1; +if (x !== -1) { + $ERROR('#1: var x = 1; x /= -1; x === -1. Actual: ' + (x)); +} + +//CHECK#2 +y = 1; +y /= -1; +if (y !== -1) { + $ERROR('#2: y = 1; y /= -1; y === -1. Actual: ' + (y)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T3.js new file mode 100644 index 000000000..74ca601ac --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T3.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y uses PutValue(x, x @ y) + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T3.js + * @description Checking Expression and Variable statements for x %= y + */ + +//CHECK#1 +var x = -1; +x %= 2; +if (x !== -1) { + $ERROR('#1: var x = -1; x %= 2; x === -1. Actual: ' + (x)); +} + +//CHECK#2 +y = -1; +y %= 2; +if (y !== -1) { + $ERROR('#2: y = -1; y %= 2; y === -1. Actual: ' + (y)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T4.js new file mode 100644 index 000000000..b97dce0b0 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T4.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y uses PutValue(x, x @ y) + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T4.js + * @description Checking Expression and Variable statements for x += y + */ + +//CHECK#1 +var x = 1; +x += 1; +if (x !== 2) { + $ERROR('#1: var x = 1; x += 1; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +y = 1; +y += 1; +if (y !== 2) { + $ERROR('#2: y = 1; y += 1; y === 2. Actual: ' + (y)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T5.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T5.js new file mode 100644 index 000000000..266953269 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T5.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y uses PutValue(x, x @ y) + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T5.js + * @description Checking Expression and Variable statements for x -= y + */ + +//CHECK#1 +var x = -1; +x -= 1; +if (x !== -2) { + $ERROR('#1: var x = -1; x -= 1; x === -2. Actual: ' + (x)); +} + +//CHECK#2 +y = -1; +y -= 1; +if (y !== -2) { + $ERROR('#2: y = -1; y -= 1; y === -2. Actual: ' + (y)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T6.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T6.js new file mode 100644 index 000000000..08aac7981 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T6.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y uses PutValue(x, x @ y) + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T6.js + * @description Checking Expression and Variable statements for x <<= y + */ + +//CHECK#1 +var x = 1; +x <<= 1; +if (x !== 2) { + $ERROR('#1: var x = 1; x <<= 1; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +y = 1; +y <<= 1; +if (y !== 2) { + $ERROR('#2: y = 1; y <<= 1; y === 2. Actual: ' + (y)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T7.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T7.js new file mode 100644 index 000000000..b2102b2b8 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T7.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y uses PutValue(x, x @ y) + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T7.js + * @description Checking Expression and Variable statements for x >>= y + */ + +//CHECK#1 +var x = 4; +x >>= 1; +if (x !== 2) { + $ERROR('#1: var x = 4; x >>= 1; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +y = 4; +y >>= 1; +if (y !== 2) { + $ERROR('#2: y = 4; y >>= 1; y === 2. Actual: ' + (y)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T8.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T8.js new file mode 100644 index 000000000..7a7dbc7f6 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T8.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y uses PutValue(x, x @ y) + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T8.js + * @description Checking Expression and Variable statements for x >>>= y + */ + +//CHECK#1 +var x = 4; +x >>>= 1; +if (x !== 2) { + $ERROR('#1: var x = 4; x >>>= 1; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +y = 4; +y >>>= 1; +if (y !== 2) { + $ERROR('#2: y = 4; y >>>= 1; y === 2. Actual: ' + (y)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T9.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T9.js new file mode 100644 index 000000000..8e1408df5 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.1_T9.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y uses PutValue(x, x @ y) + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.1_T9.js + * @description Checking Expression and Variable statements for x &= y + */ + +//CHECK#1 +var x = 1; +x &= 1; +if (x !== 1) { + $ERROR('#1: var x = 1; x &= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +y = 1; +y &= 1; +if (y !== 1) { + $ERROR('#2: y = 1; y &= 1; y === 1. Actual: ' + (y)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T1.js new file mode 100644 index 000000000..8a092bea6 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T1.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y returns x @ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T1.js + * @description Checking Expression and Variable statements for x *= y + */ + +//CHECK#1 +var x = 1; +var x1 = (x *= -1); +if (x1 !== -1) { + $ERROR('#1: var x = 1; var x1 = (x *= -1); x1 === -1. Actual: ' + (x1)); +} + +//CHECK#2 +y = 1; +y1 = (y *= -1); +if (y1 !== -1) { + $ERROR('#2: y = 1; y1 = (y *= -1); y1 === -1. Actual: ' + (y1)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T10.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T10.js new file mode 100644 index 000000000..26de3f6ed --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T10.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y returns x @ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T10.js + * @description Checking Expression and Variable statements for x ^= y + */ + +//CHECK#1 +var x = 0; +var x1 = (x ^= 1); +if (x1 !== 1) { + $ERROR('#1: var x = 0; var x1 = (x ^= 1); x1 === 1. Actual: ' + (x1)); +} + +//CHECK#2 +y = 1; +y1 = (y ^= 0); +if (y1 !== 1) { + $ERROR('#2: y = 1; y1 = (y ^= 0); y1 === 1. Actual: ' + (y1)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T11.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T11.js new file mode 100644 index 000000000..e9c1ed403 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T11.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y returns x @ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T11.js + * @description Checking Expression and Variable statements for x |= y + */ + +//CHECK#1 +var x = 0; +var x1 = (x |= 1); +if (x1 !== 1) { + $ERROR('#1: var x = 0; var x1 = (x |= 1); x1 === 1. Actual: ' + (x1)); +} + +//CHECK#2 +y = 1; +y1 = (y |= 0); +if (y1 !== 1) { + $ERROR('#2: y = 1; y1 = (y |= 0); y1 === 1. Actual: ' + (y1)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T2.js new file mode 100644 index 000000000..8de215e0f --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T2.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y returns x @ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T2.js + * @description Checking Expression and Variable statements for x /= y + */ + +//CHECK#1 +var x = 1; +var x1 = (x /= -1); +if (x1 !== -1) { + $ERROR('#1: var x = 1; var x1 = (x /= -1); x1 === -1. Actual: ' + (x1)); +} + +//CHECK#2 +y = 1; +y1 = (y /= -1); +if (y1 !== -1) { + $ERROR('#2: y = 1; y1 = (y /= -1); y1 === -1. Actual: ' + (y1)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T3.js new file mode 100644 index 000000000..2e4853ae2 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T3.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y returns x @ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T3.js + * @description Checking Expression and Variable statements for x %= y + */ + +//CHECK#1 +var x = -1; +var x1 = (x %= 2); +if (x1 !== -1) { + $ERROR('#1: var x = -1; var x1 = (x %= 2); x1 === -1. Actual: ' + (x1)); +} + +//CHECK#2 +y = -1; +y1 = (y %= 2); +if (y1 !== -1) { + $ERROR('#2: y = -1; y1 = (y %= 2); y1 === -1. Actual: ' + (y1)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T4.js new file mode 100644 index 000000000..8aa84317f --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T4.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y returns x @ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T4.js + * @description Checking Expression and Variable statements for x += y + */ + +//CHECK#1 +var x = 1; +var x1 = (x += 1); +if (x1 !== 2) { + $ERROR('#1: var x = 1; var x1 = (x += 1); x1 === 2. Actual: ' + (x1)); +} + +//CHECK#2 +y = 1; +y1 = (y += 1); +if (y1 !== 2) { + $ERROR('#2: y = 1; y1 = (y += 1); y1 === 2. Actual: ' + (y1)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T5.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T5.js new file mode 100644 index 000000000..50ca35e71 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T5.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y returns x @ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T5.js + * @description Checking Expression and Variable statements for x -= y + */ + +//CHECK#1 +var x = -1; +var x1 = (x -= 1); +if (x1 !== -2) { + $ERROR('#1: var x = -1; var x1 = (x -= 1); x1 === -2. Actual: ' + (x1)); +} + +//CHECK#2 +y = -1; +y1 = (y -= 1); +if (y1 !== -2) { + $ERROR('#2: y = -1; y1 = (y -= 1); y1 === -2. Actual: ' + (y1)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T6.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T6.js new file mode 100644 index 000000000..250be77af --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T6.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y returns x @ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T6.js + * @description Checking Expression and Variable statements for x <<= y + */ + +//CHECK#1 +var x = 1; +var x1 = (x <<= 1); +if (x1 !== 2) { + $ERROR('#1: var x = 1; var x1 = (x <<= 1); x1 === 2. Actual: ' + (x1)); +} + +//CHECK#2 +y = 1; +y1 = (y <<= 1); +if (y1 !== 2) { + $ERROR('#2: y = 1; y1 = (y <<= 1); y1 === 2. Actual: ' + (y1)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T7.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T7.js new file mode 100644 index 000000000..d37cce498 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T7.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y returns x @ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T7.js + * @description Checking Expression and Variable statements for x >>= y + */ + +//CHECK#1 +var x = 4; +var x1 = (x >>= 1); +if (x1 !== 2) { + $ERROR('#1: var x = 4; var x1 = (x >>= 1); x1 === 2. Actual: ' + (x1)); +} + +//CHECK#2 +y = 4; +y1 = (y >>= 1); +if (y1 !== 2) { + $ERROR('#2: y = 4; y1 = (y >>= 1); y1 === 2. Actual: ' + (y1)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T8.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T8.js new file mode 100644 index 000000000..f636cbfe5 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T8.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y returns x @ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T8.js + * @description Checking Expression and Variable statements for x >>>= y + */ + +//CHECK#1 +var x = 4; +var x1 = (x >>>= 1); +if (x1 !== 2) { + $ERROR('#1: var x = 4; var x1 = (x >>>= 1); x1 === 2. Actual: ' + (x1)); +} + +//CHECK#2 +y = 4; +y1 = (y >>>= 1); +if (y1 !== 2) { + $ERROR('#2: y = 4; y1 = (y >>>= 1); y1 === 2. Actual: ' + (y1)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T9.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T9.js new file mode 100644 index 000000000..de09e1fd5 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A3.2_T9.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * Operator x @= y returns x @ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A3.2_T9.js + * @description Checking Expression and Variable statements for x &= y + */ + +//CHECK#1 +var x = 1; +var x1 = (x &= 1); +if (x1 !== 1) { + $ERROR('#1: var x = 1; var x1 = (x &= 1); x1 === 1. Actual: ' + (x1)); +} + +//CHECK#2 +y = 1; +y1 = (y &= 1); +if (y1 !== 1) { + $ERROR('#2: y = 1; y1 = (y &= 1); y1 === 1. Actual: ' + (y1)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.1.js new file mode 100644 index 000000000..e9b0ee0c4 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.1.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x ^= y is the same as x = x ^ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T1.1.js + * @description Type(x) and Type(y) vary between primitive boolean and Boolean object + */ + +//CHECK#1 +x = true; +x ^= true; +if (x !== 0) { + $ERROR('#1: x = true; x ^= true; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x ^= true; +if (x !== 0) { + $ERROR('#2: x = new Boolean(true); x ^= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x ^= new Boolean(true); +if (x !== 0) { + $ERROR('#3: x = true; x ^= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x ^= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = new Boolean(true); x ^= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.2.js new file mode 100644 index 000000000..28a622e5b --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.2.js @@ -0,0 +1,39 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x ^= y is the same as x = x ^ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T1.2.js + * @description Type(x) and Type(y) vary between primitive number and Number object + */ + +//CHECK#1 +x = 1; +x ^= 1; +if (x !== 0) { + $ERROR('#1: x = 1; x ^= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x ^= 1; +if (x !== 0) { + $ERROR('#2: x = new Number(1); x ^= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x ^= new Number(1); +if (x !== 0) { + $ERROR('#3: x = 1; x ^= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x ^= new Number(1); +if (x !== 0) { + $ERROR('#4: x = new Number(1); x ^= new Number(1); x === 0. Actual: ' + (x)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.3.js new file mode 100644 index 000000000..bfaec704b --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.3.js @@ -0,0 +1,52 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x ^= y is the same as x = x ^ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T1.3.js + * @description Type(x) and Type(y) vary between primitive string and String object + */ + +//CHECK#1 +x = "1"; +x ^= "1"; +if (x !== 0) { + $ERROR('#1: x = "1"; x ^= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x ^= "1"; +if (x !== 0) { + $ERROR('#2: x = new String("1"); x ^= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x ^= new String("1"); +if (x !== 0) { + $ERROR('#3: x = "1"; x ^= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x ^= new String("1"); +if (x !== 0) { + $ERROR('#4: x = new String("1"); x ^= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x ^= "1"; +if (x !== 1) { + $ERROR('#5: x = "x"; x ^= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x ^= "x"; +if (x !== 1) { + $ERROR('#6: x = "1"; x ^= "x"; x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.4.js new file mode 100644 index 000000000..03b9f63e5 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T1.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x ^= y is the same as x = x ^ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T1.4.js + * @description Type(x) and Type(y) vary between Null and Undefined + */ + +//CHECK#1 +x = null; +x ^= undefined; +if (x !== 0) { + $ERROR('#1: x = null; x ^= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x ^= null; +if (x !== 0) { + $ERROR('#2: x = undefined; x ^= null; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x ^= undefined; +if (x !== 0) { + $ERROR('#3: x = undefined; x ^= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x ^= null; +if (x !== 0) { + $ERROR('#4: x = null; x ^= null; x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.1.js new file mode 100644 index 000000000..82f176291 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.1.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x ^= y is the same as x = x ^ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T2.1.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x ^= 1; +if (x !== 0) { + $ERROR('#1: x = true; x ^= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x ^= true; +if (x !== 0) { + $ERROR('#2: x = 1; x ^= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x ^= 1; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x ^= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x ^= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = 1; x ^= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x ^= new Number(1); +if (x !== 0) { + $ERROR('#5: x = true; x ^= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x ^= true; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x ^= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x ^= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x ^= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x ^= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x ^= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.2.js new file mode 100644 index 000000000..5b877f27a --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.2.js @@ -0,0 +1,80 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x ^= y is the same as x = x ^ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T2.2.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) + */ + +//CHECK#1 +x = "1"; +x ^= 1; +if (x !== 0) { + $ERROR('#1: x = "1"; x ^= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x ^= "1"; +if (x !== 0) { + $ERROR('#2: x = 1; x ^= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x ^= 1; +if (x !== 0) { + $ERROR('#3: x = new String("1"); x ^= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x ^= new String("1"); +if (x !== 0) { + $ERROR('#4: x = 1; x ^= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x ^= new Number(1); +if (x !== 0) { + $ERROR('#5: x = "1"; x ^= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x ^= "1"; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x ^= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x ^= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new String("1"); x ^= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x ^= new String("1"); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x ^= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x ^= 1; +if (x !== 1) { + $ERROR('#9: x = "x"; x ^= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x ^= "x"; +if (x !== 1) { + $ERROR('#10: x = 1; x ^= "x"; x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.3.js new file mode 100644 index 000000000..a41eb8d6c --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.3.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x ^= y is the same as x = x ^ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T2.3.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null + */ + +//CHECK#1 +x = 1; +x ^= null; +if (x !== 1) { + $ERROR('#1: x = 1; x ^= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x ^= 1; +if (x !== 1) { + $ERROR('#2: x = null; x ^= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x ^= null; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x ^= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x ^= new Number(1); +if (x !== 1) { + $ERROR('#4: x = null; x ^= new Number(1); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.4.js new file mode 100644 index 000000000..666f20604 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x ^= y is the same as x = x ^ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T2.4.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined + */ + +//CHECK#1 +x = 1; +x ^= undefined; +if (x !== 1) { + $ERROR('#1: x = 1; x ^= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x ^= 1; +if (x !== 1) { + $ERROR('#2: x = undefined; x ^= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x ^= undefined; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x ^= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x ^= new Number(1); +if (x !== 1) { + $ERROR('#4: x = undefined; x ^= new Number(1); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.5.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.5.js new file mode 100644 index 000000000..aff6b25da --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.5.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x ^= y is the same as x = x ^ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T2.5.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x ^= "1"; +if (x !== 0) { + $ERROR('#1: x = true; x ^= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x ^= true; +if (x !== 0) { + $ERROR('#2: x = "1"; x ^= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x ^= "1"; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x ^= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x ^= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = "1"; x ^= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x ^= new String("1"); +if (x !== 0) { + $ERROR('#5: x = true; x ^= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x ^= true; +if (x !== 0) { + $ERROR('#6: x = new String("1"); x ^= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x ^= new String("1"); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x ^= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x ^= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new String("1"); x ^= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.6.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.6.js new file mode 100644 index 000000000..4b30cef36 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.6.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x ^= y is the same as x = x ^ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T2.6.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined + */ + +//CHECK#1 +x = "1"; +x ^= undefined; +if (x !== 1) { + $ERROR('#1: x = "1"; x ^= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x ^= "1"; +if (x !== 1) { + $ERROR('#2: x = undefined; x ^= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x ^= undefined; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x ^= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x ^= new String("1"); +if (x !== 1) { + $ERROR('#4: x = undefined; x ^= new String("1"); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.7.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.7.js new file mode 100644 index 000000000..880fb66ec --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.7.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x ^= y is the same as x = x ^ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T2.7.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null + */ + +//CHECK#1 +x = "1"; +x ^= null; +if (x !== 1) { + $ERROR('#1: x = "1"; x ^= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x ^= "1"; +if (x !== 1) { + $ERROR('#2: x = null; x ^= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x ^= null; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x ^= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x ^= new String("1"); +if (x !== 1) { + $ERROR('#4: x = null; x ^= new String("1"); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.8.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.8.js new file mode 100644 index 000000000..4e0e83855 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.8.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x ^= y is the same as x = x ^ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T2.8.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined + */ + +//CHECK#1 +x = true; +x ^= undefined; +if (x !== 1) { + $ERROR('#1: x = true; x ^= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x ^= true; +if (x !== 1) { + $ERROR('#2: x = undefined; x ^= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x ^= undefined; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x ^= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x ^= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = undefined; x ^= new Boolean(true); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.9.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.9.js new file mode 100644 index 000000000..59a622d54 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.10_T2.9.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x ^= y is the same as x = x ^ y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.10_T2.9.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null + */ + +//CHECK#1 +x = true; +x ^= null; +if (x !== 1) { + $ERROR('#1: x = true; x ^= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x ^= true; +if (x !== 1) { + $ERROR('#2: x = null; x ^= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x ^= null; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x ^= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x ^= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = null; x ^= new Boolean(true); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.1.js new file mode 100644 index 000000000..afc6d63cf --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.1.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x |= y is the same as x = x | y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T1.1.js + * @description Type(x) and Type(y) vary between primitive boolean and Boolean object + */ + +//CHECK#1 +x = true; +x |= true; +if (x !== 1) { + $ERROR('#1: x = true; x |= true; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x |= true; +if (x !== 1) { + $ERROR('#2: x = new Boolean(true); x |= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x |= new Boolean(true); +if (x !== 1) { + $ERROR('#3: x = true; x |= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x |= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = new Boolean(true); x |= new Boolean(true); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.2.js new file mode 100644 index 000000000..24a4a8fa5 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.2.js @@ -0,0 +1,39 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x |= y is the same as x = x | y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T1.2.js + * @description Type(x) and Type(y) vary between primitive number and Number object + */ + +//CHECK#1 +x = 1; +x |= 1; +if (x !== 1) { + $ERROR('#1: x = 1; x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x |= 1; +if (x !== 1) { + $ERROR('#2: x = new Number(1); x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x |= new Number(1); +if (x !== 1) { + $ERROR('#3: x = 1; x |= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x |= new Number(1); +if (x !== 1) { + $ERROR('#4: x = new Number(1); x |= new Number(1); x === 1. Actual: ' + (x)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.3.js new file mode 100644 index 000000000..5e6ae229a --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.3.js @@ -0,0 +1,52 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x |= y is the same as x = x | y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T1.3.js + * @description Type(x) and Type(y) vary between primitive string and String object + */ + +//CHECK#1 +x = "1"; +x |= "1"; +if (x !== 1) { + $ERROR('#1: x = "1"; x |= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x |= "1"; +if (x !== 1) { + $ERROR('#2: x = new String("1"); x |= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x |= new String("1"); +if (x !== 1) { + $ERROR('#3: x = "1"; x |= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x |= new String("1"); +if (x !== 1) { + $ERROR('#4: x = new String("1"); x |= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x |= "1"; +if (x !== 1) { + $ERROR('#5: x = "x"; x |= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x |= "x"; +if (x !== 1) { + $ERROR('#6: x = "1"; x |= "x"; x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.4.js new file mode 100644 index 000000000..2c16de058 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T1.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x |= y is the same as x = x | y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T1.4.js + * @description Type(x) and Type(y) vary between Null and Undefined + */ + +//CHECK#1 +x = null; +x |= undefined; +if (x !== 0) { + $ERROR('#1: x = null; x |= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x |= null; +if (x !== 0) { + $ERROR('#2: x = undefined; x |= null; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x |= undefined; +if (x !== 0) { + $ERROR('#3: x = undefined; x |= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x |= null; +if (x !== 0) { + $ERROR('#4: x = null; x |= null; x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.1.js new file mode 100644 index 000000000..f764964f0 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.1.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x |= y is the same as x = x | y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T2.1.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x |= 1; +if (x !== 1) { + $ERROR('#1: x = true; x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x |= true; +if (x !== 1) { + $ERROR('#2: x = 1; x |= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x |= 1; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x |= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = 1; x |= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x |= new Number(1); +if (x !== 1) { + $ERROR('#5: x = true; x |= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x |= true; +if (x !== 1) { + $ERROR('#6: x = new Number(1); x |= true; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x |= new Number(1); +if (x !== 1) { + $ERROR('#7: x = new Boolean(true); x |= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x |= new Boolean(true); +if (x !== 1) { + $ERROR('#8: x = new Number(1); x |= new Boolean(true); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.2.js new file mode 100644 index 000000000..46e183eb9 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.2.js @@ -0,0 +1,80 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x |= y is the same as x = x | y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T2.2.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) + */ + +//CHECK#1 +x = "1"; +x |= 1; +if (x !== 1) { + $ERROR('#1: x = "1"; x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x |= "1"; +if (x !== 1) { + $ERROR('#2: x = 1; x |= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x |= 1; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x |= new String("1"); +if (x !== 1) { + $ERROR('#4: x = 1; x |= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x |= new Number(1); +if (x !== 1) { + $ERROR('#5: x = "1"; x |= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x |= "1"; +if (x !== 1) { + $ERROR('#6: x = new Number(1); x |= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x |= new Number(1); +if (x !== 1) { + $ERROR('#7: x = new String("1"); x |= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x |= new String("1"); +if (x !== 1) { + $ERROR('#8: x = new Number(1); x |= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x |= 1; +if (x !== 1) { + $ERROR('#9: x = "x"; x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x |= "x"; +if (x !== 1) { + $ERROR('#10: x = 1; x |= "x"; x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.3.js new file mode 100644 index 000000000..070f1ecfe --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.3.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x |= y is the same as x = x | y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T2.3.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null + */ + +//CHECK#1 +x = 1; +x |= null; +if (x !== 1) { + $ERROR('#1: x = 1; x |= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x |= 1; +if (x !== 1) { + $ERROR('#2: x = null; x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x |= null; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x |= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x |= new Number(1); +if (x !== 1) { + $ERROR('#4: x = null; x |= new Number(1); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.4.js new file mode 100644 index 000000000..e83610f36 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x |= y is the same as x = x | y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T2.4.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined + */ + +//CHECK#1 +x = 1; +x |= undefined; +if (x !== 1) { + $ERROR('#1: x = 1; x |= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x |= 1; +if (x !== 1) { + $ERROR('#2: x = undefined; x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x |= undefined; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x |= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x |= new Number(1); +if (x !== 1) { + $ERROR('#4: x = undefined; x |= new Number(1); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.5.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.5.js new file mode 100644 index 000000000..0511f6674 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.5.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x |= y is the same as x = x | y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T2.5.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x |= "1"; +if (x !== 1) { + $ERROR('#1: x = true; x |= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x |= true; +if (x !== 1) { + $ERROR('#2: x = "1"; x |= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x |= "1"; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x |= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x |= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = "1"; x |= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x |= new String("1"); +if (x !== 1) { + $ERROR('#5: x = true; x |= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x |= true; +if (x !== 1) { + $ERROR('#6: x = new String("1"); x |= true; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x |= new String("1"); +if (x !== 1) { + $ERROR('#7: x = new Boolean(true); x |= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x |= new Boolean(true); +if (x !== 1) { + $ERROR('#8: x = new String("1"); x |= new Boolean(true); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.6.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.6.js new file mode 100644 index 000000000..b3aa7445c --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.6.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x |= y is the same as x = x | y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T2.6.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined + */ + +//CHECK#1 +x = "1"; +x |= undefined; +if (x !== 1) { + $ERROR('#1: x = "1"; x |= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x |= "1"; +if (x !== 1) { + $ERROR('#2: x = undefined; x |= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x |= undefined; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x |= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x |= new String("1"); +if (x !== 1) { + $ERROR('#4: x = undefined; x |= new String("1"); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.7.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.7.js new file mode 100644 index 000000000..b1539ad74 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.7.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x |= y is the same as x = x | y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T2.7.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null + */ + +//CHECK#1 +x = "1"; +x |= null; +if (x !== 1) { + $ERROR('#1: x = "1"; x |= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x |= "1"; +if (x !== 1) { + $ERROR('#2: x = null; x |= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x |= null; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x |= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x |= new String("1"); +if (x !== 1) { + $ERROR('#4: x = null; x |= new String("1"); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.8.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.8.js new file mode 100644 index 000000000..dbe3e0a1f --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.8.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x |= y is the same as x = x | y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T2.8.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined + */ + +//CHECK#1 +x = true; +x |= undefined; +if (x !== 1) { + $ERROR('#1: x = true; x |= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x |= true; +if (x !== 1) { + $ERROR('#2: x = undefined; x |= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x |= undefined; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x |= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x |= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = undefined; x |= new Boolean(true); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.9.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.9.js new file mode 100644 index 000000000..aaf7e4a87 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.11_T2.9.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x |= y is the same as x = x | y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.11_T2.9.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null + */ + +//CHECK#1 +x = true; +x |= null; +if (x !== 1) { + $ERROR('#1: x = true; x |= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x |= true; +if (x !== 1) { + $ERROR('#2: x = null; x |= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x |= null; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x |= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x |= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = null; x |= new Boolean(true); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.1.js new file mode 100644 index 000000000..bfc284bbc --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.1.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x *= y is the same as the production x = x * y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T1.1.js + * @description Type(x) and Type(y) vary between primitive boolean and Boolean object + */ + +//CHECK#1 +x = true; +x *= true; +if (x !== 1) { + $ERROR('#1: x = true; x *= true; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x *= true; +if (x !== 1) { + $ERROR('#2: x = new Boolean(true); x *= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x *= new Boolean(true); +if (x !== 1) { + $ERROR('#3: x = true; x *= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x *= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = new Boolean(true); x *= new Boolean(true); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.2.js new file mode 100644 index 000000000..f13415b28 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.2.js @@ -0,0 +1,39 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x *= y is the same as the production x = x * y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T1.2.js + * @description Type(x) and Type(y) vary between primitive number and Number object + */ + +//CHECK#1 +x = 1; +x *= 1; +if (x !== 1) { + $ERROR('#1: x = 1; x *= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x *= 1; +if (x !== 1) { + $ERROR('#2: x = new Number(1); x *= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x *= new Number(1); +if (x !== 1) { + $ERROR('#3: x = 1; x *= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x *= new Number(1); +if (x !== 1) { + $ERROR('#4: x = new Number(1); x *= new Number(1); x === 1. Actual: ' + (x)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.3.js new file mode 100644 index 000000000..67aca8fc1 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.3.js @@ -0,0 +1,52 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x *= y is the same as the production x = x * y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T1.3.js + * @description Type(x) and Type(y) vary between primitive string and String object + */ + +//CHECK#1 +x = "1"; +x *= "1"; +if (x !== 1) { + $ERROR('#1: x = "1"; x *= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x *= "1"; +if (x !== 1) { + $ERROR('#2: x = new String("1"); x *= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x *= new String("1"); +if (x !== 1) { + $ERROR('#3: x = "1"; x *= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x *= new String("1"); +if (x !== 1) { + $ERROR('#4: x = new String("1"); x *= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x *= "1"; +if (isNaN(x) !== true) { + $ERROR('#5: x = "x"; x *= "1"; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x *= "x"; +if (isNaN(x) !== true) { + $ERROR('#6: x = "1"; x *= "x"; x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.4.js new file mode 100644 index 000000000..fbb268105 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T1.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x *= y is the same as the production x = x * y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T1.4.js + * @description Type(x) and Type(y) vary between Null and Undefined + */ + +//CHECK#1 +x = null; +x *= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = null; x *= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x *= null; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x *= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x *= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = undefined; x *= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x *= null; +if (x !== 0) { + $ERROR('#4: x = null; x *= null; x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.1.js new file mode 100644 index 000000000..29db0f5cb --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.1.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x *= y is the same as the production x = x * y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.1.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Number (primitive and object) + */ + +//CHECK#1 +x = true; +x *= 1; +if (x !== 1) { + $ERROR('#1: x = true; x *= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x *= true; +if (x !== 1) { + $ERROR('#2: x = 1; x *= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x *= 1; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x *= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x *= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = 1; x *= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x *= new Number(1); +if (x !== 1) { + $ERROR('#5: x = true; x *= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x *= true; +if (x !== 1) { + $ERROR('#6: x = new Number(1); x *= true; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x *= new Number(1); +if (x !== 1) { + $ERROR('#7: x = new Boolean(true); x *= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x *= new Boolean(true); +if (x !== 1) { + $ERROR('#8: x = new Number(1); x *= new Boolean(true); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.2.js new file mode 100644 index 000000000..7d3046127 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.2.js @@ -0,0 +1,80 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x *= y is the same as the production x = x * y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.2.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) + */ + +//CHECK#1 +x = "1"; +x *= 1; +if (x !== 1) { + $ERROR('#1: x = "1"; x *= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x *= "1"; +if (x !== 1) { + $ERROR('#2: x = 1; x *= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x *= 1; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x *= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x *= new String("1"); +if (x !== 1) { + $ERROR('#4: x = 1; x *= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x *= new Number(1); +if (x !== 1) { + $ERROR('#5: x = "1"; x *= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x *= "1"; +if (x !== 1) { + $ERROR('#6: x = new Number(1); x *= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x *= new Number(1); +if (x !== 1) { + $ERROR('#7: x = new String("1"); x *= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x *= new String("1"); +if (x !== 1) { + $ERROR('#8: x = new Number(1); x *= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x *= 1; +if (isNaN(x) !== true) { + $ERROR('#9: x = "x"; x *= 1; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x *= "x"; +if (isNaN(x) !== true) { + $ERROR('#10: x = 1; x *= "x"; x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.3.js new file mode 100644 index 000000000..b796dc5cb --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.3.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x *= y is the same as the production x = x * y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.3.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null + */ + +//CHECK#1 +x = 1; +x *= null; +if (x !== 0) { + $ERROR('#1: x = 1; x *= null; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x *= 1; +if (x !== 0) { + $ERROR('#2: x = null; x *= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x *= null; +if (x !== 0) { + $ERROR('#3: x = new Number(1); x *= null; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x *= new Number(1); +if (x !== 0) { + $ERROR('#4: x = null; x *= new Number(1); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.4.js new file mode 100644 index 000000000..925d73634 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x *= y is the same as the production x = x * y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.4.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined + */ + +//CHECK#1 +x = 1; +x *= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = 1; x *= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x *= 1; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x *= 1; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x *= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Number(1); x *= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x *= new Number(1); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x *= new Number(1); x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.5.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.5.js new file mode 100644 index 000000000..7799377cd --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.5.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x *= y is the same as the production x = x * y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.5.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) amd Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x *= "1"; +if (x !== 1) { + $ERROR('#1: x = true; x *= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x *= true; +if (x !== 1) { + $ERROR('#2: x = "1"; x *= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x *= "1"; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x *= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x *= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = "1"; x *= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x *= new String("1"); +if (x !== 1) { + $ERROR('#5: x = true; x *= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x *= true; +if (x !== 1) { + $ERROR('#6: x = new String("1"); x *= true; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x *= new String("1"); +if (x !== 1) { + $ERROR('#7: x = new Boolean(true); x *= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x *= new Boolean(true); +if (x !== 1) { + $ERROR('#8: x = new String("1"); x *= new Boolean(true); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.6.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.6.js new file mode 100644 index 000000000..07be01351 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.6.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x *= y is the same as the production x = x * y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.6.js + * @description Type(x) is different from Type(y) and both types vary between primitive String (primitive or object) and Undefined + */ + +//CHECK#1 +x = "1"; +x *= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = "1"; x *= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x *= "1"; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x *= "1"; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x *= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new String("1"); x *= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x *= new String("1"); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x *= new String("1"); x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.7.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.7.js new file mode 100644 index 000000000..b0e8eddc4 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.7.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x *= y is the same as the production x = x * y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.7.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null + */ + +//CHECK#1 +x = "1"; +x *= null; +if (x !== 0) { + $ERROR('#1: x = "1"; x *= null; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x *= "1"; +if (x !== 0) { + $ERROR('#2: x = null; x *= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x *= null; +if (x !== 0) { + $ERROR('#3: x = new String("1"); x *= null; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x *= new String("1"); +if (x !== 0) { + $ERROR('#4: x = null; x *= new String("1"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.8.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.8.js new file mode 100644 index 000000000..dc0adc04c --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.8.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x *= y is the same as the production x = x * y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.8.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined + */ + +//CHECK#1 +x = true; +x *= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = true; x *= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x *= true; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x *= true; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x *= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Boolean(true); x *= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x *= new Boolean(true); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x *= new Boolean(true); x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.9.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.9.js new file mode 100644 index 000000000..0a7443afe --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.9.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x *= y is the same as the production x = x * y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.9.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null + */ + +//CHECK#1 +x = true; +x *= null; +if (x !== 0) { + $ERROR('#1: x = true; x *= null; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x *= true; +if (x !== 0) { + $ERROR('#2: x = null; x *= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x *= null; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x *= null; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x *= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = null; x *= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.1.js new file mode 100644 index 000000000..da1ab4cdf --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.1.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x /= y is the same as x = x / y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T1.1.js + * @description Type(x) and Type(y) vary between primitive boolean and Boolean object + */ + +//CHECK#1 +x = true; +x /= true; +if (x !== 1) { + $ERROR('#1: x = true; x /= true; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x /= true; +if (x !== 1) { + $ERROR('#2: x = new Boolean(true); x /= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x /= new Boolean(true); +if (x !== 1) { + $ERROR('#3: x = true; x /= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x /= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = new Boolean(true); x /= new Boolean(true); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.2.js new file mode 100644 index 000000000..3287c7c78 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.2.js @@ -0,0 +1,39 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x /= y is the same as x = x / y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T1.2.js + * @description Type(x) and Type(y) vary between primitive number and Number object + */ + +//CHECK#1 +x = 1; +x /= 1; +if (x !== 1) { + $ERROR('#1: x = 1; x /= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x /= 1; +if (x !== 1) { + $ERROR('#2: x = new Number(1); x /= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x /= new Number(1); +if (x !== 1) { + $ERROR('#3: x = 1; x /= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x /= new Number(1); +if (x !== 1) { + $ERROR('#4: x = new Number(1); x /= new Number(1); x === 1. Actual: ' + (x)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.3.js new file mode 100644 index 000000000..d327257ff --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.3.js @@ -0,0 +1,52 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x /= y is the same as x = x / y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T1.3.js + * @description Type(x) and Type(y) vary between primitive string and String object + */ + +//CHECK#1 +x = "1"; +x /= "1"; +if (x !== 1) { + $ERROR('#1: x = "1"; x /= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x /= "1"; +if (x !== 1) { + $ERROR('#2: x = new String("1"); x /= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x /= new String("1"); +if (x !== 1) { + $ERROR('#3: x = "1"; x /= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x /= new String("1"); +if (x !== 1) { + $ERROR('#4: x = new String("1"); x /= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x /= "1"; +if (isNaN(x) !== true) { + $ERROR('#5: x = "x"; x /= "1"; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x /= "x"; +if (isNaN(x) !== true) { + $ERROR('#6: x = "1"; x /= "x"; x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.4.js new file mode 100644 index 000000000..e97535c94 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T1.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x /= y is the same as x = x / y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T1.4.js + * @description Type(x) and Type(y) vary between Null and Undefined + */ + +//CHECK#1 +x = null; +x /= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = null; x /= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x /= null; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x /= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x /= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = undefined; x /= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x /= null; +if (isNaN(x) !== true) { + $ERROR('#4: x = null; x /= null; x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.1.js new file mode 100644 index 000000000..46eae946e --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.1.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x /= y is the same as x = x / y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T2.1.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x /= 1; +if (x !== 1) { + $ERROR('#1: x = true; x /= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x /= true; +if (x !== 1) { + $ERROR('#2: x = 1; x /= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x /= 1; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x /= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x /= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = 1; x /= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x /= new Number(1); +if (x !== 1) { + $ERROR('#5: x = true; x /= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x /= true; +if (x !== 1) { + $ERROR('#6: x = new Number(1); x /= true; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x /= new Number(1); +if (x !== 1) { + $ERROR('#7: x = new Boolean(true); x /= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x /= new Boolean(true); +if (x !== 1) { + $ERROR('#8: x = new Number(1); x /= new Boolean(true); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.2.js new file mode 100644 index 000000000..8a607b515 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.2.js @@ -0,0 +1,80 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x /= y is the same as x = x / y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T2.2.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) + */ + +//CHECK#1 +x = "1"; +x /= 1; +if (x !== 1) { + $ERROR('#1: x = "1"; x /= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x /= "1"; +if (x !== 1) { + $ERROR('#2: x = 1; x /= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x /= 1; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x /= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x /= new String("1"); +if (x !== 1) { + $ERROR('#4: x = 1; x /= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x /= new Number(1); +if (x !== 1) { + $ERROR('#5: x = "1"; x /= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x /= "1"; +if (x !== 1) { + $ERROR('#6: x = new Number(1); x /= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x /= new Number(1); +if (x !== 1) { + $ERROR('#7: x = new String("1"); x /= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x /= new String("1"); +if (x !== 1) { + $ERROR('#8: x = new Number(1); x /= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x /= 1; +if (isNaN(x) !== true) { + $ERROR('#9: x = "x"; x /= 1; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x /= "x"; +if (isNaN(x) !== true) { + $ERROR('#10: x = 1; x /= "x"; x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.3.js new file mode 100644 index 000000000..dae7a092a --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.3.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x /= y is the same as x = x / y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T2.3.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null + */ + +//CHECK#1 +x = 1; +x /= null; +if (x !== Number.POSITIVE_INFINITY) { + $ERROR('#1: x = 1; x /= null; x === +Infinity. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x /= 1; +if (x !== 0) { + $ERROR('#2: x = null; x /= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x /= null; +if (x !== Number.POSITIVE_INFINITY) { + $ERROR('#3: x = new Number(1); x /= null; x === +Infinity. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x /= new Number(1); +if (x !== 0) { + $ERROR('#4: x = null; x /= new Number(1); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.4.js new file mode 100644 index 000000000..28c6d611d --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x /= y is the same as x = x / y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T2.4.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined + */ + +//CHECK#1 +x = 1; +x /= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = 1; x /= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x /= 1; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x /= 1; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x /= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Number(1); x /= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x /= new Number(1); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x /= new Number(1); x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.5.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.5.js new file mode 100644 index 000000000..f4ea9ad5f --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.5.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x /= y is the same as x = x / y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T2.5.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x /= "1"; +if (x !== 1) { + $ERROR('#1: x = true; x /= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x /= true; +if (x !== 1) { + $ERROR('#2: x = "1"; x /= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x /= "1"; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x /= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x /= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = "1"; x /= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x /= new String("1"); +if (x !== 1) { + $ERROR('#5: x = true; x /= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x /= true; +if (x !== 1) { + $ERROR('#6: x = new String("1"); x /= true; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x /= new String("1"); +if (x !== 1) { + $ERROR('#7: x = new Boolean(true); x /= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x /= new Boolean(true); +if (x !== 1) { + $ERROR('#8: x = new String("1"); x /= new Boolean(true); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.6.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.6.js new file mode 100644 index 000000000..91ce4dd2b --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.6.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x /= y is the same as x = x / y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T2.6.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined + */ + +//CHECK#1 +x = "1"; +x /= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = "1"; x /= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x /= "1"; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x /= "1"; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x /= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new String("1"); x /= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x /= new String("1"); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x /= new String("1"); x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.7.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.7.js new file mode 100644 index 000000000..99905f4d9 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.7.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x /= y is the same as x = x / y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T2.7.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null + */ + +//CHECK#1 +x = "1"; +x /= null; +if (x !== Number.POSITIVE_INFINITY) { + $ERROR('#1: x = "1"; x /= null; x === +Infinity. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x /= "1"; +if (x !== 0) { + $ERROR('#2: x = null; x /= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x /= null; +if (x !== Number.POSITIVE_INFINITY) { + $ERROR('#3: x = new String("1"); x /= null; x === +Infinity. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x /= new String("1"); +if (x !== 0) { + $ERROR('#4: x = null; x /= new String("1"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.8.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.8.js new file mode 100644 index 000000000..c5c373b76 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.8.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x /= y is the same as x = x / y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T2.8.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined + */ + +//CHECK#1 +x = true; +x /= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = true; x /= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x /= true; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x /= true; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x /= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Boolean(true); x /= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x /= new Boolean(true); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x /= new Boolean(true); x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.9.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.9.js new file mode 100644 index 000000000..466f9ce87 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.2_T2.9.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x /= y is the same as x = x / y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.2_T2.9.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null + */ + +//CHECK#1 +x = true; +x /= null; +if (x !== Number.POSITIVE_INFINITY) { + $ERROR('#1: x = true; x /= null; x === +Infinity. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x /= true; +if (x !== 0) { + $ERROR('#2: x = null; x /= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x /= null; +if (x !== Number.POSITIVE_INFINITY) { + $ERROR('#3: x = new Boolean(true); x /= null; x === +Infinity. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x /= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = null; x /= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.1.js new file mode 100644 index 000000000..bb8d9cccd --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.1.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x %= y is the same as x = x % y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T1.1.js + * @description Type(x) and Type(y) vary between primitive boolean and Boolean object + */ + +//CHECK#1 +x = true; +x %= true; +if (x !== 0) { + $ERROR('#1: x = true; x %= true; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x %= true; +if (x !== 0) { + $ERROR('#2: x = new Boolean(true); x %= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x %= new Boolean(true); +if (x !== 0) { + $ERROR('#3: x = true; x %= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x %= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = new Boolean(true); x %= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.2.js new file mode 100644 index 000000000..97093ecdb --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.2.js @@ -0,0 +1,39 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x %= y is the same as x = x % y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T1.2.js + * @description Type(x) and Type(y) vary between primitive number and Number object + */ + +//CHECK#1 +x = 1; +x %= 1; +if (x !== 0) { + $ERROR('#1: x = 1; x %= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x %= 1; +if (x !== 0) { + $ERROR('#2: x = new Number(1); x %= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x %= new Number(1); +if (x !== 0) { + $ERROR('#3: x = 1; x %= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x %= new Number(1); +if (x !== 0) { + $ERROR('#4: x = new Number(1); x %= new Number(1); x === 0. Actual: ' + (x)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.3.js new file mode 100644 index 000000000..e95df69bb --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.3.js @@ -0,0 +1,52 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x %= y is the same as x = x % y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T1.3.js + * @description Type(x) and Type(y) vary between primitive string and String object + */ + +//CHECK#1 +x = "1"; +x %= "1"; +if (x !== 0) { + $ERROR('#1: x = "1"; x %= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x %= "1"; +if (x !== 0) { + $ERROR('#2: x = new String("1"); x %= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x %= new String("1"); +if (x !== 0) { + $ERROR('#3: x = "1"; x %= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x %= new String("1"); +if (x !== 0) { + $ERROR('#4: x = new String("1"); x %= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x %= "1"; +if (isNaN(x) !== true) { + $ERROR('#5: x = "x"; x %= "1"; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x %= "x"; +if (isNaN(x) !== true) { + $ERROR('#6: x = "1"; x %= "x"; x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.4.js new file mode 100644 index 000000000..51e763cac --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x %= y is the same as x = x % y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T1.4.js + * @description Type(x) and Type(y) vary between Null and Undefined + */ + +//CHECK#1 +x = null; +x %= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = null; x %= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x %= null; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x %= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x %= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = undefined; x %= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x %= null; +if (isNaN(x) !== true) { + $ERROR('#4: x = null; x %= null; x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.1.js new file mode 100644 index 000000000..a45476433 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.1.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x %= y is the same as x = x % y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T2.1.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x %= 1; +if (x !== 0) { + $ERROR('#1: x = true; x %= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x %= true; +if (x !== 0) { + $ERROR('#2: x = 1; x %= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x %= 1; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x %= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x %= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = 1; x %= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x %= new Number(1); +if (x !== 0) { + $ERROR('#5: x = true; x %= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x %= true; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x %= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x %= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x %= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x %= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x %= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.2.js new file mode 100644 index 000000000..e2027c6b3 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.2.js @@ -0,0 +1,80 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x %= y is the same as x = x % y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T2.2.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) + */ + +//CHECK#1 +x = "1"; +x %= 1; +if (x !== 0) { + $ERROR('#1: x = "1"; x %= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x %= "1"; +if (x !== 0) { + $ERROR('#2: x = 1; x %= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x %= 1; +if (x !== 0) { + $ERROR('#3: x = new String("1"); x %= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x %= new String("1"); +if (x !== 0) { + $ERROR('#4: x = 1; x %= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x %= new Number(1); +if (x !== 0) { + $ERROR('#5: x = "1"; x %= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x %= "1"; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x %= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x %= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new String("1"); x %= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x %= new String("1"); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x %= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x %= 1; +if (isNaN(x) !== true) { + $ERROR('#9: x = "x"; x %= 1; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x %= "x"; +if (isNaN(x) !== true) { + $ERROR('#10: x = 1; x %= "x"; x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.3.js new file mode 100644 index 000000000..8566f8702 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.3.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x %= y is the same as x = x % y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T2.3.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null + */ + +//CHECK#1 +x = 1; +x %= null; +if (isNaN(x) !== true) { + $ERROR('#1: x = 1; x %= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x %= 1; +if (x !== 0) { + $ERROR('#2: x = null; x %= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x %= null; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Number(1); x %= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x %= new Number(1); +if (x !== 0) { + $ERROR('#4: x = null; x %= new Number(1); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.4.js new file mode 100644 index 000000000..259c937b4 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x %= y is the same as x = x % y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T2.4.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined + */ + +//CHECK#1 +x = 1; +x %= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = 1; x %= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x %= 1; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x %= 1; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x %= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Number(1); x %= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x %= new Number(1); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x %= new Number(1); x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.5.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.5.js new file mode 100644 index 000000000..69bff3cb4 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.5.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x %= y is the same as x = x % y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T2.5.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x %= "1"; +if (x !== 0) { + $ERROR('#1: x = true; x %= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x %= true; +if (x !== 0) { + $ERROR('#2: x = "1"; x %= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x %= "1"; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x %= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x %= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = "1"; x %= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x %= new String("1"); +if (x !== 0) { + $ERROR('#5: x = true; x %= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x %= true; +if (x !== 0) { + $ERROR('#6: x = new String("1"); x %= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x %= new String("1"); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x %= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x %= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new String("1"); x %= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.6.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.6.js new file mode 100644 index 000000000..51f30a6d0 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.6.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x %= y is the same as x = x % y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T2.6.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined + */ + +//CHECK#1 +x = "1"; +x %= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = "1"; x %= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x %= "1"; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x %= "1"; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x %= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new String("1"); x %= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x %= new String("1"); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x %= new String("1"); x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.7.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.7.js new file mode 100644 index 000000000..e451b5bfe --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.7.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x %= y is the same as x = x % y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T2.7.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null + */ + +//CHECK#1 +x = "1"; +x %= null; +if (isNaN(x) !== true) { + $ERROR('#1: x = "1"; x %= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x %= "1"; +if (x !== 0) { + $ERROR('#2: x = null; x %= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x %= null; +if (isNaN(x) !== true) { + $ERROR('#3: x = new String("1"); x %= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x %= new String("1"); +if (x !== 0) { + $ERROR('#4: x = null; x %= new String("1"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.8.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.8.js new file mode 100644 index 000000000..59a57095d --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.8.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x %= y is the same as x = x % y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T2.8.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined + */ + +//CHECK#1 +x = true; +x %= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = true; x %= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x %= true; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x %= true; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x %= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Boolean(true); x %= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x %= new Boolean(true); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x %= new Boolean(true); x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.9.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.9.js new file mode 100644 index 000000000..ebb9b209f --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T2.9.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x %= y is the same as x = x % y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T2.9.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null + */ + +//CHECK#1 +x = true; +x %= null; +if (isNaN(x) !== true) { + $ERROR('#1: x = true; x %= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x %= true; +if (x !== 0) { + $ERROR('#2: x = null; x %= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x %= null; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Boolean(true); x %= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x %= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = null; x %= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.1.js new file mode 100644 index 000000000..11313aac6 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.1.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x += y is the same as x = x + y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T1.1.js + * @description Type(x) and Type(y) vary between primitive boolean and Boolean object + */ + +//CHECK#1 +x = true; +x += true; +if (x !== 2) { + $ERROR('#1: x = true; x += true; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x += true; +if (x !== 2) { + $ERROR('#2: x = new Boolean(true); x += true; x === 2. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x += new Boolean(true); +if (x !== 2) { + $ERROR('#3: x = true; x += new Boolean(true); x === 2. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x += new Boolean(true); +if (x !== 2) { + $ERROR('#4: x = new Boolean(true); x += new Boolean(true); x === 2. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.2.js new file mode 100644 index 000000000..141d56b4d --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.2.js @@ -0,0 +1,39 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x += y is the same as x = x + y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T1.2.js + * @description Type(x) and Type(y) vary between primitive number and Number object + */ + +//CHECK#1 +x = 1; +x += 1; +if (x !== 2) { + $ERROR('#1: x = 1; x += 1; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x += 1; +if (x !== 2) { + $ERROR('#2: x = new Number(1); x += 1; x === 2. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x += new Number(1); +if (x !== 2) { + $ERROR('#3: x = 1; x += new Number(1); x === 2. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x += new Number(1); +if (x !== 2) { + $ERROR('#4: x = new Number(1); x += new Number(1); x === 2. Actual: ' + (x)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.3.js new file mode 100644 index 000000000..da89e3789 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.3.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x += y is the same as x = x + y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T1.3.js + * @description Type(x) and Type(y) vary between Null and Undefined + */ + +//CHECK#1 +x = null; +x += undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = null; x += undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x += null; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x += null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x += undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = undefined; x += undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x += null; +if (x !== 0) { + $ERROR('#4: x = null; x += null; x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.4.js new file mode 100644 index 000000000..3ae788c91 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T1.4.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x += y is the same as x = x + y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T1.4.js + * @description Type(x) and Type(y) vary between primitive string and String object + */ + +//CHECK#1 +x = "1"; +x += "1"; +if (x !== "11") { + $ERROR('#1: x = "1"; x += "1"; x === "11". Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x += "1"; +if (x !== "11") { + $ERROR('#2: x = new String("1"); x += "1"; x === "11". Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x += new String("1"); +if (x !== "11") { + $ERROR('#3: x = "1"; x += new String("1"); x === "11". Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x += new String("1"); +if (x !== "11") { + $ERROR('#4: x = new String("1"); x += new String("1"); x === "11". Actual: ' + (x)); +} + +//CHECK#5 +if ("x" + "1" !=="x1") { + $ERROR('#5: x = "x"; x += "1"; x === "x1". Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x += "x"; +if (x !== "1x") { + $ERROR('#6: x = "1"; x += "x"; x === "1x". Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.1.js new file mode 100644 index 000000000..b26a00f80 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.1.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x += y is the same as x = x + y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T2.1.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x += 1; +if (x !== 2) { + $ERROR('#1: x = true; x += 1; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x += true; +if (x !== 2) { + $ERROR('#2: x = 1; x += true; x === 2. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x += 1; +if (x !== 2) { + $ERROR('#3: x = new Boolean(true); x += 1; x === 2. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x += new Boolean(true); +if (x !== 2) { + $ERROR('#4: x = 1; x += new Boolean(true); x === 2. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x += new Number(1); +if (x !== 2) { + $ERROR('#5: x = true; x += new Number(1); x === 2. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x += true; +if (x !== 2) { + $ERROR('#6: x = new Number(1); x += true; x === 2. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x += new Number(1); +if (x !== 2) { + $ERROR('#7: x = new Boolean(true); x += new Number(1); x === 2. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x += new Boolean(true); +if (x !== 2) { + $ERROR('#8: x = new Number(1); x += new Boolean(true); x === 2. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.2.js new file mode 100644 index 000000000..73b6923bf --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.2.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x += y is the same as x = x + y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T2.2.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null + */ + +//CHECK#1 +x = 1; +x += null; +if (x !== 1) { + $ERROR('#1: x = 1; x += null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x += 1; +if (x !== 1) { + $ERROR('#2: x = null; x += 1; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x += null; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x += null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x += new Number(1); +if (x !== 1) { + $ERROR('#4: x = null; x += new Number(1); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.3.js new file mode 100644 index 000000000..158d2aa24 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.3.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x += y is the same as x = x + y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T2.3.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined + */ + +//CHECK#1 +x = 1; +x += undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = 1; x += undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x += 1; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x += 1; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x += undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Number(1); x += undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x += new Number(1); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x += new Number(1); x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.4.js new file mode 100644 index 000000000..f54e30a45 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x += y is the same as x = x + y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T2.4.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined + */ + +//CHECK#1 +x = true; +x += undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = true; x += undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x += true; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x += true; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x += undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Boolean(true); x += undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x += new Boolean(true); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x += new Boolean(true); x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.5.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.5.js new file mode 100644 index 000000000..b020ca563 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.5.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x += y is the same as x = x + y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T2.5.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null + */ + +//CHECK#1 +x = true; +x += null; +if (x !== 1) { + $ERROR('#1: x = true; x += null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x += true; +if (x !== 1) { + $ERROR('#2: x = null; x += true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x += null; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x += null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x += new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = null; x += new Boolean(true); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.6.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.6.js new file mode 100644 index 000000000..7833c0ce9 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.6.js @@ -0,0 +1,78 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x += y is the same as x = x + y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T2.6.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) + */ + +//CHECK#1 +x = "1"; +x += 1; +if (x !== "11") { + $ERROR('#1: x = "1"; x += 1; x === "11". Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x += "1"; +if (x !== "11") { + $ERROR('#2: x = 1; x += "1"; x === "11". Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x += 1; +if (x !== "11") { + $ERROR('#3: x = new String("1"); x += 1; x === "11". Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x += new String("1"); +if (x !== "11") { + $ERROR('#4: x = 1; x += new String("1"); x === "11". Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x += new Number(1); +if (x !== "11") { + $ERROR('#5: x = "1"; x += new Number(1); x === "11". Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x += "1"; +if (x !== "11") { + $ERROR('#6: x = new Number(1); x += "1"; x === "11". Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x += new Number(1); +if (x !== "11") { + $ERROR('#7: x = new String("1"); x += new Number(1); x === "11". Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x += new String("1"); +if (x !== "11") { + $ERROR('#8: x = new Number(1); x += new String("1"); x === "11". Actual: ' + (x)); +} + +//CHECK#9 +if ("x" + 1 !=="x1") { + $ERROR('#9: x = "x"; x += 1; x === "x1". Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x += "x"; +if (x !== "1x") { + $ERROR('#10: x = 1; x += "x"; x === "1x". Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.7.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.7.js new file mode 100644 index 000000000..2d80cf750 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.7.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x += y is the same as x = x + y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T2.7.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x += "1"; +if (x !== "true1") { + $ERROR('#1: x = true; x += "1"; x === "true1". Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x += true; +if (x !== "1true") { + $ERROR('#2: x = "1"; x += true; x === "1true". Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x += "1"; +if (x !== "true1") { + $ERROR('#3: x = new Boolean(true); x += "1"; x === "true1". Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x += new Boolean(true); +if (x !== "1true") { + $ERROR('#4: x = "1"; x += new Boolean(true); x === "1true". Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x += new String("1"); +if (x !== "true1") { + $ERROR('#5: x = true; x += new String("1"); x === "true1". Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x += true; +if (x !== "1true") { + $ERROR('#6: x = new String("1"); x += true; x === "1true". Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x += new String("1"); +if (x !== "true1") { + $ERROR('#7: x = new Boolean(true); x += new String("1"); x === "true1". Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x += new Boolean(true); +if (x !== "1true") { + $ERROR('#8: x = new String("1"); x += new Boolean(true); x === "1true". Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.8.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.8.js new file mode 100644 index 000000000..c5f364c15 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.8.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x += y is the same as x = x + y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T2.8.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined + */ + +//CHECK#1 +x = "1"; +x += undefined; +if (x !== "1undefined") { + $ERROR('#1: x = "1"; x += undefined; x === "1undefined". Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x += "1"; +if (x !== "undefined1") { + $ERROR('#2: x = undefined; x += "1"; x === "undefined1". Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x += undefined; +if (x !== "1undefined") { + $ERROR('#3: x = new String("1"); x += undefined; x === "1undefined". Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x += new String("1"); +if (x !== "undefined1") { + $ERROR('#4: x = undefined; x += new String("1"); x === "undefined1". Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.9.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.9.js new file mode 100644 index 000000000..f2a986ab8 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.4_T2.9.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x += y is the same as x = x + y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.4_T2.9.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null + */ + +//CHECK#1 +x = "1"; +x += null; +if (x !== "1null") { + $ERROR('#1: x = "1"; x += null; x === "1null". Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x += "1"; +if (x !== "null1") { + $ERROR('#2: x = null; x += "1"; x === "null1". Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x += null; +if (x !== "1null") { + $ERROR('#3: x = new String("1"); x += null; x === "1null". Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x += new String("1"); +if (x !== "null1") { + $ERROR('#4: x = null; x += new String("1"); x === "null1". Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.1.js new file mode 100644 index 000000000..1a155d3da --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.1.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x -= y is the same as x = x - y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T1.1.js + * @description Type(x) and Type(y) vary between primitive boolean and Boolean object + */ + +//CHECK#1 +x = true; +x -= true; +if (x !== 0) { + $ERROR('#1: x = true; x -= true; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x -= true; +if (x !== 0) { + $ERROR('#2: x = new Boolean(true); x -= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x -= new Boolean(true); +if (x !== 0) { + $ERROR('#3: x = true; x -= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x -= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = new Boolean(true); x -= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.2.js new file mode 100644 index 000000000..42d5abdb7 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.2.js @@ -0,0 +1,39 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x -= y is the same as x = x - y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T1.2.js + * @description Type(x) and Type(y) vary between primitive number and Number object + */ + +//CHECK#1 +x = 1; +x -= 1; +if (x !== 0) { + $ERROR('#1: x = 1; x -= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x -= 1; +if (x !== 0) { + $ERROR('#2: x = new Number(1); x -= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x -= new Number(1); +if (x !== 0) { + $ERROR('#3: x = 1; x -= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x -= new Number(1); +if (x !== 0) { + $ERROR('#4: x = new Number(1); x -= new Number(1); x === 0. Actual: ' + (x)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.3.js new file mode 100644 index 000000000..298948f61 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.3.js @@ -0,0 +1,52 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x -= y is the same as x = x - y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T1.3.js + * @description Type(x) and Type(y) vary between primitive string and String object + */ + +//CHECK#1 +x = "1"; +x -= "1"; +if (x !== 0) { + $ERROR('#1: x = "1"; x -= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x -= "1"; +if (x !== 0) { + $ERROR('#2: x = new String("1"); x -= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x -= new String("1"); +if (x !== 0) { + $ERROR('#3: x = "1"; x -= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x -= new String("1"); +if (x !== 0) { + $ERROR('#4: x = new String("1"); x -= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x -= "1"; +if (isNaN(x) !== true) { + $ERROR('#5: x = "x"; x -= "1"; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x -= "x"; +if (isNaN(x) !== true) { + $ERROR('#6: x = "1"; x -= "x"; x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.4.js new file mode 100644 index 000000000..28a9d2d76 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T1.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x -= y is the same as x = x - y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T1.4.js + * @description Type(x) and Type(y) vary between Null and Undefined + */ + +//CHECK#1 +x = null; +x -= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = null; x -= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x -= null; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x -= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x -= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = undefined; x -= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x -= null; +if (x !== 0) { + $ERROR('#4: x = null; x -= null; x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.1.js new file mode 100644 index 000000000..94b810cbc --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.1.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x -= y is the same as x = x - y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T2.1.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x -= 1; +if (x !== 0) { + $ERROR('#1: x = true; x -= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x -= true; +if (x !== 0) { + $ERROR('#2: x = 1; x -= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x -= 1; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x -= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x -= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = 1; x -= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x -= new Number(1); +if (x !== 0) { + $ERROR('#5: x = true; x -= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x -= true; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x -= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x -= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x -= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x -= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x -= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.2.js new file mode 100644 index 000000000..e71788b75 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.2.js @@ -0,0 +1,80 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x -= y is the same as x = x - y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T2.2.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) + */ + +//CHECK#1 +x = "1"; +x -= 1; +if (x !== 0) { + $ERROR('#1: x = "1"; x -= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x -= "1"; +if (x !== 0) { + $ERROR('#2: x = 1; x -= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x -= 1; +if (x !== 0) { + $ERROR('#3: x = new String("1"); x -= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x -= new String("1"); +if (x !== 0) { + $ERROR('#4: x = 1; x -= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x -= new Number(1); +if (x !== 0) { + $ERROR('#5: x = "1"; x -= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x -= "1"; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x -= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x -= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new String("1"); x -= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x -= new String("1"); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x -= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x -= 1; +if (isNaN(x) !== true) { + $ERROR('#9: x = "x"; x -= 1; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x -= "x"; +if (isNaN(x) !== true) { + $ERROR('#10: x = 1; x -= "x"; x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.3.js new file mode 100644 index 000000000..f7385f53f --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.3.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x -= y is the same as x = x - y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T2.3.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null + */ + +//CHECK#1 +x = 1; +x -= null; +if (x !== 1) { + $ERROR('#1: x = 1; x -= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x -= 1; +if (x !== -1) { + $ERROR('#2: x = null; x -= 1; x === -1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x -= null; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x -= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x -= new Number(1); +if (x !== -1) { + $ERROR('#4: x = null; x -= new Number(1); x === -1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.4.js new file mode 100644 index 000000000..0c1c5375f --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x -= y is the same as x = x - y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T2.4.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined + */ + +//CHECK#1 +x = 1; +x -= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = 1; x -= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x -= 1; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x -= 1; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x -= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Number(1); x -= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x -= new Number(1); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x -= new Number(1); x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.5.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.5.js new file mode 100644 index 000000000..c6c26409c --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.5.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x -= y is the same as x = x - y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T2.5.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x -= "1"; +if (x !== 0) { + $ERROR('#1: x = true; x -= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x -= true; +if (x !== 0) { + $ERROR('#2: x = "1"; x -= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x -= "1"; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x -= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x -= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = "1"; x -= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x -= new String("1"); +if (x !== 0) { + $ERROR('#5: x = true; x -= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x -= true; +if (x !== 0) { + $ERROR('#6: x = new String("1"); x -= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x -= new String("1"); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x -= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x -= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new String("1"); x -= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.6.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.6.js new file mode 100644 index 000000000..39b17aeeb --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.6.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x -= y is the same as x = x - y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T2.6.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined + */ + +//CHECK#1 +x = "1"; +x -= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = "1"; x -= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x -= "1"; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x -= "1"; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x -= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new String("1"); x -= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x -= new String("1"); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x -= new String("1"); x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.7.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.7.js new file mode 100644 index 000000000..b6d0cc0a8 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.7.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x -= y is the same as x = x - y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T2.7.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null + */ + +//CHECK#1 +x = "1"; +x -= null; +if (x !== 1) { + $ERROR('#1: x = "1"; x -= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x -= "1"; +if (x !== -1) { + $ERROR('#2: x = null; x -= "1"; x === -1. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x -= null; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x -= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x -= new String("1"); +if (x !== -1) { + $ERROR('#4: x = null; x -= new String("1"); x === -1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.8.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.8.js new file mode 100644 index 000000000..61c68cfa3 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.8.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x -= y is the same as x = x - y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T2.8.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined + */ + +//CHECK#1 +x = true; +x -= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = true; x -= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x -= true; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x -= true; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x -= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Boolean(true); x -= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x -= new Boolean(true); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x -= new Boolean(true); x === Not-a-Number. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.9.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.9.js new file mode 100644 index 000000000..4881e2d8b --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.5_T2.9.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x -= y is the same as x = x - y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.5_T2.9.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null + */ + +//CHECK#1 +x = true; +x -= null; +if (x !== 1) { + $ERROR('#1: x = true; x -= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x -= true; +if (x !== -1) { + $ERROR('#2: x = null; x -= true; x === -1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x -= null; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x -= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x -= new Boolean(true); +if (x !== -1) { + $ERROR('#4: x = null; x -= new Boolean(true); x === -1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.1.js new file mode 100644 index 000000000..d4b6680cf --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.1.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x <<= y is the same as x = x << y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T1.1.js + * @description Type(x) and Type(y) vary between primitive boolean and Boolean object + */ + +//CHECK#1 +x = true; +x <<= true; +if (x !== 2) { + $ERROR('#1: x = true; x <<= true; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x <<= true; +if (x !== 2) { + $ERROR('#2: x = new Boolean(true); x <<= true; x === 2. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x <<= new Boolean(true); +if (x !== 2) { + $ERROR('#3: x = true; x <<= new Boolean(true); x === 2. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x <<= new Boolean(true); +if (x !== 2) { + $ERROR('#4: x = new Boolean(true); x <<= new Boolean(true); x === 2. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.2.js new file mode 100644 index 000000000..63493abb6 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.2.js @@ -0,0 +1,39 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x <<= y is the same as x = x << y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T1.2.js + * @description Type(x) and Type(y) vary between primitive number and Number object + */ + +//CHECK#1 +x = 1; +x <<= 1; +if (x !== 2) { + $ERROR('#1: x = 1; x <<= 1; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x <<= 1; +if (x !== 2) { + $ERROR('#2: x = new Number(1); x <<= 1; x === 2. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x <<= new Number(1); +if (x !== 2) { + $ERROR('#3: x = 1; x <<= new Number(1); x === 2. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x <<= new Number(1); +if (x !== 2) { + $ERROR('#4: x = new Number(1); x <<= new Number(1); x === 2. Actual: ' + (x)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.3.js new file mode 100644 index 000000000..8a31b37ed --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.3.js @@ -0,0 +1,52 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x <<= y is the same as x = x << y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T1.3.js + * @description Type(x) and Type(y) vary between primitive string and String object + */ + +//CHECK#1 +x = "1"; +x <<= "1"; +if (x !== 2) { + $ERROR('#1: x = "1"; x <<= "1"; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x <<= "1"; +if (x !== 2) { + $ERROR('#2: x = new String("1"); x <<= "1"; x === 2. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x <<= new String("1"); +if (x !== 2) { + $ERROR('#3: x = "1"; x <<= new String("1"); x === 2. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x <<= new String("1"); +if (x !== 2) { + $ERROR('#4: x = new String("1"); x <<= new String("1"); x === 2. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x <<= "1"; +if (x !== 0) { + $ERROR('#5: x = "x"; x <<= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x <<= "x"; +if (x !== 1) { + $ERROR('#6: x = "1"; x <<= "x"; x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.4.js new file mode 100644 index 000000000..1c1a81781 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T1.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x <<= y is the same as x = x << y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T1.4.js + * @description Type(x) and Type(y) vary between Null and Undefined + */ + +//CHECK#1 +x = null; +x <<= undefined; +if (x !== 0) { + $ERROR('#1: x = null; x <<= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x <<= null; +if (x !== 0) { + $ERROR('#2: x = undefined; x <<= null; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x <<= undefined; +if (x !== 0) { + $ERROR('#3: x = undefined; x <<= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x <<= null; +if (x !== 0) { + $ERROR('#4: x = null; x <<= null; x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.1.js new file mode 100644 index 000000000..9348c745e --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.1.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x <<= y is the same as x = x << y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T2.1.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x <<= 1; +if (x !== 2) { + $ERROR('#1: x = true; x <<= 1; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x <<= true; +if (x !== 2) { + $ERROR('#2: x = 1; x <<= true; x === 2. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x <<= 1; +if (x !== 2) { + $ERROR('#3: x = new Boolean(true); x <<= 1; x === 2. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x <<= new Boolean(true); +if (x !== 2) { + $ERROR('#4: x = 1; x <<= new Boolean(true); x === 2. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x <<= new Number(1); +if (x !== 2) { + $ERROR('#5: x = true; x <<= new Number(1); x === 2. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x <<= true; +if (x !== 2) { + $ERROR('#6: x = new Number(1); x <<= true; x === 2. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x <<= new Number(1); +if (x !== 2) { + $ERROR('#7: x = new Boolean(true); x <<= new Number(1); x === 2. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x <<= new Boolean(true); +if (x !== 2) { + $ERROR('#8: x = new Number(1); x <<= new Boolean(true); x === 2. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.2.js new file mode 100644 index 000000000..2cd913d8e --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.2.js @@ -0,0 +1,80 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x <<= y is the same as x = x << y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T2.2.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) + */ + +//CHECK#1 +x = "1"; +x <<= 1; +if (x !== 2) { + $ERROR('#1: x = "1"; x <<= 1; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x <<= "1"; +if (x !== 2) { + $ERROR('#2: x = 1; x <<= "1"; x === 2. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x <<= 1; +if (x !== 2) { + $ERROR('#3: x = new String("1"); x <<= 1; x === 2. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x <<= new String("1"); +if (x !== 2) { + $ERROR('#4: x = 1; x <<= new String("1"); x === 2. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x <<= new Number(1); +if (x !== 2) { + $ERROR('#5: x = "1"; x <<= new Number(1); x === 2. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x <<= "1"; +if (x !== 2) { + $ERROR('#6: x = new Number(1); x <<= "1"; x === 2. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x <<= new Number(1); +if (x !== 2) { + $ERROR('#7: x = new String("1"); x <<= new Number(1); x === 2. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x <<= new String("1"); +if (x !== 2) { + $ERROR('#8: x = new Number(1); x <<= new String("1"); x === 2. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x <<= 1; +if (x !== 0) { + $ERROR('#9: x = "x"; x <<= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x <<= "x"; +if (x !== 1) { + $ERROR('#10: x = 1; x <<= "x"; x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.3.js new file mode 100644 index 000000000..6040e1de8 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.3.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x <<= y is the same as x = x << y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T2.3.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null + */ + +//CHECK#1 +x = 1; +x <<= null; +if (x !== 1) { + $ERROR('#1: x = 1; x <<= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x <<= 1; +if (x !== 0) { + $ERROR('#2: x = null; x <<= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x <<= null; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x <<= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x <<= new Number(1); +if (x !== 0) { + $ERROR('#4: x = null; x <<= new Number(1); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.4.js new file mode 100644 index 000000000..1eee51320 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x <<= y is the same as x = x << y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T2.4.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined + */ + +//CHECK#1 +x = 1; +x <<= undefined; +if (x !== 1) { + $ERROR('#1: x = 1; x <<= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x <<= 1; +if (x !== 0) { + $ERROR('#2: x = undefined; x <<= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x <<= undefined; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x <<= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x <<= new Number(1); +if (x !== 0) { + $ERROR('#4: x = undefined; x <<= new Number(1); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.5.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.5.js new file mode 100644 index 000000000..7616e4e7c --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.5.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x <<= y is the same as x = x << y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T2.5.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x <<= "1"; +if (x !== 2) { + $ERROR('#1: x = true; x <<= "1"; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x <<= true; +if (x !== 2) { + $ERROR('#2: x = "1"; x <<= true; x === 2. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x <<= "1"; +if (x !== 2) { + $ERROR('#3: x = new Boolean(true); x <<= "1"; x === 2. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x <<= new Boolean(true); +if (x !== 2) { + $ERROR('#4: x = "1"; x <<= new Boolean(true); x === 2. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x <<= new String("1"); +if (x !== 2) { + $ERROR('#5: x = true; x <<= new String("1"); x === 2. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x <<= true; +if (x !== 2) { + $ERROR('#6: x = new String("1"); x <<= true; x === 2. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x <<= new String("1"); +if (x !== 2) { + $ERROR('#7: x = new Boolean(true); x <<= new String("1"); x === 2. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x <<= new Boolean(true); +if (x !== 2) { + $ERROR('#8: x = new String("1"); x <<= new Boolean(true); x === 2. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.6.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.6.js new file mode 100644 index 000000000..6fbf4f4f2 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.6.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x <<= y is the same as x = x << y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T2.6.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined + */ + +//CHECK#1 +x = "1"; +x <<= undefined; +if (x !== 1) { + $ERROR('#1: x = "1"; x <<= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x <<= "1"; +if (x !== 0) { + $ERROR('#2: x = undefined; x <<= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x <<= undefined; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x <<= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x <<= new String("1"); +if (x !== 0) { + $ERROR('#4: x = undefined; x <<= new String("1"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.7.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.7.js new file mode 100644 index 000000000..ce324f83a --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.7.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x <<= y is the same as x = x << y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T2.7.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null + */ + +//CHECK#1 +x = "1"; +x <<= null; +if (x !== 1) { + $ERROR('#1: x = "1"; x <<= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x <<= "1"; +if (x !== 0) { + $ERROR('#2: x = null; x <<= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x <<= null; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x <<= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x <<= new String("1"); +if (x !== 0) { + $ERROR('#4: x = null; x <<= new String("1"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.8.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.8.js new file mode 100644 index 000000000..606ae17bc --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.8.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x <<= y is the same as x = x << y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T2.8.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined + */ + +//CHECK#1 +x = true; +x <<= undefined; +if (x !== 1) { + $ERROR('#1: x = true; x <<= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x <<= true; +if (x !== 0) { + $ERROR('#2: x = undefined; x <<= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x <<= undefined; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x <<= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x <<= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = undefined; x <<= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.9.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.9.js new file mode 100644 index 000000000..2b0820a85 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.6_T2.9.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x <<= y is the same as x = x << y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.6_T2.9.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null + */ + +//CHECK#1 +x = true; +x <<= null; +if (x !== 1) { + $ERROR('#1: x = true; x <<= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x <<= true; +if (x !== 0) { + $ERROR('#2: x = null; x <<= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x <<= null; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x <<= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x <<= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = null; x <<= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.1.js new file mode 100644 index 000000000..aeb328d7c --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.1.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>= y is the same as x = x >> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T1.1.js + * @description Type(x) and Type(y) vary between primitive boolean and Boolean object + */ + +//CHECK#1 +x = true; +x >>= true; +if (x !== 0) { + $ERROR('#1: x = true; x >>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x >>= true; +if (x !== 0) { + $ERROR('#2: x = new Boolean(true); x >>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x >>= new Boolean(true); +if (x !== 0) { + $ERROR('#3: x = true; x >>= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x >>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = new Boolean(true); x >>= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.2.js new file mode 100644 index 000000000..dc83e1ad0 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.2.js @@ -0,0 +1,39 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>= y is the same as x = x >> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T1.2.js + * @description Type(x) and Type(y) vary between primitive number and Number object + */ + +//CHECK#1 +x = 1; +x >>= 1; +if (x !== 0) { + $ERROR('#1: x = 1; x >>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x >>= 1; +if (x !== 0) { + $ERROR('#2: x = new Number(1); x >>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x >>= new Number(1); +if (x !== 0) { + $ERROR('#3: x = 1; x >>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x >>= new Number(1); +if (x !== 0) { + $ERROR('#4: x = new Number(1); x >>= new Number(1); x === 0. Actual: ' + (x)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.3.js new file mode 100644 index 000000000..9513cf37d --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.3.js @@ -0,0 +1,52 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>= y is the same as x = x >> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T1.3.js + * @description Type(x) and Type(y) vary between primitive string and String object + */ + +//CHECK#1 +x = "1"; +x >>= "1"; +if (x !== 0) { + $ERROR('#1: x = "1"; x >>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x >>= "1"; +if (x !== 0) { + $ERROR('#2: x = new String("1"); x >>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x >>= new String("1"); +if (x !== 0) { + $ERROR('#3: x = "1"; x >>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x >>= new String("1"); +if (x !== 0) { + $ERROR('#4: x = new String("1"); x >>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x >>= "1"; +if (x !== 0) { + $ERROR('#5: x = "x"; x >>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x >>= "x"; +if (x !== 1) { + $ERROR('#6: x = "1"; x >>= "x"; x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.4.js new file mode 100644 index 000000000..7195a5e44 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T1.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>= y is the same as x = x >> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T1.4.js + * @description Type(x) and Type(y) vary between Null and Undefined + */ + +//CHECK#1 +x = null; +x >>= undefined; +if (x !== 0) { + $ERROR('#1: x = null; x >>= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x >>= null; +if (x !== 0) { + $ERROR('#2: x = undefined; x >>= null; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x >>= undefined; +if (x !== 0) { + $ERROR('#3: x = undefined; x >>= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x >>= null; +if (x !== 0) { + $ERROR('#4: x = null; x >>= null; x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.1.js new file mode 100644 index 000000000..8fa6a383c --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.1.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>= y is the same as x = x >> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T2.1.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x >>= 1; +if (x !== 0) { + $ERROR('#1: x = true; x >>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x >>= true; +if (x !== 0) { + $ERROR('#2: x = 1; x >>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x >>= 1; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x >>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x >>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = 1; x >>= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x >>= new Number(1); +if (x !== 0) { + $ERROR('#5: x = true; x >>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x >>= true; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x >>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x >>= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x >>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x >>= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x >>= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.2.js new file mode 100644 index 000000000..87e69c0aa --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.2.js @@ -0,0 +1,80 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>= y is the same as x = x >> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T2.2.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) + */ + +//CHECK#1 +x = "1"; +x >>= 1; +if (x !== 0) { + $ERROR('#1: x = "1"; x >>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x >>= "1"; +if (x !== 0) { + $ERROR('#2: x = 1; x >>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x >>= 1; +if (x !== 0) { + $ERROR('#3: x = new String("1"); x >>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x >>= new String("1"); +if (x !== 0) { + $ERROR('#4: x = 1; x >>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x >>= new Number(1); +if (x !== 0) { + $ERROR('#5: x = "1"; x >>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x >>= "1"; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x >>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x >>= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new String("1"); x >>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x >>= new String("1"); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x >>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x >>= 1; +if (x !== 0) { + $ERROR('#9: x = "x"; x >>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x >>= "x"; +if (x !== 1) { + $ERROR('#10: x = 1; x >>= "x"; x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.3.js new file mode 100644 index 000000000..0cf56fb53 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.3.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>= y is the same as x = x >> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T2.3.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null + */ + +//CHECK#1 +x = 1; +x >>= null; +if (x !== 1) { + $ERROR('#1: x = 1; x >>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x >>= 1; +if (x !== 0) { + $ERROR('#2: x = null; x >>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x >>= null; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x >>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x >>= new Number(1); +if (x !== 0) { + $ERROR('#4: x = null; x >>= new Number(1); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.4.js new file mode 100644 index 000000000..f9ad58a30 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>= y is the same as x = x >> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T2.4.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined + */ + +//CHECK#1 +x = 1; +x >>= undefined; +if (x !== 1) { + $ERROR('#1: x = 1; x >>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x >>= 1; +if (x !== 0) { + $ERROR('#2: x = undefined; x >>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x >>= undefined; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x >>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x >>= new Number(1); +if (x !== 0) { + $ERROR('#4: x = undefined; x >>= new Number(1); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.5.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.5.js new file mode 100644 index 000000000..bdc8b729f --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.5.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>= y is the same as x = x >> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T2.5.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x >>= "1"; +if (x !== 0) { + $ERROR('#1: x = true; x >>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x >>= true; +if (x !== 0) { + $ERROR('#2: x = "1"; x >>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x >>= "1"; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x >>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x >>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = "1"; x >>= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x >>= new String("1"); +if (x !== 0) { + $ERROR('#5: x = true; x >>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x >>= true; +if (x !== 0) { + $ERROR('#6: x = new String("1"); x >>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x >>= new String("1"); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x >>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x >>= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new String("1"); x >>= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.6.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.6.js new file mode 100644 index 000000000..970a3540b --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.6.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>= y is the same as x = x >> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T2.6.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined + */ + +//CHECK#1 +x = "1"; +x >>= undefined; +if (x !== 1) { + $ERROR('#1: x = "1"; x >>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x >>= "1"; +if (x !== 0) { + $ERROR('#2: x = undefined; x >>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x >>= undefined; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x >>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x >>= new String("1"); +if (x !== 0) { + $ERROR('#4: x = undefined; x >>= new String("1"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.7.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.7.js new file mode 100644 index 000000000..7720b5512 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.7.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>= y is the same as x = x >> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T2.7.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null + */ + +//CHECK#1 +x = "1"; +x >>= null; +if (x !== 1) { + $ERROR('#1: x = "1"; x >>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x >>= "1"; +if (x !== 0) { + $ERROR('#2: x = null; x >>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x >>= null; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x >>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x >>= new String("1"); +if (x !== 0) { + $ERROR('#4: x = null; x >>= new String("1"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.8.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.8.js new file mode 100644 index 000000000..05a4415a1 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.8.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>= y is the same as x = x >> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T2.8.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined + */ + +//CHECK#1 +x = true; +x >>= undefined; +if (x !== 1) { + $ERROR('#1: x = true; x >>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x >>= true; +if (x !== 0) { + $ERROR('#2: x = undefined; x >>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x >>= undefined; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x >>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x >>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = undefined; x >>= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.9.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.9.js new file mode 100644 index 000000000..ddfdbfc64 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.7_T2.9.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>= y is the same as x = x >> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.7_T2.9.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null + */ + +//CHECK#1 +x = true; +x >>= null; +if (x !== 1) { + $ERROR('#1: x = true; x >>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x >>= true; +if (x !== 0) { + $ERROR('#2: x = null; x >>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x >>= null; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x >>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x >>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = null; x >>= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.1.js new file mode 100644 index 000000000..0b2e033dc --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.1.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>>= y is the same as x = x >>> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T1.1.js + * @description Type(x) and Type(y) vary between primitive boolean and Boolean object + */ + +//CHECK#1 +x = true; +x >>>= true; +if (x !== 0) { + $ERROR('#1: x = true; x >>>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x >>>= true; +if (x !== 0) { + $ERROR('#2: x = new Boolean(true); x >>>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x >>>= new Boolean(true); +if (x !== 0) { + $ERROR('#3: x = true; x >>>= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x >>>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = new Boolean(true); x >>>= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.2.js new file mode 100644 index 000000000..64cb86684 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.2.js @@ -0,0 +1,39 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>>= y is the same as x = x >>> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T1.2.js + * @description Type(x) and Type(y) vary between primitive number and Number object + */ + +//CHECK#1 +x = 1; +x >>>= 1; +if (x !== 0) { + $ERROR('#1: x = 1; x >>>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x >>>= 1; +if (x !== 0) { + $ERROR('#2: x = new Number(1); x >>>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x >>>= new Number(1); +if (x !== 0) { + $ERROR('#3: x = 1; x >>>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x >>>= new Number(1); +if (x !== 0) { + $ERROR('#4: x = new Number(1); x >>>= new Number(1); x === 0. Actual: ' + (x)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.3.js new file mode 100644 index 000000000..47f197886 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.3.js @@ -0,0 +1,52 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>>= y is the same as x = x >>> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T1.3.js + * @description Type(x) and Type(y) vary between primitive string and String object + */ + +//CHECK#1 +x = "1"; +x >>>= "1"; +if (x !== 0) { + $ERROR('#1: x = "1"; x >>>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x >>>= "1"; +if (x !== 0) { + $ERROR('#2: x = new String("1"); x >>>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x >>>= new String("1"); +if (x !== 0) { + $ERROR('#3: x = "1"; x >>>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x >>>= new String("1"); +if (x !== 0) { + $ERROR('#4: x = new String("1"); x >>>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x >>>= "1"; +if (x !== 0) { + $ERROR('#5: x = "x"; x >>>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x >>>= "x"; +if (x !== 1) { + $ERROR('#6: x = "1"; x >>>= "x"; x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.4.js new file mode 100644 index 000000000..6464ffa82 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T1.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>>= y is the same as x = x >>> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T1.4.js + * @description Type(x) and Type(y) vary between Null and Undefined + */ + +//CHECK#1 +x = null; +x >>>= undefined; +if (x !== 0) { + $ERROR('#1: x = null; x >>>= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x >>>= null; +if (x !== 0) { + $ERROR('#2: x = undefined; x >>>= null; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x >>>= undefined; +if (x !== 0) { + $ERROR('#3: x = undefined; x >>>= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x >>>= null; +if (x !== 0) { + $ERROR('#4: x = null; x >>>= null; x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.1.js new file mode 100644 index 000000000..f610d8278 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.1.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>>= y is the same as x = x >>> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T2.1.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x >>>= 1; +if (x !== 0) { + $ERROR('#1: x = true; x >>>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x >>>= true; +if (x !== 0) { + $ERROR('#2: x = 1; x >>>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x >>>= 1; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x >>>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x >>>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = 1; x >>>= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x >>>= new Number(1); +if (x !== 0) { + $ERROR('#5: x = true; x >>>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x >>>= true; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x >>>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x >>>= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x >>>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x >>>= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x >>>= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.2.js new file mode 100644 index 000000000..9a1d719fe --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.2.js @@ -0,0 +1,80 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>>= y is the same as x = x >>> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T2.2.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) + */ + +//CHECK#1 +x = "1"; +x >>>= 1; +if (x !== 0) { + $ERROR('#1: x = "1"; x >>>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x >>>= "1"; +if (x !== 0) { + $ERROR('#2: x = 1; x >>>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x >>>= 1; +if (x !== 0) { + $ERROR('#3: x = new String("1"); x >>>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x >>>= new String("1"); +if (x !== 0) { + $ERROR('#4: x = 1; x >>>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x >>>= new Number(1); +if (x !== 0) { + $ERROR('#5: x = "1"; x >>>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x >>>= "1"; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x >>>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x >>>= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new String("1"); x >>>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x >>>= new String("1"); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x >>>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x >>>= 1; +if (x !== 0) { + $ERROR('#9: x = "x"; x >>>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x >>>= "x"; +if (x !== 1) { + $ERROR('#10: x = 1; x >>>= "x"; x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.3.js new file mode 100644 index 000000000..bf809a272 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.3.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>>= y is the same as x = x >>> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T2.3.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null + */ + +//CHECK#1 +x = 1; +x >>>= null; +if (x !== 1) { + $ERROR('#1: x = 1; x >>>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x >>>= 1; +if (x !== 0) { + $ERROR('#2: x = null; x >>>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x >>>= null; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x >>>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x >>>= new Number(1); +if (x !== 0) { + $ERROR('#4: x = null; x >>>= new Number(1); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.4.js new file mode 100644 index 000000000..4e034735f --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>>= y is the same as x = x >>> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T2.4.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined + */ + +//CHECK#1 +x = 1; +x >>>= undefined; +if (x !== 1) { + $ERROR('#1: x = 1; x >>>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x >>>= 1; +if (x !== 0) { + $ERROR('#2: x = undefined; x >>>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x >>>= undefined; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x >>>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x >>>= new Number(1); +if (x !== 0) { + $ERROR('#4: x = undefined; x >>>= new Number(1); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.5.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.5.js new file mode 100644 index 000000000..cf319f71d --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.5.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>>= y is the same as x = x >>> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T2.5.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x >>>= "1"; +if (x !== 0) { + $ERROR('#1: x = true; x >>>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x >>>= true; +if (x !== 0) { + $ERROR('#2: x = "1"; x >>>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x >>>= "1"; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x >>>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x >>>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = "1"; x >>>= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x >>>= new String("1"); +if (x !== 0) { + $ERROR('#5: x = true; x >>>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x >>>= true; +if (x !== 0) { + $ERROR('#6: x = new String("1"); x >>>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x >>>= new String("1"); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x >>>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x >>>= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new String("1"); x >>>= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.6.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.6.js new file mode 100644 index 000000000..d73b02dd2 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.6.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>>= y is the same as x = x >>> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T2.6.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined + */ + +//CHECK#1 +x = "1"; +x >>>= undefined; +if (x !== 1) { + $ERROR('#1: x = "1"; x >>>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x >>>= "1"; +if (x !== 0) { + $ERROR('#2: x = undefined; x >>>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x >>>= undefined; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x >>>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x >>>= new String("1"); +if (x !== 0) { + $ERROR('#4: x = undefined; x >>>= new String("1"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.7.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.7.js new file mode 100644 index 000000000..b62931e6b --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.7.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>>= y is the same as x = x >>> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T2.7.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null + */ + +//CHECK#1 +x = "1"; +x >>>= null; +if (x !== 1) { + $ERROR('#1: x = "1"; x >>>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x >>>= "1"; +if (x !== 0) { + $ERROR('#2: x = null; x >>>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x >>>= null; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x >>>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x >>>= new String("1"); +if (x !== 0) { + $ERROR('#4: x = null; x >>>= new String("1"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.8.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.8.js new file mode 100644 index 000000000..a463cca10 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.8.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>>= y is the same as x = x >>> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T2.8.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined + */ + +//CHECK#1 +x = true; +x >>>= undefined; +if (x !== 1) { + $ERROR('#1: x = true; x >>>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x >>>= true; +if (x !== 0) { + $ERROR('#2: x = undefined; x >>>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x >>>= undefined; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x >>>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x >>>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = undefined; x >>>= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.9.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.9.js new file mode 100644 index 000000000..e055c7d2d --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.8_T2.9.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x >>>= y is the same as x = x >>> y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.8_T2.9.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null + */ + +//CHECK#1 +x = true; +x >>>= null; +if (x !== 1) { + $ERROR('#1: x = true; x >>>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x >>>= true; +if (x !== 0) { + $ERROR('#2: x = null; x >>>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x >>>= null; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x >>>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x >>>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = null; x >>>= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.1.js new file mode 100644 index 000000000..13be4e002 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.1.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x &= y is the same as x = x & y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T1.1.js + * @description Type(x) and Type(y) vary between primitive boolean and Boolean object + */ + +//CHECK#1 +x = true; +x &= true; +if (x !== 1) { + $ERROR('#1: x = true; x &= true; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x &= true; +if (x !== 1) { + $ERROR('#2: x = new Boolean(true); x &= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x &= new Boolean(true); +if (x !== 1) { + $ERROR('#3: x = true; x &= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x &= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = new Boolean(true); x &= new Boolean(true); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.2.js new file mode 100644 index 000000000..cc1eb514b --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.2.js @@ -0,0 +1,39 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x &= y is the same as x = x & y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T1.2.js + * @description Type(x) and Type(y) vary between primitive number and Number object + */ + +//CHECK#1 +x = 1; +x &= 1; +if (x !== 1) { + $ERROR('#1: x = 1; x &= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x &= 1; +if (x !== 1) { + $ERROR('#2: x = new Number(1); x &= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x &= new Number(1); +if (x !== 1) { + $ERROR('#3: x = 1; x &= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x &= new Number(1); +if (x !== 1) { + $ERROR('#4: x = new Number(1); x &= new Number(1); x === 1. Actual: ' + (x)); +} + + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.3.js new file mode 100644 index 000000000..e845b3c9d --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.3.js @@ -0,0 +1,52 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x &= y is the same as x = x & y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T1.3.js + * @description Type(x) and Type(y) vary between primitive string and String object + */ + +//CHECK#1 +x = "1"; +x &= "1"; +if (x !== 1) { + $ERROR('#1: x = "1"; x &= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x &= "1"; +if (x !== 1) { + $ERROR('#2: x = new String("1"); x &= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x &= new String("1"); +if (x !== 1) { + $ERROR('#3: x = "1"; x &= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x &= new String("1"); +if (x !== 1) { + $ERROR('#4: x = new String("1"); x &= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x &= "1"; +if (x !== 0) { + $ERROR('#5: x = "x"; x &= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x &= "x"; +if (x !== 0) { + $ERROR('#6: x = "1"; x &= "x"; x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.4.js new file mode 100644 index 000000000..dd93cbb91 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T1.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x &= y is the same as x = x & y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T1.4.js + * @description Type(x) and Type(y) vary between Null and Undefined + */ + +//CHECK#1 +x = null; +x &= undefined; +if (x !== 0) { + $ERROR('#1: x = null; x &= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x &= null; +if (x !== 0) { + $ERROR('#2: x = undefined; x &= null; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x &= undefined; +if (x !== 0) { + $ERROR('#3: x = undefined; x &= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x &= null; +if (x !== 0) { + $ERROR('#4: x = null; x &= null; x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.1.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.1.js new file mode 100644 index 000000000..05cd8f837 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.1.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x &= y is the same as x = x & y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.1.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x &= 1; +if (x !== 1) { + $ERROR('#1: x = true; x &= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x &= true; +if (x !== 1) { + $ERROR('#2: x = 1; x &= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x &= 1; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x &= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x &= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = 1; x &= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x &= new Number(1); +if (x !== 1) { + $ERROR('#5: x = true; x &= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x &= true; +if (x !== 1) { + $ERROR('#6: x = new Number(1); x &= true; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x &= new Number(1); +if (x !== 1) { + $ERROR('#7: x = new Boolean(true); x &= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x &= new Boolean(true); +if (x !== 1) { + $ERROR('#8: x = new Number(1); x &= new Boolean(true); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.2.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.2.js new file mode 100644 index 000000000..b394dd6e7 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.2.js @@ -0,0 +1,80 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x &= y is the same as x = x & y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.2.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object) + */ + +//CHECK#1 +x = "1"; +x &= 1; +if (x !== 1) { + $ERROR('#1: x = "1"; x &= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x &= "1"; +if (x !== 1) { + $ERROR('#2: x = 1; x &= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x &= 1; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x &= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x &= new String("1"); +if (x !== 1) { + $ERROR('#4: x = 1; x &= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x &= new Number(1); +if (x !== 1) { + $ERROR('#5: x = "1"; x &= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x &= "1"; +if (x !== 1) { + $ERROR('#6: x = new Number(1); x &= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x &= new Number(1); +if (x !== 1) { + $ERROR('#7: x = new String("1"); x &= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x &= new String("1"); +if (x !== 1) { + $ERROR('#8: x = new Number(1); x &= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x &= 1; +if (x !== 0) { + $ERROR('#9: x = "x"; x &= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x &= "x"; +if (x !== 0) { + $ERROR('#10: x = 1; x &= "x"; x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.3.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.3.js new file mode 100644 index 000000000..b4150a583 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.3.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x &= y is the same as x = x & y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.3.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null + */ + +//CHECK#1 +x = 1; +x &= null; +if (x !== 0) { + $ERROR('#1: x = 1; x &= null; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x &= 1; +if (x !== 0) { + $ERROR('#2: x = null; x &= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x &= null; +if (x !== 0) { + $ERROR('#3: x = new Number(1); x &= null; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x &= new Number(1); +if (x !== 0) { + $ERROR('#4: x = null; x &= new Number(1); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.4.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.4.js new file mode 100644 index 000000000..f7bb4d4d8 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x &= y is the same as x = x & y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.4.js + * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined + */ + +//CHECK#1 +x = 1; +x &= undefined; +if (x !== 0) { + $ERROR('#1: x = 1; x &= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x &= 1; +if (x !== 0) { + $ERROR('#2: x = undefined; x &= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x &= undefined; +if (x !== 0) { + $ERROR('#3: x = new Number(1); x &= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x &= new Number(1); +if (x !== 0) { + $ERROR('#4: x = undefined; x &= new Number(1); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.5.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.5.js new file mode 100644 index 000000000..a9ce33f78 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.5.js @@ -0,0 +1,66 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x &= y is the same as x = x & y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.5.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object) + */ + +//CHECK#1 +x = true; +x &= "1"; +if (x !== 1) { + $ERROR('#1: x = true; x &= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x &= true; +if (x !== 1) { + $ERROR('#2: x = "1"; x &= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x &= "1"; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x &= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x &= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = "1"; x &= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x &= new String("1"); +if (x !== 1) { + $ERROR('#5: x = true; x &= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x &= true; +if (x !== 1) { + $ERROR('#6: x = new String("1"); x &= true; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x &= new String("1"); +if (x !== 1) { + $ERROR('#7: x = new Boolean(true); x &= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x &= new Boolean(true); +if (x !== 1) { + $ERROR('#8: x = new String("1"); x &= new Boolean(true); x === 1. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.6.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.6.js new file mode 100644 index 000000000..2a62b9723 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.6.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x &= y is the same as x = x & y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.6.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined + */ + +//CHECK#1 +x = "1"; +x &= undefined; +if (x !== 0) { + $ERROR('#1: x = "1"; x &= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x &= "1"; +if (x !== 0) { + $ERROR('#2: x = undefined; x &= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x &= undefined; +if (x !== 0) { + $ERROR('#3: x = new String("1"); x &= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x &= new String("1"); +if (x !== 0) { + $ERROR('#4: x = undefined; x &= new String("1"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.7.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.7.js new file mode 100644 index 000000000..b9303bf5f --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.7.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x &= y is the same as x = x & y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.7.js + * @description Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null + */ + +//CHECK#1 +x = "1"; +x &= null; +if (x !== 0) { + $ERROR('#1: x = "1"; x &= null; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x &= "1"; +if (x !== 0) { + $ERROR('#2: x = null; x &= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x &= null; +if (x !== 0) { + $ERROR('#3: x = new String("1"); x &= null; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x &= new String("1"); +if (x !== 0) { + $ERROR('#4: x = null; x &= new String("1"); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.8.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.8.js new file mode 100644 index 000000000..0e4db1ffe --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.8.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x &= y is the same as x = x & y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.8.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined + */ + +//CHECK#1 +x = true; +x &= undefined; +if (x !== 0) { + $ERROR('#1: x = true; x &= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x &= true; +if (x !== 0) { + $ERROR('#2: x = undefined; x &= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x &= undefined; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x &= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x &= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = undefined; x &= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.9.js b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.9.js new file mode 100644 index 000000000..3e5a05304 --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.9_T2.9.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The production x &= y is the same as x = x & y + * + * @path ch11/11.13/11.13.2/S11.13.2_A4.9_T2.9.js + * @description Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null + */ + +//CHECK#1 +x = true; +x &= null; +if (x !== 0) { + $ERROR('#1: x = true; x &= null; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x &= true; +if (x !== 0) { + $ERROR('#2: x = null; x &= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x &= null; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x &= null; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x &= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = null; x &= new Boolean(true); x === 0. Actual: ' + (x)); +} + diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/browser.js b/js/src/tests/test262/ch11/11.13/11.13.2/browser.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/browser.js diff --git a/js/src/tests/test262/ch11/11.13/11.13.2/shell.js b/js/src/tests/test262/ch11/11.13/11.13.2/shell.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch11/11.13/11.13.2/shell.js |