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

Unified Diff: tests/language/for_test.dart

Issue 17491003: Fix a bug in graph construction for for loops. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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_builder.cc ('K') | « runtime/vm/flow_graph_builder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/for_test.dart
diff --git a/tests/language/for_test.dart b/tests/language/for_test.dart
index 8576acb602ef9848b6e4f0f3cfa2737ef4504ad9..96773998d0144803d76576db0cca8ceb1a579759 100644
--- a/tests/language/for_test.dart
+++ b/tests/language/for_test.dart
@@ -31,6 +31,20 @@ class Helper {
}
return i;
}
+
+ static var status;
+ static void f5() {
+ status = 0;
+ for (var stop = false;;) {
+ if (stop) {
+ break;
+ } else {
+ stop = true;
+ continue;
+ }
+ }
filemon 2013/06/20 10:37:01 Does this test fail before patching? I mean, with
Kevin Millikin (Google) 2013/06/20 10:48:45 Yeah, it crashes without the fix. We should reall
filemon 2013/06/27 11:44:06 Hi, I wrote a simple script to generate loops: htt
+ status = 1;
+ }
}
class ForTest {
@@ -50,6 +64,9 @@ class ForTest {
Expect.equals(1, Helper.f4(1));
Expect.equals(6, Helper.f4(6));
Expect.equals(6, Helper.f4(10));
+
+ Helper.f5();
+ Expect.equals(1, Helper.status);
}
}
« runtime/vm/flow_graph_builder.cc ('K') | « runtime/vm/flow_graph_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698