Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Unified Diff: test/mjsunit/parse-int-float.js

Issue 124573002: Upgrade Number constructor to ES6. (Closed) Base URL: git://github.com/v8/v8.git@bleeding_edge
Patch Set: Various code improvements Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/number-is.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/parse-int-float.js
diff --git a/test/mjsunit/parse-int-float.js b/test/mjsunit/parse-int-float.js
index 5a9b6f33ccb59aea61ab7e080a8c2abec5b8389e..a0f50392303f80ef7f54f588174a0d71879c3ea0 100644
--- a/test/mjsunit/parse-int-float.js
+++ b/test/mjsunit/parse-int-float.js
@@ -114,3 +114,12 @@ assertEquals(state, "throwingString");
state = null;
try { parseInt(throwingString, throwingRadix); } catch (e) {}
assertEquals(state, "throwingString");
+
+// And finally, check that the Harmony additions to the Number
+// constructor is available:
+assertTrue("parseInt" in Number);
+assertTrue("parseFloat" in Number);
+assertSame( Number.parseInt, parseInt);
+assertSame(Number.parseFloat, parseFloat);
+assertEquals(Number.parseFloat('0.1'), parseFloat('0.1'));
+assertEquals(Number.parseInt('0xea'), parseInt('0xEA'));
« no previous file with comments | « test/mjsunit/number-is.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698