js/src/tests/test262/ch11/11.5/11.5.3/S11.5.3_A4_T4.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  * The result of a ECMAScript floating-point remainder operation is determined by the rules of IEEE arithmetics
     6  *
     7  * @path ch11/11.5/11.5.3/S11.5.3_A4_T4.js
     8  * @description If the divisor is zero results is NaN
     9  */
    11 //CHECK#1
    12 if (isNaN(-0 % 0) !== true) {
    13   $ERROR('#1: -0 % 0 === Not-a-Number. Actual: ' + (-0 % 0));
    14 }
    16 //CHECK#2
    17 if (isNaN(-0 % -0) !== true) {
    18   $ERROR('#2: -0 % -0 === Not-a-Number. Actual: ' + (-0 % -0));
    19 }
    21 //CHECK#3
    22 if (isNaN(0 % 0) !== true) {
    23   $ERROR('#3: 0 % 0 === Not-a-Number. Actual: ' + (0 % 0));
    24 }
    26 //CHECK#4
    27 if (isNaN(0 % -0) !== true) {
    28   $ERROR('#4: 0 % -0 === Not-a-Number. Actual: ' + (0 % -0));
    29 }
    31 //CHECK#5
    32 if (isNaN(-1 % 0) !== true) {
    33   $ERROR('#5: 1 % 0 === Not-a-Number. Actual: ' + (1 % 0));
    34 }
    36 //CHECK#6
    37 if (isNaN(-1 % -0) !== true) {
    38   $ERROR('#6: -1 % -0 === Not-a-Number. Actual: ' + (-1 % -0));
    39 }
    41 //CHECK#7
    42 if (isNaN(1 % 0) !== true) {
    43   $ERROR('#7: 1 % 0 === Not-a-Number. Actual: ' + (1 % 0));
    44 }
    46 //CHECK#8
    47 if (isNaN(1 % -0) !== true) {
    48   $ERROR('#8: 1 % -0 === Not-a-Number. Actual: ' + (1 % -0));
    49 }
    51 //CHECK#9
    52 if (isNaN(Number.NEGATIVE_INFINITY % 0) !== true) {
    53   $ERROR('#9: Infinity % 0 === Not-a-Number. Actual: ' + (Infinity % 0));
    54 }
    56 //CHECK#10
    57 if (isNaN(Number.NEGATIVE_INFINITY % -0) !== true) {
    58   $ERROR('#10: -Infinity % -0 === Not-a-Number. Actual: ' + (-Infinity % -0));
    59 }
    61 //CHECK#11
    62 if (isNaN(Number.POSITIVE_INFINITY % 0) !== true) {
    63   $ERROR('#11: Infinity % 0 === Not-a-Number. Actual: ' + (Infinity % 0));
    64 }
    66 //CHECK#12
    67 if (isNaN(Number.POSITIVE_INFINITY % -0) !== true) {
    68   $ERROR('#12: Infinity % -0 === Not-a-Number. Actual: ' + (Infinity % -0));
    69 }
    71 //CHECK#13
    72 if (isNaN(Number.MIN_VALUE % 0) !== true) {
    73   $ERROR('#13: Number.MIN_VALUE % 0 === Not-a-Number. Actual: ' + (Number.MIN_VALUE % 0));
    74 }
    76 //CHECK#14
    77 if (isNaN(Number.MIN_VALUE % -0) !== true) {
    78   $ERROR('#14: -Number.MIN_VALUE % -0 === Not-a-Number. Actual: ' + (-Number.MIN_VALUE % -0));
    79 }
    81 //CHECK#15
    82 if (isNaN(Number.MAX_VALUE % 0) !== true) {
    83   $ERROR('#15: Number.MAX_VALUE % 0 === Not-a-Number. Actual: ' + (Number.MAX_VALUE % 0));
    84 }
    86 //CHECK#16
    87 if (isNaN(Number.MAX_VALUE % -0) !== true) {
    88   $ERROR('#16: Number.MAX_VALUE % -0 === Not-a-Number. Actual: ' + (Number.MAX_VALUE % -0));
    89 }

mercurial