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

Unified Diff: tests/language/mint_arithmetic.dart

Issue 11017017: Fix bug with missing unboxed mint-to-double conversion. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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/flow_graph_optimizer.cc ('K') | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/mint_arithmetic.dart
===================================================================
--- tests/language/mint_arithmetic.dart (revision 13361)
+++ tests/language/mint_arithmetic.dart (working copy)
@@ -66,11 +66,20 @@
} finally { }
}
+test_func(x, y) => (x & y) + 1.0;
+
+test_mint_double_op() {
+ for (var i=0; i<10000; i++) test_func(4294967295, 1);
+ Expect.equals(2.0, test_func(4294967295, 1));
+ Expect.equals(4294967296.0, test_func(4294967295, 1));
+}
+
main() {
for (var i = 0; i < 5; i++) {
test_and_1();
test_and_2();
test_xor_1();
test_or_1();
+ test_mint_double_op();
}
}
« runtime/vm/flow_graph_optimizer.cc ('K') | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698