Wed, 31 Dec 2014 13:27:57 +0100
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 result of division is determined by the specification of IEEE 754 arithmetics
6 *
7 * @path ch11/11.5/11.5.2/S11.5.2_A4_T1.1.js
8 * @description If left 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 }