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

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: Created 6 years, 12 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
« src/v8natives.js ('K') | « 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..6befa1db00d7661b66aae7f920a18b066779c1ca 100644
--- a/test/mjsunit/parse-int-float.js
+++ b/test/mjsunit/parse-int-float.js
@@ -114,3 +114,10 @@ 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);
+assertEquals(Number.parseFloat('0.1'), parseFloat('0.1'));
Michael Starzinger 2014/01/07 16:08:00 The spec requires "Number.parseFloat" and "parseFl
sof 2014/01/07 21:36:29 Added
+assertEquals(Number.parseInt('0xea'), parseInt('0xEA'));
« src/v8natives.js ('K') | « test/mjsunit/number-is.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698