summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/ch11/11.14
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /js/src/tests/test262/ch11/11.14
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-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.14')
-rw-r--r--js/src/tests/test262/ch11/11.14/S11.14_A1.js61
-rw-r--r--js/src/tests/test262/ch11/11.14/S11.14_A2.1_T1.js54
-rw-r--r--js/src/tests/test262/ch11/11.14/S11.14_A2.1_T2.js21
-rw-r--r--js/src/tests/test262/ch11/11.14/S11.14_A2.1_T3.js21
-rw-r--r--js/src/tests/test262/ch11/11.14/S11.14_A3.js38
-rw-r--r--js/src/tests/test262/ch11/11.14/browser.js0
-rw-r--r--js/src/tests/test262/ch11/11.14/shell.js0
7 files changed, 195 insertions, 0 deletions
diff --git a/js/src/tests/test262/ch11/11.14/S11.14_A1.js b/js/src/tests/test262/ch11/11.14/S11.14_A1.js
new file mode 100644
index 000000000..2e3528db4
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.14/S11.14_A1.js
@@ -0,0 +1,61 @@
+// 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 Expression and , or between , and AssignmentExpression are allowed
+ *
+ * @path ch11/11.14/S11.14_A1.js
+ * @description Checking by using eval
+ */
+
+//CHECK#1
+if ((eval("false\u0009,\u0009true")) !== true) {
+ $ERROR('#1: (false\\u0009,\\u0009true) === true');
+}
+
+//CHECK#2
+if ((eval("false\u000B,\u000Btrue")) !== true) {
+ $ERROR('#2: (false\\u000B,\\u000Btrue) === true');
+}
+
+//CHECK#3
+if ((eval("false\u000C,\u000Ctrue")) !== true) {
+ $ERROR('#3: (false\\u000C,\\u000Ctrue) === true');
+}
+
+//CHECK#4
+if ((eval("false\u0020,\u0020true")) !== true) {
+ $ERROR('#4: (false\\u0020,\\u0020true) === true');
+}
+
+//CHECK#5
+if ((eval("false\u00A0,\u00A0true")) !== true) {
+ $ERROR('#5: (false\\u00A0,\\u00A0true) === true');
+}
+
+//CHECK#6
+if ((eval("false\u000A,\u000Atrue")) !== true) {
+ $ERROR('#6: (false\\u000A,\\u000Atrue) === true');
+}
+
+//CHECK#7
+if ((eval("false\u000D,\u000Dtrue")) !== true) {
+ $ERROR('#7: (false\\u000D,\\u000Dtrue) === true');
+}
+
+//CHECK#8
+if ((eval("false\u2028,\u2028true")) !== true) {
+ $ERROR('#8: (false\\u2028,\\u2028true) === true');
+}
+
+//CHECK#9
+if ((eval("false\u2029,\u2029true")) !== true) {
+ $ERROR('#9: (false\\u2029,\\u2029true) === true');
+}
+
+
+//CHECK#10
+if ((eval("false\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029,\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029true")) !== true) {
+ $ERROR('#10: (false\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029,\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029true) === true');
+}
+
diff --git a/js/src/tests/test262/ch11/11.14/S11.14_A2.1_T1.js b/js/src/tests/test262/ch11/11.14/S11.14_A2.1_T1.js
new file mode 100644
index 000000000..e53336886
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.14/S11.14_A2.1_T1.js
@@ -0,0 +1,54 @@
+// 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.14/S11.14_A2.1_T1.js
+ * @description Either Expression is not Reference or GetBase is not null
+ */
+
+//CHECK#1
+if ((1,2) !== 2) {
+ $ERROR('#1: (1,2) === 2. Actual: ' + ((1,2)));
+}
+
+//CHECK#2
+var x = 1;
+if ((x, 2) !== 2) {
+ $ERROR('#2: var x = 1; (x, 2) === 2. Actual: ' + ((x, 2)));
+}
+
+//CHECK#3
+var y = 2;
+if ((1, y) !== 2) {
+ $ERROR('#3: var y = 2; (1, y) === 2. Actual: ' + ((1, y)));
+}
+
+//CHECK#4
+var x = 1;
+var y = 2;
+if ((x, y) !== 2) {
+ $ERROR('#4: var x = 1; var y = 2; (x, y) === 2. Actual: ' + ((x, y)));
+}
+
+//CHECK#5
+var x = 1;
+if ((x, x) !== 1) {
+ $ERROR('#5: var x = 1; (x, x) === 1. Actual: ' + ((x, x)));
+}
+
+//CHECK#6
+var objectx = new Object();
+var objecty = new Object();
+objectx.prop = true;
+objecty.prop = 1.1;
+if ((objectx.prop = false, objecty.prop) !== objecty.prop) {
+ $ERROR('#6: var objectx = new Object(); var objecty = new Object(); objectx.prop = true; objecty.prop = 1; (objectx.prop = false, objecty.prop) === objecty.prop. Actual: ' + ((objectx.prop = false, objecty.prop)));
+} else {
+ if (objectx.prop !== false) {
+ $ERROR('#6: var objectx = new Object(); var objecty = new Object(); objectx.prop = true; objecty.prop = 1; objectx.prop = false, objecty.prop; objectx.prop === false');
+ }
+}
+
+
diff --git a/js/src/tests/test262/ch11/11.14/S11.14_A2.1_T2.js b/js/src/tests/test262/ch11/11.14/S11.14_A2.1_T2.js
new file mode 100644
index 000000000..3a6106edd
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.14/S11.14_A2.1_T2.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.14/S11.14_A2.1_T2.js
+ * @description If GetBase(Expression) is null, throw ReferenceError
+ */
+
+//CHECK#1
+try {
+ x, 1;
+ $ERROR('#1.1: x, 1 throw ReferenceError. Actual: ' + (x, 1));
+}
+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.14/S11.14_A2.1_T3.js b/js/src/tests/test262/ch11/11.14/S11.14_A2.1_T3.js
new file mode 100644
index 000000000..ad654eeb0
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.14/S11.14_A2.1_T3.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.14/S11.14_A2.1_T3.js
+ * @description If GetBase(AssigmentExpression) is null, throw ReferenceError
+ */
+
+//CHECK#1
+try {
+ 1, y;
+ $ERROR('#1.1: 1, y throw ReferenceError. Actual: ' + (1, y));
+}
+catch (e) {
+ if ((e instanceof ReferenceError) !== true) {
+ $ERROR('#1.2: 1, y throw ReferenceError. Actual: ' + (e));
+ }
+}
+
diff --git a/js/src/tests/test262/ch11/11.14/S11.14_A3.js b/js/src/tests/test262/ch11/11.14/S11.14_A3.js
new file mode 100644
index 000000000..d8858aa3d
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.14/S11.14_A3.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.
+
+/**
+ * Comma Operator evaluates all Expressions and returns the last of them
+ *
+ * @path ch11/11.14/S11.14_A3.js
+ * @description Checking with "="
+ */
+
+//CHECK#1
+var x = 0;
+var y = 0;
+var z = 0;
+if ((x = 1, y = 2, z = 3) !== 3) {
+ $ERROR('#1: var x = 0; var y = 0; var z = 0; (x = 1, y = 2, z = 3) === 3. Actual: ' + ((x = 1, y = 2, z = 3)));
+}
+
+var x = 0;
+var y = 0;
+var z = 0;
+x = 1, y = 2, z = 3;
+
+//CHECK#2
+if (x !== 1) {
+ $ERROR('#2: var x = 0; var y = 0; var z = 0; x = 1, y = 2, z = 3; x === 1. Actual: ' + (x));
+}
+
+//CHECK#3
+if (y !== 2) {
+ $ERROR('#3: var x = 0; var y = 0; var z = 0; x = 1, y = 2, z = 3; y === 2. Actual: ' + (y));
+}
+
+//CHECK#4
+if (z !== 3) {
+ $ERROR('#4: var x = 0; var y = 0; var z = 0; x = 1, y = 2, z = 3; z === 3. Actual: ' + (z));
+}
+
diff --git a/js/src/tests/test262/ch11/11.14/browser.js b/js/src/tests/test262/ch11/11.14/browser.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.14/browser.js
diff --git a/js/src/tests/test262/ch11/11.14/shell.js b/js/src/tests/test262/ch11/11.14/shell.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch11/11.14/shell.js