Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/parseFloat/S15.1.2.3_A5_T3.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: Return the number value for the MV of Result(4)
6 es5id: 15.1.2.3_A5_T3
7 es6id: 18.2.4
8 esid: sec-parsefloat-string
9 description: Checking . DecimalDigits ExponentPart_opt
10 ---*/
11
12 //CHECK#1
13 if (parseFloat("+.1") !== 0.1) {
14 $ERROR('#1: parseFloat("+.1") === 0.1. Actual: ' + (parseFloat("+.1")));
15 }
16
17 //CHECK#2
18 if (parseFloat(".01") !== 0.01) {
19 $ERROR('#2: parseFloat(".01") === 0.01. Actual: ' + (parseFloat(".01")));
20 }
21
22 //CHECK#3
23 if (parseFloat("+.22e-1") !== 0.022) {
24 $ERROR('#3: parseFloat("+.22e-1") === 0.022. Actual: ' + (parseFloat("+.22e-1")));
25 }