tonumber-numeric-separator-literal-dds-nsl-dd.js (990B)
1 // Copyright (C) 2017 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 esid: sec-tonumber-applied-to-the-string-type 6 description: > 7 The NSL does not affect strings parsed by parseFloat - StrDecimalDigits 8 info: | 9 StrDecimalDigits ::: 10 DecimalDigit 11 StrDecimalDigits DecimalDigit 12 13 features: [numeric-separator-literal] 14 ---*/ 15 16 assert.sameValue(parseFloat("123456789_0"), 123456789); 17 assert.sameValue(parseFloat("123456789_1"), 123456789); 18 assert.sameValue(parseFloat("123456789_2"), 123456789); 19 assert.sameValue(parseFloat("123456789_3"), 123456789); 20 assert.sameValue(parseFloat("123456789_4"), 123456789); 21 assert.sameValue(parseFloat("123456789_5"), 123456789); 22 assert.sameValue(parseFloat("123456789_6"), 123456789); 23 assert.sameValue(parseFloat("123456789_7"), 123456789); 24 assert.sameValue(parseFloat("123456789_8"), 123456789); 25 assert.sameValue(parseFloat("123456789_9"), 123456789); 26 27 reportCompare(0, 0);