Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Number/S9.3.1_A6_T1.js

raw
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 The MV of StrUnsignedDecimalLiteral::: Infinity is 10<sup><small>10000</small></sup>
7 (a value so large that it will round to <b><tt>+&infin;</tt></b>)
8 es5id: 9.3.1_A6_T1
9 description: >
10 Compare Number('Infinity') with Number.POSITIVE_INFINITY,
11 10e10000, 10E10000 and Number("10e10000")
12 ---*/
13
14 // CHECK#1
15 if (Number("Infinity") !== Number.POSITIVE_INFINITY) {
16 $ERROR('#1: Number("Infinity") === Number.POSITIVE_INFINITY');
17 }
18
19 // CHECK#2
20 if (Number("Infinity") !== 10e10000) {
21 $ERROR('#2: Number("Infinity") === 10e10000');
22 }
23
24 // CHECK#3
25 if (Number("Infinity") !== 10E10000) {
26 $ERROR('#3: Number("Infinity") === 10E10000');
27 }
28
29 // CHECK#4
30 if (Number("Infinity") !== Number("10e10000")) {
31 $ERROR('#4: Number("Infinity") === Number("10e10000")');
32 }