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

Unified Diff: tests/language/src/ToStringAsFixedTest.dart

Issue 8728006: Implement Double.toStringAsFixed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Break 80+ line. Created 9 years 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 | « tests/co19/co19-runtime.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/ToStringAsFixedTest.dart
diff --git a/tests/language/src/ToStringAsFixedTest.dart b/tests/language/src/ToStringAsFixedTest.dart
index a07cb5bcfb6854e5ece76d6b976fab5df1aa23b2..01ae36c3ba44d8ebd7227c93fb8e8e75296e1e97 100644
--- a/tests/language/src/ToStringAsFixedTest.dart
+++ b/tests/language/src/ToStringAsFixedTest.dart
@@ -62,9 +62,9 @@ class ToStringAsFixedTest {
Expect.equals("-0.00000006", (-0.00000006).toStringAsFixed(8));
Expect.equals("-0.000000060", (-0.00000006).toStringAsFixed(9));
Expect.equals("-0.0000000600", (-0.00000006).toStringAsFixed(10));
- Expect.equals("0", (-0.0).toStringAsFixed(0));
- Expect.equals("0.0", (-0.0).toStringAsFixed(1));
- Expect.equals("0.00", (-0.0).toStringAsFixed(2));
+ Expect.equals("-0", (-0.0).toStringAsFixed(0));
antonm 2011/12/12 13:23:59 just FYI: those expectations were taken from v8 te
floitsch 2011/12/13 16:49:02 This change is on purpose. Afaik there is no good
antonm 2011/12/14 06:44:44 It's up to you. For v8 we're bug-to-bug compatibl
floitsch 2011/12/14 09:23:49 We should be able to intercept the toString case o
+ Expect.equals("-0.0", (-0.0).toStringAsFixed(1));
+ Expect.equals("-0.00", (-0.0).toStringAsFixed(2));
Expect.equals("1000", 1000.0.toStringAsFixed(0));
Expect.equals("0", 0.00001.toStringAsFixed(0));
« no previous file with comments | « tests/co19/co19-runtime.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698