js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.1_T2.3.js

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     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  * The production x *= y is the same as the production x = x * y
     6  *
     7  * @path ch11/11.13/11.13.2/S11.13.2_A4.1_T2.3.js
     8  * @description Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null
     9  */
    11 //CHECK#1
    12 x = 1;
    13 x *= null;
    14 if (x !== 0) {
    15   $ERROR('#1: x = 1; x *= null; x === 0. Actual: ' + (x));
    16 }
    18 //CHECK#2
    19 x = null;
    20 x *= 1;
    21 if (x !== 0) {
    22   $ERROR('#2: x = null; x *= 1; x === 0. Actual: ' + (x));
    23 }
    25 //CHECK#3
    26 x = new Number(1);
    27 x *= null;
    28 if (x !== 0) {
    29   $ERROR('#3: x = new Number(1); x *= null; x === 0. Actual: ' + (x));
    30 }
    32 //CHECK#4
    33 x = null;
    34 x *= new Number(1);
    35 if (x !== 0) {
    36   $ERROR('#4: x = null; x *= new Number(1); x === 0. Actual: ' + (x));
    37 }

mercurial