js/src/tests/test262/ch11/11.13/11.13.2/S11.13.2_A4.3_T1.4.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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 x = x % y
     6  *
     7  * @path ch11/11.13/11.13.2/S11.13.2_A4.3_T1.4.js
     8  * @description Type(x) and Type(y) vary between Null and Undefined
     9  */
    11 //CHECK#1
    12 x = null;
    13 x %= undefined;
    14 if (isNaN(x) !== true) {
    15   $ERROR('#1: x = null; x %= undefined; x === Not-a-Number. Actual: ' + (x));
    16 }
    18 //CHECK#2
    19 x = undefined;
    20 x %= null;
    21 if (isNaN(x) !== true) {
    22   $ERROR('#2: x = undefined; x %= null; x === Not-a-Number. Actual: ' + (x));
    23 }
    25 //CHECK#3
    26 x = undefined;
    27 x %= undefined;
    28 if (isNaN(x) !== true) {
    29   $ERROR('#3: x = undefined; x %= undefined; x === Not-a-Number. Actual: ' + (x));
    30 }
    32 //CHECK#4
    33 x = null;
    34 x %= null;
    35 if (isNaN(x) !== true) {
    36   $ERROR('#4: x = null; x %= null; x === Not-a-Number. Actual: ' + (x));
    37 }

mercurial