mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
LibJS: Add more number test cases for #1680
This commit is contained in:
parent
062d6af16e
commit
8f82f6c574
Notes:
sideshowbarker
2024-07-19 07:37:44 +09:00
Author: https://github.com/sunverwerth Commit: https://github.com/SerenityOS/serenity/commit/8f82f6c5749 Pull-request: https://github.com/SerenityOS/serenity/pull/1783
1 changed files with 7 additions and 0 deletions
|
@ -8,12 +8,19 @@ try {
|
|||
assert(1e3 === 1000);
|
||||
assert(1e+3 === 1000);
|
||||
assert(1e-3 === 0.001);
|
||||
assert(1. === 1);
|
||||
assert(1.e1 === 10);
|
||||
assert(.1 === 0.1);
|
||||
assert(.1e1 === 1);
|
||||
assert(0.1e1 === 1);
|
||||
assert(.1e+1 === 1);
|
||||
assert(0.1e+1 === 1);
|
||||
|
||||
Number.prototype.foo = 'LOL';
|
||||
assert(1..foo === 'LOL');
|
||||
assert(1.1.foo === 'LOL');
|
||||
assert(.1.foo === 'LOL');
|
||||
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e);
|
||||
|
|
Loading…
Add table
Reference in a new issue