Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
112 changed files
with
2,959 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
test/built-ins/Number/string-numeric-separator-literal-bil-bd-nsl-bd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (C) 2017 the V8 project authors. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: prod-NumericLiteralSeparator | ||
description: > | ||
`0b` | `0B` BinaryDigit NumericLiteralSeparator BinaryDigit | ||
info: | | ||
NumericLiteralSeparator :: | ||
_ | ||
BinaryIntegerLiteral :: | ||
0b BinaryDigits | ||
0B BinaryDigits | ||
BinaryDigits :: | ||
BinaryDigit | ||
BinaryDigits BinaryDigit | ||
BinaryDigits NumericLiteralSeparator BinaryDigit | ||
BinaryDigit :: one of | ||
0 1 | ||
---*/ | ||
|
||
assert.sameValue(Number("0b0_1"), 0b01); | ||
assert.sameValue(Number("0B0_1"), 0B01); |
27 changes: 27 additions & 0 deletions
27
test/built-ins/Number/string-numeric-separator-literal-bil-bd-nsl-bds.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (C) 2017 the V8 project authors. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: prod-NumericLiteralSeparator | ||
description: > | ||
`0b` | `0B` BinaryDigit NumericLiteralSeparator BinaryDigit | ||
info: | | ||
NumericLiteralSeparator :: | ||
_ | ||
BinaryIntegerLiteral :: | ||
0b BinaryDigits | ||
0B BinaryDigits | ||
BinaryDigits :: | ||
BinaryDigit | ||
BinaryDigits BinaryDigit | ||
BinaryDigits NumericLiteralSeparator BinaryDigit | ||
BinaryDigit :: one of | ||
0 1 | ||
---*/ | ||
|
||
assert.sameValue(Number("0b0_10"), 0b010); | ||
assert.sameValue(Number("0B0_10"), 0B010); |
27 changes: 27 additions & 0 deletions
27
test/built-ins/Number/string-numeric-separator-literal-bil-bds-nsl-bd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (C) 2017 the V8 project authors. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: prod-NumericLiteralSeparator | ||
description: > | ||
`0b` | `0B` BinaryDigits NumericLiteralSeparator BinaryDigit | ||
info: | | ||
NumericLiteralSeparator :: | ||
_ | ||
BinaryIntegerLiteral :: | ||
0b BinaryDigits | ||
0B BinaryDigits | ||
BinaryDigits :: | ||
BinaryDigit | ||
BinaryDigits BinaryDigit | ||
BinaryDigits NumericLiteralSeparator BinaryDigit | ||
BinaryDigit :: one of | ||
0 1 | ||
---*/ | ||
|
||
assert.sameValue(Number("0b01_0"), 0b010); | ||
assert.sameValue(Number("0B01_0"), 0B010); |
27 changes: 27 additions & 0 deletions
27
test/built-ins/Number/string-numeric-separator-literal-bil-bds-nsl-bds.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (C) 2017 the V8 project authors. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: prod-NumericLiteralSeparator | ||
description: > | ||
`0b` | `0B` BinaryDigits NumericLiteralSeparator BinaryDigit | ||
info: | | ||
NumericLiteralSeparator :: | ||
_ | ||
BinaryIntegerLiteral :: | ||
0b BinaryDigits | ||
0B BinaryDigits | ||
BinaryDigits :: | ||
BinaryDigit | ||
BinaryDigits BinaryDigit | ||
BinaryDigits NumericLiteralSeparator BinaryDigit | ||
BinaryDigit :: one of | ||
0 1 | ||
---*/ | ||
|
||
assert.sameValue(Number("0b01_00"), 0b0100); | ||
assert.sameValue(Number("0B01_00"), 0B0100); |
26 changes: 26 additions & 0 deletions
26
test/built-ins/Number/string-numeric-separator-literal-dd-dot-dd-ep-sign-minus-dd-nsl-dd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (C) 2017 the V8 project authors. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: prod-NumericLiteralSeparator | ||
description: > | ||
DecimalDigits `.` DecimalDigits ExponentPart_opt `-` DecimalDigits | ||
info: | | ||
NumericLiteralSeparator :: | ||
_ | ||
DecimalLiteral :: | ||
DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt | ||
DecimalDigits :: | ||
... | ||
DecimalDigits NumericLiteralSeparator DecimalDigit | ||
SignedInteger :: | ||
... | ||
- DecimalDigits | ||
... | ||
---*/ | ||
|
||
assert.sameValue(Number("1.0e-1_0"), 1.0e-10); |
26 changes: 26 additions & 0 deletions
26
test/built-ins/Number/string-numeric-separator-literal-dd-dot-dd-ep-sign-minus-dds-nsl-dd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (C) 2017 the V8 project authors. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: prod-NumericLiteralSeparator | ||
description: > | ||
DecimalDigits `.` DecimalDigits ExponentPart_opt `-` DecimalDigits | ||
info: | | ||
NumericLiteralSeparator :: | ||
_ | ||
DecimalLiteral :: | ||
DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt | ||
DecimalDigits :: | ||
... | ||
DecimalDigits NumericLiteralSeparator DecimalDigit | ||
SignedInteger :: | ||
... | ||
- DecimalDigits | ||
... | ||
---*/ | ||
|
||
assert.sameValue(Number("1.0e-10_0"), 1.0e-100); |
26 changes: 26 additions & 0 deletions
26
test/built-ins/Number/string-numeric-separator-literal-dd-dot-dd-ep-sign-plus-dd-nsl-dd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (C) 2017 the V8 project authors. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: prod-NumericLiteralSeparator | ||
description: > | ||
DecimalDigits `.` DecimalDigits ExponentPart_opt `+` DecimalDigits | ||
info: | | ||
NumericLiteralSeparator :: | ||
_ | ||
DecimalLiteral :: | ||
DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt | ||
DecimalDigits :: | ||
... | ||
DecimalDigits NumericLiteralSeparator DecimalDigit | ||
SignedInteger :: | ||
... | ||
+ DecimalDigits | ||
... | ||
---*/ | ||
|
||
assert.sameValue(Number("1.0e+1_0"), 1.0e+10); |
27 changes: 27 additions & 0 deletions
27
test/built-ins/Number/string-numeric-separator-literal-dd-dot-dd-ep-sign-plus-dds-nsl-dd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (C) 2017 the V8 project authors. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: prod-NumericLiteralSeparator | ||
description: > | ||
DecimalDigits `.` DecimalDigits ExponentPart_opt `+` DecimalDigits | ||
info: | | ||
NumericLiteralSeparator :: | ||
_ | ||
DecimalLiteral :: | ||
DecimalIntegerLiteral . DecimalDigits_opt ExponentPart_opt | ||
DecimalDigits :: | ||
... | ||
DecimalDigits NumericLiteralSeparator DecimalDigit | ||
SignedInteger :: | ||
... | ||
+ DecimalDigits | ||
... | ||
---*/ | ||
|
||
assert.sameValue(Number("1.0e+10_0"), 1.0e+100); | ||
|
34 changes: 34 additions & 0 deletions
34
test/built-ins/Number/string-numeric-separator-literal-dd-nsl-dd-one-of.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (C) 2017 the V8 project authors. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: prod-NumericLiteralSeparator | ||
description: NonZeroDigit NumericLiteralSeparator DecimalDigit | ||
info: | | ||
NumericLiteralSeparator :: | ||
_ | ||
DecimalIntegerLiteral :: | ||
... | ||
NonZeroDigit NumericLiteralSeparator_opt DecimalDigits | ||
DecimalDigits :: | ||
DecimalDigit | ||
... | ||
DecimalDigit :: one of | ||
0 1 2 3 4 5 6 7 8 9 | ||
---*/ | ||
|
||
assert.sameValue(Number("1_0"), 10); | ||
assert.sameValue(Number("1_1"), 11); | ||
assert.sameValue(Number("1_2"), 12); | ||
assert.sameValue(Number("1_3"), 13); | ||
assert.sameValue(Number("1_4"), 14); | ||
assert.sameValue(Number("1_5"), 15); | ||
assert.sameValue(Number("1_6"), 16); | ||
assert.sameValue(Number("1_7"), 17); | ||
assert.sameValue(Number("1_8"), 18); | ||
assert.sameValue(Number("1_9"), 19); |
25 changes: 25 additions & 0 deletions
25
test/built-ins/Number/string-numeric-separator-literal-dds-dot-dd-nsl-dd-ep-dd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (C) 2017 the V8 project authors. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: prod-NumericLiteralSeparator | ||
description: > | ||
DecimalDigits `.` DecimalDigits NumericLiteralSeparator DecimalDigits | ||
ExponentPart SignedInteger | ||
info: | | ||
NumericLiteralSeparator :: | ||
_ | ||
DecimalLiteral :: | ||
. DecimalDigits ExponentPart_opt | ||
DecimalDigits :: | ||
... | ||
DecimalDigits NumericLiteralSeparator DecimalDigit | ||
ExponentIndicator :: one of | ||
e E | ||
---*/ | ||
|
||
assert.sameValue(Number("10.00_01e2"), 10.0001e2); |
26 changes: 26 additions & 0 deletions
26
test/built-ins/Number/string-numeric-separator-literal-dds-nsl-dd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (C) 2017 the V8 project authors. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: prod-NumericLiteralSeparator | ||
description: DecimalDigits NumericLiteralSeparator DecimalDigit | ||
info: | | ||
NumericLiteralSeparator :: | ||
_ | ||
DecimalDigits :: | ||
... | ||
DecimalDigits NumericLiteralSeparator DecimalDigit | ||
---*/ | ||
|
||
assert.sameValue(Number("123456789_0"), 1234567890); | ||
assert.sameValue(Number("123456789_1"), 1234567891); | ||
assert.sameValue(Number("123456789_2"), 1234567892); | ||
assert.sameValue(Number("123456789_3"), 1234567893); | ||
assert.sameValue(Number("123456789_4"), 1234567894); | ||
assert.sameValue(Number("123456789_5"), 1234567895); | ||
assert.sameValue(Number("123456789_6"), 1234567896); | ||
assert.sameValue(Number("123456789_7"), 1234567897); | ||
assert.sameValue(Number("123456789_8"), 1234567898); | ||
assert.sameValue(Number("123456789_9"), 1234567899); |
25 changes: 25 additions & 0 deletions
25
test/built-ins/Number/string-numeric-separator-literal-dot-dd-nsl-dd-ep.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (C) 2017 the V8 project authors. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: prod-NumericLiteralSeparator | ||
description: > | ||
`.` DecimalDigit NumericLiteralSeparator DecimalDigit ExponentPart | ||
info: | | ||
NumericLiteralSeparator :: | ||
_ | ||
DecimalLiteral :: | ||
. DecimalDigits ExponentPart_opt | ||
DecimalDigits :: | ||
DecimalDigit | ||
... | ||
DecimalDigits NumericLiteralSeparator DecimalDigit | ||
ExponentIndicator :: one of | ||
e E | ||
---*/ | ||
|
||
assert.sameValue(Number(".0_1e2"), .01e2); |
25 changes: 25 additions & 0 deletions
25
test/built-ins/Number/string-numeric-separator-literal-dot-dd-nsl-dds-ep.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (C) 2017 the V8 project authors. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: prod-NumericLiteralSeparator | ||
description: > | ||
`.` DecimalDigit NumericLiteralSeparator DecimalDigits ExponentPart | ||
info: | | ||
NumericLiteralSeparator :: | ||
_ | ||
DecimalLiteral :: | ||
. DecimalDigits ExponentPart_opt | ||
DecimalDigits :: | ||
DecimalDigit | ||
... | ||
DecimalDigits NumericLiteralSeparator DecimalDigit | ||
ExponentIndicator :: one of | ||
e E | ||
---*/ | ||
|
||
assert.sameValue(Number(".1_01e2"), .101e2); |
25 changes: 25 additions & 0 deletions
25
test/built-ins/Number/string-numeric-separator-literal-dot-dds-nsl-dd-ep.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (C) 2017 the V8 project authors. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: prod-NumericLiteralSeparator | ||
description: > | ||
`.` DecimalDigits NumericLiteralSeparator DecimalDigit ExponentPart | ||
info: | | ||
NumericLiteralSeparator :: | ||
_ | ||
DecimalLiteral :: | ||
. DecimalDigits ExponentPart_opt | ||
DecimalDigits :: | ||
DecimalDigit | ||
... | ||
DecimalDigits NumericLiteralSeparator DecimalDigit | ||
ExponentIndicator :: one of | ||
e E | ||
---*/ | ||
|
||
assert.sameValue(Number(".10_1e2"), .101e2); |
Oops, something went wrong.