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

Unified Diff: tests/compiler/dart2js/kernel/run_from_dill_test.dart

Issue 2954663002: Handle break as continue (Closed)
Patch Set: Add break/continue to run_from_dill_test Created 3 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
« no previous file with comments | « tests/compiler/dart2js/kernel/compile_from_dill_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/kernel/run_from_dill_test.dart
diff --git a/tests/compiler/dart2js/kernel/run_from_dill_test.dart b/tests/compiler/dart2js/kernel/run_from_dill_test.dart
index 2d28c684c817238fb1d0dc45cdf2c7f86e5f0abc..617e3dd8c015a80f1b3b8c436bfcd17fa5815534 100644
--- a/tests/compiler/dart2js/kernel/run_from_dill_test.dart
+++ b/tests/compiler/dart2js/kernel/run_from_dill_test.dart
@@ -21,11 +21,25 @@ import '../serialization/helper.dart';
const SOURCE = const {
'main.dart': '''
main() {
- print('Hello World!');
+ for (int i = 0; i < 10; i++) {
+ if (i == 5) continue;
+ print('Hello World: \$i!');
+ if (i == 7) break;
+ }
}
'''
};
+const OUTPUT = '''
+Hello World: 0!
+Hello World: 1!
+Hello World: 2!
+Hello World: 3!
+Hello World: 4!
+Hello World: 6!
+Hello World: 7!
+''';
+
main(List<String> args) {
asyncTest(() async {
await mainInternal(args);
@@ -69,6 +83,7 @@ Future<ResultKind> mainInternal(List<String> args,
print('d8 output:');
print(out);
Expect.equals(0, runResult.exitCode);
+ Expect.equals(OUTPUT, runResult.stdout.replaceAll('\r\n', '\n'));
return ResultKind.success;
}
« no previous file with comments | « tests/compiler/dart2js/kernel/compile_from_dill_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698