diff options
author | Stephan Unverwerth <s.unverwerth@gmx.de> | 2020-04-13 16:56:20 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-13 17:23:22 +0200 |
commit | 8f82f6c57490a58781969a8dcf9f3f2083ba6197 (patch) | |
tree | d665ad25bf9267c46eecd29165fae207acbece64 /Libraries/LibJS | |
parent | 062d6af16edffa180eba55f6ff2c774c04242963 (diff) | |
download | serenity-8f82f6c57490a58781969a8dcf9f3f2083ba6197.zip |
LibJS: Add more number test cases for #1680
Diffstat (limited to 'Libraries/LibJS')
-rw-r--r-- | Libraries/LibJS/Tests/numeric-literals-basic.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Libraries/LibJS/Tests/numeric-literals-basic.js b/Libraries/LibJS/Tests/numeric-literals-basic.js index 816d309aed..3cf308d2ce 100644 --- a/Libraries/LibJS/Tests/numeric-literals-basic.js +++ b/Libraries/LibJS/Tests/numeric-literals-basic.js @@ -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); |