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

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

Issue 938783003: Don't constant fold operation if result is incompatible with it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
« no previous file with comments | « tests/corelib/corelib.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/vm/regress_22480_test.dart
diff --git a/tests/language/vm/uint32_right_shift_test.dart b/tests/language/vm/regress_22480_test.dart
similarity index 56%
copy from tests/language/vm/uint32_right_shift_test.dart
copy to tests/language/vm/regress_22480_test.dart
index 6c7ae5f29cffe51453661efa53f075e075366c84..3cbe98a93d74df0fb61d5bf1e916393e9f9f0b74 100644
--- a/tests/language/vm/uint32_right_shift_test.dart
+++ b/tests/language/vm/regress_22480_test.dart
@@ -5,16 +5,16 @@
import 'package:expect/expect.dart';
-trunc(x) => x & 0xFFFFFFFF;
-
-foo(t, x) => t(x >> 15);
+test(j) {
+ var result = true;
+ j++;
+ for (var i = 0; i < 100; i++) {
+ result = (i < 50 || j < (1 << 32)) && result;
+ }
+ return result;
+}
main() {
- for (var i = 0; i < 20000; i++) {
- Expect.equals(0x00010000, foo(trunc, 0x80000000));
- }
- for (var i = 0; i < 20000; i++) {
- Expect.equals(0x10000000, foo(trunc, 0x80000000000));
- }
+ Expect.isTrue(test(30));
}
« no previous file with comments | « tests/corelib/corelib.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698