From 8f82f6c57490a58781969a8dcf9f3f2083ba6197 Mon Sep 17 00:00:00 2001 From: Stephan Unverwerth Date: Mon, 13 Apr 2020 16:56:20 +0200 Subject: LibJS: Add more number test cases for #1680 --- Libraries/LibJS/Tests/numeric-literals-basic.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Libraries/LibJS') 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); -- cgit v1.2.3