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

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

Issue 9338002: Fixed a bug in isNegate intrinsified code, fixed negation for doubles (handling of negative zeros... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 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
« runtime/vm/disassembler_ia32.cc ('K') | « tests/language/language.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/ArithmeticTest.dart
===================================================================
--- tests/language/src/ArithmeticTest.dart (revision 3960)
+++ tests/language/src/ArithmeticTest.dart (working copy)
@@ -137,6 +137,16 @@
Expect.equals(false, (2.0).isNegative());
Expect.equals(true, (-2.0).isNegative());
+ double negateDouble(double x) {
+ return -x;
+ }
+
+ Expect.isTrue(negateDouble(0.0).isNegative());
+ Expect.isFalse(negateDouble(-0.0).isNegative());
+ Expect.isTrue(negateDouble(3.5e3).isNegative());
+ Expect.isFalse(negateDouble(-3.5e3).isNegative());
+
+
// Constants.
final nan = 0.0/0.0;
final infinity = 1.0/0.0;
« runtime/vm/disassembler_ia32.cc ('K') | « tests/language/language.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698