js/src/tests/test262/ch11/11.9/11.9.4/S11.9.4_A8_T2.js

Wed, 31 Dec 2014 07:53:36 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:53:36 +0100
branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
permissions
-rw-r--r--

Correct small whitespace inconsistency, lost while renaming variables.

     1 // Copyright 2009 the Sputnik authors.  All rights reserved.
     2 // This code is governed by the BSD license found in the LICENSE file.
     4 /**
     5  * If Type(x) is different from Type(y), return false
     6  *
     7  * @path ch11/11.9/11.9.4/S11.9.4_A8_T2.js
     8  * @description x or y is primitive number
     9  */
    11 //CHECK#1
    12 if (1 === new Number(1)) {
    13   $ERROR('#1: 1 !== new Number(1)');
    14 }
    16 //CHECK#2
    17 if (1 === true) {
    18   $ERROR('#2: 1 !== true');
    19 }
    21 //CHECK#3
    22 if (1 === new Boolean(1)) {
    23   $ERROR('#3: 1 !== new Boolean(1)');
    24 }
    26 //CHECK#4
    27 if (1 === "1") {
    28   $ERROR('#4: 1 !== "1"');
    29 }
    31 //CHECK#5
    32 if (1 === new String(1)) {
    33   $ERROR('#5: 1 !== new String(1)');
    34 }
    36 //CHECK#6
    37 if (new Number(0) === 0) {
    38   $ERROR('#6: new Number(0) !== 0');
    39 }
    41 //CHECK#7
    42 if (false === 0) {
    43   $ERROR('#7: false !== 0');
    44 }
    46 //CHECK#8
    47 if (new Boolean(0) === 0) {
    48   $ERROR('#8: new Boolean(0) !== 0');
    49 }
    51 //CHECK#9
    52 if ("0" === 0) {
    53   $ERROR('#9: "0" !== 0');
    54 }
    56 //CHECK#10
    57 if (new String(0) === 0) {
    58   $ERROR('#10: new String(0) !== 0');
    59 }
    61 //CHECK#11
    62 if (1 === {valueOf: function () {return 1}}) {
    63   $ERROR('#11: 1 === {valueOf: function () {return 1}}');
    64 }

mercurial