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.1/11.1.6 | |
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.1/11.1.6')
10 files changed, 234 insertions, 0 deletions
diff --git a/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A1.js b/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A1.js new file mode 100644 index 000000000..d6b8323a8 --- /dev/null +++ b/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A1.js @@ -0,0 +1,60 @@ +// 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 inside "grouping" operator are allowed + * + * @path ch11/11.1/11.1.6/S11.1.6_A1.js + * @description Inserting WhiteSpaces and LineTerminators into grouping operator. Eval is used + */ + +//CHECK#1 +if (eval("(\u00091\u0009)") !== 1) { + $ERROR('#1: (\\u00091\\u0009) === 1'); +} + +//CHECK#2 +if (eval("(\u000B1\u000B)") !== 1) { + $ERROR('#2: (\\u000B1\\u000B) === 1'); +} + +//CHECK#3 +if (eval("(\u000C1\u000C)") !== 1) { + $ERROR('#3: (\\u000C1\\u000C) === 1'); +} + +//CHECK#4 +if (eval("(\u00201\u0020)") !== 1) { + $ERROR('#4: (\\u00201\\u0020 === 1'); +} + +//CHECK#5 +if (eval("(\u00A01\u00A0)") !== 1) { + $ERROR('#5: (\\u00A01\\u00A0) === 1'); +} + +//CHECK#6 +if (eval("(\u000A1\u000A)") !== 1) { + $ERROR('#6: (\\u000A1\\u000A) === 1'); +} + +//CHECK#7 +if (eval("(\u000D1\u000D)") !== 1) { + $ERROR('#7: (\\u000D1\\u000D) === 1'); +} + +//CHECK#8 +if (eval("(\u20281\u2028)") !== 1) { + $ERROR('#8: (\\u20281\\u2028) === 1'); +} + +//CHECK#9 +if (eval("(\u20291\u2029)") !== 1) { + $ERROR('#9: (\\u20291\\u2029) === 1'); +} + +//CHECK#10 +if (eval("(\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029)") !== 1) { + $ERROR('#10: (\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029) === 1'); +} + diff --git a/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A2.js b/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A2.js new file mode 100644 index 000000000..30d5c290c --- /dev/null +++ b/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A2.js @@ -0,0 +1,31 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * "This" operator doesn't use GetValue. The operators "delete" and "typeof" can be applied to parenthesised expressions + * + * @path ch11/11.1/11.1.6/S11.1.6_A2.js + * @description Applying "delete" and "typeof" operators to an undefined variable and a property of an object + */ + +//CHECK#1 +if (delete (x) !== true) { + $ERROR('#1: delete (x) === true'); +} + +//CHECK#2 +if (typeof (x) !== "undefined") { + $ERROR('#2: typeof (x) === "undefined". Actual: ' + (typeof (x))); +} + +var object = {}; +//CHECK#3 +if (delete (object.prop) !== true) { + $ERROR('#3: var object = {}; delete (object.prop) === true'); +} + +//CHECK#4 +if (typeof (object.prop) !== "undefined") { + $ERROR('#4: var object = {}; typeof (object.prop) === "undefined". Actual: ' + (typeof (object.prop))); +} + diff --git a/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A3_T1.js b/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A3_T1.js new file mode 100644 index 000000000..26a030104 --- /dev/null +++ b/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A3_T1.js @@ -0,0 +1,23 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * "This" operator only evaluates Expression + * + * @path ch11/11.1/11.1.6/S11.1.6_A3_T1.js + * @description Applying grouping operator to Boolean + */ + +// Check for Boolean + +//CHECK#1 +if ((true) !== true) { + $ERROR('#1: (true) === true'); +} + +//CHECK#2 +var x = new Boolean(true); +if ((x) !== x) { + $ERROR('#2: var x = new Boolean(true); (x) === x. Actual: ' + ((x))); +} + diff --git a/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A3_T2.js b/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A3_T2.js new file mode 100644 index 000000000..e29e039f4 --- /dev/null +++ b/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A3_T2.js @@ -0,0 +1,23 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * "This" operator only evaluates Expression + * + * @path ch11/11.1/11.1.6/S11.1.6_A3_T2.js + * @description Applying grouping operator to Number + */ + +//Check for Number + +//CHECK#1 +if ((1) !== 1) { + $ERROR('#1: (1) === 1. Actual: ' + ((1))); +} + +//CHECK#2 +var x = new Number(1); +if ((x) !== x) { + $ERROR('#2: var x = new Number(1); (x) === x. Actual: ' + ((x))); +} + diff --git a/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A3_T3.js b/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A3_T3.js new file mode 100644 index 000000000..a673bd31d --- /dev/null +++ b/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A3_T3.js @@ -0,0 +1,28 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * "This" operator only evaluates Expression + * + * @path ch11/11.1/11.1.6/S11.1.6_A3_T3.js + * @description Applying grouping operator to String + */ + +//Check for String + +//CHECK#1 +if (("1") !== "1") { + $ERROR('#1: ("1") === "1". Actual: ' + (("1"))); +} + +//CHECK#2 +if (("x") !== "x") { + $ERROR('#2: ("x") === "x". Actual: ' + (("x"))); +} + +//CHECK#3 +var x = new Number("1"); +if ((x) !== x) { + $ERROR('#3: var x = new Number("1"); (x) === x. Actual: ' + ((x))); +} + diff --git a/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A3_T4.js b/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A3_T4.js new file mode 100644 index 000000000..2c049ccc9 --- /dev/null +++ b/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A3_T4.js @@ -0,0 +1,27 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * "This" operator only evaluates Expression + * + * @path ch11/11.1/11.1.6/S11.1.6_A3_T4.js + * @description Applying grouping operator to undefined + */ + +//Check for undefined and null + +//CHECK#1 +if ((undefined) !== undefined) { + $ERROR('#1: (undefined) === undefined. Actual: ' + ((undefined))); +} + +//CHECK#2 +if ((void 0) !== void 0) { + $ERROR('#2: (void 0) === void 0. Actual: ' + ((void 0))); +} + +//CHECK#2 +if ((null) !== null) { + $ERROR('#2: (null) === null. Actual: ' + ((null))); +} + diff --git a/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A3_T5.js b/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A3_T5.js new file mode 100644 index 000000000..6fe51bbe9 --- /dev/null +++ b/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A3_T5.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. + +/** + * "This" operator only evaluates Expression + * + * @path ch11/11.1/11.1.6/S11.1.6_A3_T5.js + * @description Using grouping operator in declaration of variables + */ + +//CHECK#1 +(x) = 1; +if (x !== 1) { + $ERROR('#1: (x) = 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +var y = 1; (y)++; ++(y); (y)--; --(y); +if (y !== 1) { + $ERROR('#2: var y = 1; (y)++; ++(y); (y)--; --(y); y === 1. Actual: ' + (y)); +} + diff --git a/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A3_T6.js b/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A3_T6.js new file mode 100644 index 000000000..e4398bfff --- /dev/null +++ b/js/src/tests/test262/ch11/11.1/11.1.6/S11.1.6_A3_T6.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * "This" operator only evaluates Expression + * + * @path ch11/11.1/11.1.6/S11.1.6_A3_T6.js + * @description Applying grouping operator to delete and typeof operators + */ + +//CHECK#1 +if (delete (x) !== true) { + $ERROR('#1: delete (x) === true'); +} + +//CHECK#2 +if (typeof (x) !== "undefined") { + $ERROR('#2: typeof (x) === "undefined". Actual: ' + (typeof (x))); +} + diff --git a/js/src/tests/test262/ch11/11.1/11.1.6/browser.js b/js/src/tests/test262/ch11/11.1/11.1.6/browser.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch11/11.1/11.1.6/browser.js diff --git a/js/src/tests/test262/ch11/11.1/11.1.6/shell.js b/js/src/tests/test262/ch11/11.1/11.1.6/shell.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch11/11.1/11.1.6/shell.js |