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

Unified Diff: tests/language/arithmetic_test.dart

Issue 11573044: Inline Doubles truncate and round. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/arithmetic_test.dart
===================================================================
--- tests/language/arithmetic_test.dart (revision 16975)
+++ tests/language/arithmetic_test.dart (working copy)
@@ -282,18 +282,17 @@
Expect.equals(2.0, (2.1).round());
Expect.equals(-2.0, (-2.1).round());
Expect.equals(1.0, (0.5).round());
- // TODO(floitsch): enable or adapt test, once we reached conclusion on
- // b/4539188.
- // Expect.equals(-0.0, (-0.5).round());
- // TODO(srdjan): enable the following tests once isNegative works.
- // Expect.equals(true, (-0.0).round().isNegative);
- // Expect.equals(true, (-0.3).round().isNegative);
- // Expect.equals(true, (-0.5).round().isNegative);
+ Expect.equals(0.0, (0.49999999999999994).round());
+ Expect.equals(-0.0, (-0.49999999999999994).round());
+ Expect.equals(-1.0, (-0.5).round());
+ Expect.equals(true, (-0.0).round().isNegative);
+ Expect.equals(true, (-0.3).round().isNegative);
+ Expect.equals(true, (-0.5).round().isNegative);
Expect.equals(2.0, (1.5).round());
- // TODO(floitsch): enable or adapt test, once we reached conclusion on
- // b/4539188.
- // Expect.equals(-1.0, (-1.5).round());
+ Expect.equals(-2.0, (-1.5).round());
Expect.equals(1.0, (0.99).round());
+ Expect.equals(9007199254740991.0, (9007199254740991.0).round());
+ Expect.equals(-9007199254740991.0, (-9007199254740991.0).round());
// -- toInt --.
// Smi.
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698