mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
Everywhere: Hoist the Libraries folder to the top-level
This commit is contained in:
parent
950e819ee7
commit
93712b24bf
Notes:
github-actions[bot]
2024-11-10 11:51:52 +00:00
Author: https://github.com/trflynn89
Commit: 93712b24bf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2256
Reviewed-by: https://github.com/sideshowbarker
4547 changed files with 104 additions and 113 deletions
26
Libraries/LibJS/Tests/syntax/numeric-separator.js
Normal file
26
Libraries/LibJS/Tests/syntax/numeric-separator.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
describe("numeric separators", () => {
|
||||
test("numeric separator works for 'normal' number", () => {
|
||||
expect("1_2").toEvalTo(12);
|
||||
expect("4_2.4_2").toEvalTo(42.42);
|
||||
expect("1_2e0_2").toEvalTo(1200);
|
||||
|
||||
expect("1_2E+_1").not.toEval();
|
||||
expect("1_2E+0_1").toEvalTo(120);
|
||||
});
|
||||
|
||||
test("cannot use numeric separator after .", () => {
|
||||
expect("4._3").not.toEval();
|
||||
expect("0._3").not.toEval();
|
||||
expect("1_.3._3").not.toEval();
|
||||
|
||||
// Actually a valid attempt to get property '_3' on 1.3 which fails but does parse.
|
||||
expect("1.3._3").toEval();
|
||||
});
|
||||
|
||||
test("cannot use numeric separator in octal escaped number", () => {
|
||||
expect("00_1").not.toEval();
|
||||
expect("01_1").not.toEval();
|
||||
expect("07_3").not.toEval();
|
||||
expect("00_1").not.toEval();
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue