diff options
Diffstat (limited to 'external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator')
21 files changed, 856 insertions, 0 deletions
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A1.js new file mode 100644 index 000000000..b0997e8da --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A1.js @@ -0,0 +1,59 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S11.9.5_A1; +* @section: 11.9.5, 7.2, 7.3; +* @assertion: White Space and Line Terminator between EqualityExpression and "!==" or between "!==" and RelationalExpression are allowed; +* @description: Checking by using eval; +*/ + +//CHECK#1 +if (eval("1\u0009!==\u00091")) { + $ERROR('#1: 1\\u0009!==\\u00091'); +} + +//CHECK#2 +if (eval("1\u000B!==\u000B1")) { + $ERROR('#2: 1\\u000B!==\\u000B1'); +} + +//CHECK#3 +if (eval("1\u000C!==\u000C1")) { + $ERROR('#3: 1\\u000C!==\\u000C1'); +} + +//CHECK#4 +if (eval("1\u0020!==\u00201")) { + $ERROR('#4: 1\\u0020!==\\u00201'); +} + +//CHECK#5 +if (eval("1\u00A0!==\u00A01")) { + $ERROR('#5: 1\\u00A0!==\\u00A01'); +} + +//CHECK#6 +if (eval("1\u000A!==\u000A1")) { + $ERROR('#6: 1\\u000A!==\\u000A1'); +} + +//CHECK#7 +if (eval("1\u000D!==\u000D1")) { + $ERROR('#7: 1\\u000D!==\\u000D1'); +} + +//CHECK#8 +if (eval("1\u2028!==\u20281")) { + $ERROR('#8: 1\\u2028!==\\u20281'); +} + +//CHECK#9 +if (eval("1\u2029!==\u20291")) { + $ERROR('#9: 1\\u2029!==\\u20291'); +} + +//CHECK#10 +if (eval("1\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029!==\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) { + $ERROR('#10: 1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029!==\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A2.1_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A2.1_T1.js new file mode 100644 index 000000000..f815bfaf5 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A2.1_T1.js @@ -0,0 +1,43 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.9.5_A2.1_T1; + * @section: 11.9.5; + * @assertion: Operator x !== y uses GetValue; + * @description: Either Type is not Reference or GetBase is not null; +*/ + +//CHECK#1 +if (1 !== 1) { + $ERROR('#1: 1 === 1'); +} + +//CHECK#2 +var x = 1; +if (x !== 1) { + $ERROR('#2: var x = 1; x === 1'); +} + +//CHECK#3 +var y = 1; +if (1 !== y) { + $ERROR('#3: var y = 1; 1 === y'); +} + +//CHECK#4 +var x = 1; +var y = 1; +if (x !== y) { + $ERROR('#4: var x = 1; var y = 1; x === y'); +} + +//CHECK#5 +var objectx = new Object(); +var objecty = new Object(); +objectx.prop = 1; +objecty.prop = 1; +if (objectx.prop !== objecty.prop) { + $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop === objecty.prop'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A2.1_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A2.1_T2.js new file mode 100644 index 000000000..050585621 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_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. + +/** + * @name: S11.9.5_A2.1_T2; + * @section: 11.9.5; + * @assertion: Operator x !== y uses GetValue; + * @description: If GetBase(x) 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/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A2.1_T3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A2.1_T3.js new file mode 100644 index 000000000..25f372a9f --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_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. + +/** + * @name: S11.9.5_A2.1_T3; + * @section: 11.9.5; + * @assertion: Operator x !== y uses GetValue; + * @description: If GetBase(y) 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/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A2.4_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A2.4_T1.js new file mode 100644 index 000000000..6e54ab64b --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A2.4_T1.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. + +/** + * @name: S11.9.5_A2.4_T1; + * @section: 11.9.5; + * @assertion: First expression is evaluated first, and then second expression; + * @description: Checking with "="; +*/ + +//CHECK#1 +var x = 0; +if ((x = 1) !== x) { + $ERROR('#1: var x = 0; (x = 1) === x'); +} + +//CHECK#2 +var x = 0; +if (!(x !== (x = 1))) { + $ERROR('#2: var x = 0; x !== (x = 1)'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A2.4_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A2.4_T2.js new file mode 100644 index 000000000..cd6055d65 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A2.4_T2.js @@ -0,0 +1,25 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.9.5_A2.4_T2; + * @section: 11.9.5; + * @assertion: First expression is evaluated first, and then second expression; + * @description: Checking with "throw"; +*/ + +//CHECK#1 +var x = function () { throw "x"; }; +var y = function () { throw "y"; }; +try { + x() !== y(); + $ERROR('#1.1: var x = function () { throw "x"; }; var y = function () { throw "y"; }; x() !== y() throw "x". Actual: ' + (x() !== y())); +} catch (e) { + if (!(e !== "y")) { + $ERROR('#1.2: First expression is evaluated first, and then second expression'); + } else { + if (e !== "x") { + $ERROR('#1.3: var x = function () { throw "x"; }; var y = function () { throw "y"; }; x() !== y() throw "x". Actual: ' + (e)); + } + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A2.4_T3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A2.4_T3.js new file mode 100644 index 000000000..18492f179 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A2.4_T3.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. + +/** + * @name: S11.9.5_A2.4_T3; + * @section: 11.9.5; + * @assertion: First expression is evaluated first, and then second expression; + * @description: Checking undeclarated variables; +*/ + +//CHECK#1 +try { + x !== (x = 1); + $ERROR('#1.1: x !== (x = 1) throw ReferenceError. Actual: ' + (x !== (x = 1))); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x !== (x = 1) throw ReferenceError. Actual: ' + (e)); + } +} + +//CHECK#2 +if ((y = 1) !== y) { + $ERROR('#2: (y = 1) === y'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A3.js new file mode 100644 index 000000000..fca518099 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A3.js @@ -0,0 +1,30 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.9.5_A3; + * @section: 11.9.5, 11.9.6; + * @assertion: Type(x) and Type(y) are Boolean-s. + * Return false, if x and y are both true or both false; otherwise, return true; + * @description: x and y are primitive booleans; + */ + +//CHECK#1 +if (true !== true) { + $ERROR('#1: true === true'); +} + +//CHECK#2 +if (false !== false) { + $ERROR('#2: false === false'); +} + +//CHECK#3 +if (!(true !== false)) { + $ERROR('#3: true !== false'); +} + +//CHECK#4 +if (!(false !== true)) { + $ERROR('#4: false !== true'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A4.1_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A4.1_T1.js new file mode 100644 index 000000000..c6d2f70d9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A4.1_T1.js @@ -0,0 +1,55 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.9.5_A4.1_T1; + * @section: 11.9.5, 11.9.6; + * @assertion: If x or y is NaN, return true; + * @description: x is NaN; +*/ + +//CHECK#1 +if (!(Number.NaN !== true)) { + $ERROR('#1: NaN !== true'); +} + +//CHECK#2 +if (!(Number.NaN !== 1)) { + $ERROR('#2: NaN !== 1'); +} + +//CHECK#3 +if (!(Number.NaN !== Number.NaN)) { + $ERROR('#3: NaN !== NaN'); +} + +//CHECK#4 +if (!(Number.NaN !== Number.POSITIVE_INFINITY)) { + $ERROR('#4: NaN !== +Infinity'); +} + +//CHECK#5 +if (!(Number.NaN !== Number.NEGATIVE_INFINITY)) { + $ERROR('#5: NaN !== -Infinity'); +} + +//CHECK#6 +if (!(Number.NaN !== Number.MAX_VALUE)) { + $ERROR('#6: NaN !== Number.MAX_VALUE'); +} + +//CHECK#7 +if (!(Number.NaN !== Number.MIN_VALUE)) { + $ERROR('#7: NaN !== Number.MIN_VALUE'); +} + +//CHECK#8 +if (!(Number.NaN !== "string")) { + $ERROR('#8: NaN !== "string"'); +} + +//CHECK#9 +if (!(Number.NaN !== new Object())) { + $ERROR('#9: NaN !== new Object()'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A4.1_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A4.1_T2.js new file mode 100644 index 000000000..1917a9a32 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A4.1_T2.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. + +/** + * @name: S11.9.5_A4.1_T2; + * @section: 11.9.5, 11.9.6; + * @assertion: If x or y is NaN, return true; + * @description: y is NaN; +*/ + +//CHECK#1 +if (!(true !== Number.NaN)) { + $ERROR('#1: true !== NaN'); +} + +//CHECK#2 +if (!(-1 !== Number.NaN)) { + $ERROR('#2: -1 !== NaN'); +} + +//CHECK#3 +if (!(Number.NaN !== Number.NaN)) { + $ERROR('#3: NaN !== NaN'); +} + +//CHECK#4 +if (!(Number.POSITIVE_INFINITY !== Number.NaN)) { + $ERROR('#4: +Infinity !== NaN'); +} + +//CHECK#5 +if (!(Number.NEGATIVE_INFINITY !== Number.NaN)) { + $ERROR('#5: -Infinity !== NaN'); +} + +//CHECK#6 +if (!(Number.MAX_VALUE !== Number.NaN)) { + $ERROR('#6: Number.MAX_VALUE !== NaN'); +} + +//CHECK#7 +if (!(Number.MIN_VALUE !== Number.NaN)) { + $ERROR('#7: Number.MIN_VALUE !== NaN'); +} + +//CHECK#8 +if (!("string" !== Number.NaN)) { + $ERROR('#8: "string" !== NaN'); +} + +//CHECK#9 +if (!(new Object() !== Number.NaN)) { + $ERROR('#9: new Object() !== NaN'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A4.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A4.2.js new file mode 100644 index 000000000..ff0b4ef47 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A4.2.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.9.5_A4.2; + * @section: 11.9.5, 11.9.6; + * @assertion: If x is +0(-0) and y is -0(+0), return false; + * @description: Checking all combinations; +*/ + +//CHECK#1 +if (+0 !== -0) { + $ERROR('#1: +0 === -0'); +} + +//CHECK#2 +if (-0 !== +0) { + $ERROR('#2: -0 === +0'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A4.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A4.3.js new file mode 100644 index 000000000..8d98f1d1b --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A4.3.js @@ -0,0 +1,55 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.9.5_A4.3; + * @section: 11.9.5, 11.9.6; + * @assertion: Type(x) and Type(y) are Number-s minus NaN, +0, -0. + * Return false, if x is the same number value as y; otherwise, return true; + * @description: x and y are primitive numbers; +*/ + +//CHECK#1 +if (Number.POSITIVE_INFINITY !== Number.POSITIVE_INFINITY) { + $ERROR('#1: +Infinity === +Infinity'); +} + +//CHECK#2 +if (Number.NEGATIVE_INFINITY !== Number.NEGATIVE_INFINITY) { + $ERROR('#2: -Infinity === -Infinity'); +} + +//CHECK#3 +if (13 !== 13) { + $ERROR('#3: 13 === 13'); +} + +//CHECK#4 +if (-13 !== -13) { + $ERROR('#4: -13 === -13'); +} + +//CHECK#5 +if (1.3 !== 1.3) { + $ERROR('#5: 1.3 === 1.3'); +} + +//CHECK#6 +if (-1.3 !== -1.3) { + $ERROR('#6: -1.3 === -1.3'); +} + +//CHECK#7 +if (Number.POSITIVE_INFINITY !== -Number.NEGATIVE_INFINITY) { + $ERROR('#7: +Infinity === -(-Infinity)'); +} + +//CHECK#8 +if (!(1 !== 0.999999999999)) { + $ERROR('#8: 1 !== 0.999999999999'); +} + +//CHECK#9 +if (1.0 !== 1) { + $ERROR('#9: 1.0 === 1'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A5.js new file mode 100644 index 000000000..d042e90d1 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A5.js @@ -0,0 +1,35 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.9.5_A5; + * @section: 11.9.5, 11.9.6; + * @assertion: Type(x) and Type(y) are String-s. + * Return false, if x and y are exactly the same sequence of characters; otherwise, return true; + * @description: x and y are primitive strings; + */ + +//CHECK#1 +if ("" !== "") { + $ERROR('#1: "" === ""'); +} + +//CHECK#2 +if (" " !== " ") { + $ERROR('#2: " " === " "'); +} + +//CHECK#3 +if ("string" !== "string") { + $ERROR('#3: "string" === "string"'); +} + +//CHECK#4 +if (!(" string" !== "string ")) { + $ERROR('#4: " string" !== "string "'); +} + +//CHECK#5 +if (!("1.0" !== "1")) { + $ERROR('#5: "1.0" !== "1"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A6.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A6.1.js new file mode 100644 index 000000000..8785131cf --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A6.1.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. + +/** + * @name: S11.9.5_A6.1; + * @section: 11.9.5, 11.9.6; + * @assertion: If Type(x) and Type(y) are Undefined-s, return false; + * @description: void 0, eval("var x") is undefined; +*/ + +//CHECK#1 +if (undefined !== undefined) { + $ERROR('#1: undefined === undefined'); +} + +//CHECK#2 +if (void 0 !== undefined) { + $ERROR('#2: void 0 === undefined'); +} + +//CHECK#3 +if (undefined !== eval("var x")) { + $ERROR('#3: undefined === eval("var x")'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A6.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A6.2.js new file mode 100644 index 000000000..407d49339 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A6.2.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.9.5_A6.2; + * @section: 11.9.5, 11.9.6; + * @assertion: If Type(x) and Type(y) are Null-s, return false; + * @description: null === null; +*/ + +//CHECK#1 +if (null !== null) { + $ERROR('#1: null === null'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A7.js new file mode 100644 index 000000000..f31dfd011 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A7.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. + +/** + * @name: S11.9.5_A7; + * @section: 11.9.5, 11.9.6; + * @assertion: Type(x) and Type(y) are Object-s. + * Return false, if x and y are references to the same Object; otherwise, return true; + * @description: Checking Boolean object, Number object, String object, Object object; + */ + +//CHECK#1 +if (!(new Object() !== new Object())) { + $ERROR('#1: new Object() !== new Object()'); +} + +//CHECK#2 +if (!(new Object(true) !== new Object(true))) { + $ERROR('#2: new Object() !== new Object()'); +} + +//CHECK#3 +if (!(new Object(false) !== new Object(false))) { + $ERROR('#3: new Object() !== new Object()'); +} + +//CHECK#4 +if (!(new Object(+0) !== new Object(-0))) { + $ERROR('#4: new Object(+0) !== new Object(-0)'); +} + +//CHECK#5 +x = {}; +y = x; +if (x !== y) { + $ERROR('#5: x = {}; y = x; x === y'); +} + +//CHECK#6 +if (!(new Boolean(true) !== new Number(1))) { + $ERROR('#6 new Boolean(true) !== new Number(1)'); +} + +//CHECK#7 +if (!(new Number(1) !== new String("1"))) { + $ERROR('#7: new Number(1) !== new String("1")'); +} + +//CHECK#8 +if (!(new String("1") !== new Boolean(true))) { + $ERROR('#8: new String("x") !== new Boolean(true)'); +} + + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A8_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A8_T1.js new file mode 100644 index 000000000..0374f3aad --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A8_T1.js @@ -0,0 +1,64 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.9.5_A8_T1; + * @section: 11.9.5, 11.9.6; + * @assertion: If Type(x) is different from Type(y), return true; + * @description: x or y is primitive boolean; +*/ + +//CHECK#1 +if (!(true !== new Boolean(true))) { + $ERROR('#1: true !== new Number(true)'); +} + +//CHECK#2 +if (!(true !== 1)) { + $ERROR('#2: true !== 1'); +} + +//CHECK#3 +if (!(true !== new Number(true))) { + $ERROR('#3: true !== new Number(true)'); +} + +//CHECK#4 +if (!(true !== "1")) { + $ERROR('#4: true !== "1"'); +} + +//CHECK#5 +if (!(true !== new String(true))) { + $ERROR('#5: true !== new String(true)'); +} + +//CHECK#6 +if (!(new Boolean(false) !== false)) { + $ERROR('#6: new Number(false) !== false'); +} + +//CHECK#7 +if (!(0 !== false)) { + $ERROR('#7: 0 !== false'); +} + +//CHECK#8 +if (!(new Number(false) !== false)) { + $ERROR('#8: new Number(false) !== false'); +} + +//CHECK#9 +if (!("0" !== false)) { + $ERROR('#9: "0" !== false'); +} + +//CHECK#10 +if (!(false !== new String(false))) { + $ERROR('#10: false !== new String(false)'); +} + +//CHECK#11 +if (!(true !== {valueOf: function () {return true}})) { + $ERROR('#11: true !== {valueOf: function () {return true}}'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A8_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A8_T2.js new file mode 100644 index 000000000..4f8d6419f --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A8_T2.js @@ -0,0 +1,64 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.9.5_A8_T2; + * @section: 11.9.5, 11.9.6; + * @assertion: If Type(x) is different from Type(y), return true; + * @description: x or y is primitive number; +*/ + +//CHECK#1 +if (!(1 !== new Number(1))) { + $ERROR('#1: 1 !== new Number(1)'); +} + +//CHECK#2 +if (!(1 !== true)) { + $ERROR('#2: 1 !== true'); +} + +//CHECK#3 +if (!(1 !== new Boolean(1))) { + $ERROR('#3: 1 !== new Boolean(1)'); +} + +//CHECK#4 +if (!(1 !== "1")) { + $ERROR('#4: 1 !== "1"'); +} + +//CHECK#5 +if (!(1 !== new String(1))) { + $ERROR('#5: 1 !== new String(1)'); +} + +//CHECK#6 +if (!(new Number(0) !== 0)) { + $ERROR('#6: new Number(0) !== 0'); +} + +//CHECK#7 +if (!(false !== 0)) { + $ERROR('#7: false !== 0'); +} + +//CHECK#8 +if (!(new Boolean(0) !== 0)) { + $ERROR('#8: new Boolean(0) !== 0'); +} + +//CHECK#9 +if (!("0" !== 0)) { + $ERROR('#9: "0" !== 0'); +} + +//CHECK#10 +if (!(new String(0) !== 0)) { + $ERROR('#10: new String(0) !== 0'); +} + +//CHECK#11 +if (!(1 !== {valueOf: function () {return 1}})) { + $ERROR('#11: 1 !== {valueOf: function () {return 1}}'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A8_T3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A8_T3.js new file mode 100644 index 000000000..6f7ba6bf9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A8_T3.js @@ -0,0 +1,65 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.9.5_A8_T3; + * @section: 11.9.5, 11.9.6; + * @assertion: If Type(x) is different from Type(y), return true; + * @description: x or y is primitive string; +*/ + +//CHECK#1 +if (!("1" !== new String("1"))) { + $ERROR('#1: "1" !== new String("1")'); +} + +//CHECK#2 +if (!("1" !== true)) { + $ERROR('#2: "1" !== true'); +} + +//CHECK#3 +if (!("1" !== new Boolean("1"))) { + $ERROR('#3: "1" !== new Boolean("1")'); +} + +//CHECK#4 +if (!("1" !== 1)) { + $ERROR('#4: "1" === 1'); +} + +//CHECK#5 +if (!("1" !== new Number("1"))) { + $ERROR('#5: "1" === new Number("1")'); +} + +//CHECK#6 +if (!(new String(false) !== false)) { + $ERROR('#6: new Number(false) !== false'); +} + +//CHECK#7 +if (!(false !== "0")) { + $ERROR('#7: false !== "0"'); +} + +//CHECK#8 +if (!("0" !== new Boolean("0"))) { + $ERROR('#8: "0" !== new Boolean("0")'); +} + +//CHECK#9 +if (!(false !== 0)) { + $ERROR('#9: false !== 0'); +} + +//CHECK#10 +if (!(false !== new Number(false))) { + $ERROR('#10: false !== new Number(false)'); +} + +//CHECK#11 +if (!("1" !== {valueOf: function () {return "1"}})) { + $ERROR('#11: "1" !== {valueOf: function () {return "1"}}'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A8_T4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A8_T4.js new file mode 100644 index 000000000..74c58f83e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A8_T4.js @@ -0,0 +1,79 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.9.5_A8_T4; + * @section: 11.9.5, 11.9.6; + * @assertion: If Type(x) is different from Type(y), return true; + * @description: x or y is null or undefined; +*/ + +//CHECK#1 +if (!(undefined !== null)) { + $ERROR('#1: undefined !== null'); +} + +//CHECK#2 +if (!(null !== undefined)) { + $ERROR('#2: null !== undefined'); +} + +//CHECK#3 +if (!(null !== 0)) { + $ERROR('#3: null !== 0'); +} + +//CHECK#4 +if (!(0 !== null)) { + $ERROR('#4: 0 !== null'); +} + +//CHECK#5 +if (!(null !== false)) { + $ERROR('#5: null !== false'); +} + +//CHECK#6 +if (!(false !== null)) { + $ERROR('#6: false !== null'); +} + +//CHECK#7 +if (!(undefined !== false)) { + $ERROR('#7: undefined !== false'); +} + +//CHECK#8 +if (!(false !== undefined)) { + $ERROR('#8: false !== undefined'); +} + +//CHECK#9 +if (!(null !== new Object())) { + $ERROR('#9: null !== new Object()'); +} + +//CHECK#10 +if (!(new Object() !== null)) { + $ERROR('#10: new Object() !== null'); +} + +//CHECK#11 +if (!(null !== "null")) { + $ERROR('#11: null !== "null"'); +} + +//CHECK#12 +if (!("null" !== null)) { + $ERROR('#12: "null" !== null'); +} + +//CHECK#13 +if (!(undefined !== "undefined")) { + $ERROR('#13: undefined !== "undefined"'); +} + +//CHECK#14 +if (!("undefined" !== undefined)) { + $ERROR('#14: "undefined" !== undefined'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A8_T5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A8_T5.js new file mode 100644 index 000000000..b8be977d9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.5_The_Strict_Does_not_equals_Operator/S11.9.5_A8_T5.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. + +/** + * @name: S11.9.5_A8_T5; + * @section: 11.9.5, 11.9.6; + * @assertion: If Type(x) is different from Type(y), return true; + * @description: Checking such x and y that either x or y is primitive string and the other is primitive number; +*/ + +//CHECK#1 +try { + throw 1; +} catch(e) { + if (!(e !== "1")) { + $ERROR('#1: throw 1 !== "1"'); + } +} + +//CHECK#2 +try { + throw "1"; +} catch(e) { + if (!(1 !== e)) { + $ERROR('#2: 1 !== throw "1"'); + } +} |