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

Unified Diff: tests/compiler/dart2js/jumps/data/jump.dart

Issue 3001223002: Support unittest of jumps (Closed)
Patch Set: Updated cf. comments Created 3 years, 4 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
Index: tests/compiler/dart2js/jumps/data/jump.dart
diff --git a/tests/compiler/dart2js/jumps/data/jump.dart b/tests/compiler/dart2js/jumps/data/jump.dart
new file mode 100644
index 0000000000000000000000000000000000000000..10daa5ec835aaa38916190dd5992209267715492
--- /dev/null
+++ b/tests/compiler/dart2js/jumps/data/jump.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+simpleForLoop(count) {
+ for (int i = 0; i < count; i = i + 1) {
+ print(i);
+ }
+}
+
+simpleForLoopWithBreak(count) {
+ /*0@break*/ for (int i = 0; i < count; i = i + 1) {
+ if (i % 2 == 0) /*target=0*/ break;
+ print(i);
+ }
+}
+
+main() {
+ simpleForLoop(10);
+ simpleForLoopWithBreak(10);
+}
« no previous file with comments | « tests/compiler/dart2js/inference/inference_test_helper.dart ('k') | tests/compiler/dart2js/jumps/jump_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698