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

Unified Diff: test/mjsunit/str-to-num.js

Issue 1269003: Revert revisions 4241, 4243 and 4247 because of Windows build errors... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 9 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/cctest/test-conversions.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/str-to-num.js
===================================================================
--- test/mjsunit/str-to-num.js (revision 4248)
+++ test/mjsunit/str-to-num.js (working copy)
@@ -29,23 +29,8 @@
return Number(val);
}
-function repeat(s, num) {
- var result = '';
- while (num > 0) {
- if ((num & 1) != 0) result += s;
- s += s;
- num >>= 1;
- }
-
- return result;
-}
-
-assertEquals('0000000000', repeat('0', 10));
-
// assertEquals(, toNumber());
-assertEquals(1, 1.);
-assertEquals(1, toNumber("1."));
assertEquals(123, toNumber(" 123"));
assertEquals(123, toNumber("\n123"));
@@ -76,7 +61,6 @@
assertEquals(0, toNumber("0"));
assertEquals(0, toNumber("+0"));
assertEquals(-0, toNumber("-0"));
-assertEquals(-Infinity, 1 / toNumber("-0"));
assertEquals(1, toNumber("1"));
assertEquals(1, toNumber("+1"));
@@ -146,16 +130,11 @@
assertEquals(15, toNumber("0XF"));
assertEquals(0, toNumber("0x000"));
-assertEquals(-Infinity, 1 / toNumber("-0x000"));
-assertEquals(0, toNumber("0x000" + repeat('0', 1000)));
assertEquals(9, toNumber("0x009"));
assertEquals(10, toNumber("0x00a"));
assertEquals(10, toNumber("0x00A"));
assertEquals(15, toNumber("0x00f"));
assertEquals(15, toNumber("0x00F"));
-assertEquals(Infinity, toNumber("0x" + repeat('0', 1000) + '1'
- + repeat('0', 1000)));
-assertEquals(-Infinity, toNumber("-0x1" + repeat('0', 1000)));
assertEquals(0, toNumber("00"));
assertEquals(1, toNumber("01"));
@@ -177,6 +156,3 @@
assertTrue(isNaN(toNumber("100.0 junk")), "100.0 junk");
assertTrue(isNaN(toNumber(".1e4 junk")), ".1e4 junk");
assertTrue(isNaN(toNumber("Infinity junk")), "Infinity junk");
-assertTrue(isNaN(toNumber("1e")), "1e");
-assertTrue(isNaN(toNumber("1e ")), "1e_");
-assertTrue(isNaN(toNumber("1" + repeat('0', 1000) + 'junk')), "1e1000 junk");
« no previous file with comments | « test/cctest/test-conversions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698