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 * Result of boolean conversion from number value is false if the argument is +0, -0, or NaN; otherwise, is true
6 *
7 * @path ch09/9.2/S9.2_A4_T4.js
8 * @description Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY,
9 * Number.MAX_VALUE, Number.MIN_VALUE and some other numbers are converted to Boolean by implicit transformation
10 */
12 // CHECK#1
13 if (!(Number.POSITIVE_INFINITY) !== false) {
14 $ERROR('#1: !(+Infinity) === false. Actual: ' + (!(+Infinity)));
15 }
17 // CHECK#2;
18 if (!(Number.NEGATIVE_INFINITY) !== false) {
19 $ERROR('#2: !(-Infinity) === false. Actual: ' + (!(-Infinity)));
20 }
22 // CHECK#3
23 if (!(Number.MAX_VALUE) !== false) {
24 $ERROR('#3: !(Number.MAX_VALUE) === false. Actual: ' + (!(Number.MAX_VALUE)));
25 }
27 // CHECK#4
28 if (!(Number.MIN_VALUE) !== false) {
29 $ERROR('#4: !(Number.MIN_VALUE) === false. Actual: ' + (!(Number.MIN_VALUE)));
30 }
32 // CHECK#5
33 if (!(13) !== false) {
34 $ERROR('#5: !(13) === false. Actual: ' + (!(13)));
35 }
37 // CHECK#6
38 if (!(-13) !== false) {
39 $ERROR('#6: !(-13) === false. Actual: ' + (!(-13)));
40 }
42 // CHECK#7
43 if (!(1.3) !== false) {
44 $ERROR('#7: !(1.3) === false. Actual: ' + (!(1.3)));
45 }
47 // CHECK#8
48 if (!(-1.3) !== false) {
49 $ERROR('#8: !(-1.3) === false. Actual: ' + (!(-1.3)));
50 }