tests/auto/qml/ecmascripttests/test262/test/built-ins/BigInt/constructor-empty-string.js
raw| 1 | // Copyright (C) 2017 Caio Lima. All rights reserved. |
| 2 | // This code is governed by the BSD license found in the LICENSE file. |
| 3 | |
| 4 | /*--- |
| 5 | description: Empty String should in BigInt should result into 0n |
| 6 | esid: sec-string-to-bigint |
| 7 | info: | |
| 8 | Apply the algorithm in 3.1.3.1 with the following changes: |
| 9 | |
| 10 | EDITOR'S NOTE StringToBigInt("") is 0n according to the logic in 3.1.3.1. |
| 11 | |
| 12 | features: [BigInt] |
| 13 | ---*/ |
| 14 | |
| 15 | assert.sameValue(BigInt(""), 0n); |
| 16 | assert.sameValue(BigInt(" "), 0n); |