Wed, 31 Dec 2014 07:53:36 +0100
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_T1.1.js
8 * @description If either operand is NaN, the result is NaN
9 */
11 //CHECK#1
12 if (isNaN(Number.NaN % Number.NaN) !== true) {
13 $ERROR('#1: NaN % NaN === Not-a-Number. Actual: ' + (NaN % NaN));
14 }
16 //CHECK#2
17 if (isNaN(Number.NaN % +0) !== true) {
18 $ERROR('#2: NaN % +0 === Not-a-Number. Actual: ' + (NaN % +0));
19 }
21 //CHECK#3
22 if (isNaN(Number.NaN % -0) !== true) {
23 $ERROR('#3: NaN % -0 === Not-a-Number. Actual: ' + (NaN % -0));
24 }
26 //CHECK#4
27 if (isNaN(Number.NaN % Number.POSITIVE_INFINITY) !== true) {
28 $ERROR('#4: NaN % Infinity === Not-a-Number. Actual: ' + (NaN % Infinity));
29 }
31 //CHECK#5
32 if (isNaN(Number.NaN % Number.NEGATIVE_INFINITY) !== true) {
33 $ERROR('#5: NaN % -Infinity === Not-a-Number. Actual: ' + (NaN % -Infinity));
34 }
36 //CHECK#6
37 if (isNaN(Number.NaN % Number.MAX_VALUE) !== true) {
38 $ERROR('#6: NaN % Number.MAX_VALUE === Not-a-Number. Actual: ' + (NaN % Number.MAX_VALUE));
39 }
41 //CHECK#7
42 if (isNaN(Number.NaN % Number.MIN_VALUE) !== true) {
43 $ERROR('#7: NaN % Number.MIN_VALUE === Not-a-Number. Actual: ' + (NaN % Number.MIN_VALUE));
44 }
46 //CHECK#8
47 if (isNaN(Number.NaN % 1) !== true) {
48 $ERROR('#8: NaN % 1 === Not-a-Number. Actual: ' + (NaN % 1));
49 }