| 1 |
// Copyright 2009 the Sputnik authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
info: | |
| 6 |
Result of boolean conversion from number value is false if the argument |
| 7 |
is +0, -0, or NaN; otherwise, is true |
| 8 |
es5id: 9.2_A4_T2 |
| 9 |
description: +0, -0 and NaN convert to Boolean by implicit transformation |
| 10 |
---*/ |
| 11 |
|
| 12 |
// CHECK#1 |
| 13 |
if (!(+0) !== true) { |
| 14 |
$ERROR('#1: !(+0) === true. Actual: ' + (!(+0))); |
| 15 |
} |
| 16 |
|
| 17 |
// CHECK#2 |
| 18 |
if (!(-0) !== true) { |
| 19 |
$ERROR('#2: !(-0) === true. Actual: ' + (!(-0))); |
| 20 |
} |
| 21 |
|
| 22 |
// CHECK#3 |
| 23 |
if (!(Number.NaN) !== true) { |
| 24 |
$ERROR('#3: !(Number.NaN) === true. Actual: ' + (!(Number.NaN))); |
| 25 |
} |