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

Unified Diff: tests/language/vm/if_conversion_vm_test.dart

Issue 23604024: Fix a compiler bug caused by Utils::IsPowerOfTwo treating zero as a power of two. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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/utils_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/vm/if_conversion_vm_test.dart
===================================================================
--- tests/language/vm/if_conversion_vm_test.dart (revision 27015)
+++ tests/language/vm/if_conversion_vm_test.dart (working copy)
@@ -40,6 +40,8 @@
f17(b) => b ? 0 : 11;
f18(b) => b ? 2 : 0;
+f19(i) => i == 0 ? 0 : 0;
+
main() {
for (var i = 0; i < 20; i++) {
f1(i);
@@ -62,6 +64,7 @@
bigPower(i);
f17(true);
f18(true);
+ f19(i);
}
Expect.equals(0, f1(0));
@@ -111,4 +114,7 @@
Expect.equals(0, f18(false));
Expect.equals(2, f18(true));
+
+ Expect.equals(0, f19(0));
+ Expect.equals(0, f19(1));
}
« no previous file with comments | « runtime/vm/utils_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698