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

Side by Side Diff: tests/compiler/dart2js/kernel/compile_from_dill_test.dart

Issue 2954663002: Handle break as continue (Closed)
Patch Set: Add break/continue to run_from_dill_test Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Partial test that the closed world computed from [WorldImpact]s derived from 5 // Partial test that the closed world computed from [WorldImpact]s derived from
6 // kernel is equivalent to the original computed from resolution. 6 // kernel is equivalent to the original computed from resolution.
7 library dart2js.kernel.compile_from_dill_test; 7 library dart2js.kernel.compile_from_dill_test;
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 import 'dart:io'; 10 import 'dart:io';
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 new Class(''); 49 new Class('');
50 Class.staticField; 50 Class.staticField;
51 var x = null; 51 var x = null;
52 var y1 = x == null; 52 var y1 = x == null;
53 var y2 = null == x; 53 var y2 = null == x;
54 var z1 = x?.toString(); 54 var z1 = x?.toString();
55 var z2 = x ?? y1; 55 var z2 = x ?? y1;
56 var z3 = x ??= y2; 56 var z3 = x ??= y2;
57 var w = x == null ? null : x.toString(); 57 var w = x == null ? null : x.toString();
58 for (int i = 0; i < 10; i++) { 58 for (int i = 0; i < 10; i++) {
59 if (i == 5) continue;
59 x = i; 60 x = i;
60 if (i == 5) break; 61 if (i == 5) break;
61 } 62 }
62 print(x); 63 print(x);
63 return x; 64 return x;
64 } 65 }
65 ''' 66 '''
66 }; 67 };
67 68
68 main(List<String> args) { 69 main(List<String> args) {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 } 201 }
201 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType]; 202 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType];
202 checkSets(map1.keys, map2.keys, 'output', equality); 203 checkSets(map1.keys, map2.keys, 'output', equality);
203 map1.forEach((String name, BufferedOutputSink output1) { 204 map1.forEach((String name, BufferedOutputSink output1) {
204 BufferedOutputSink output2 = map2[name]; 205 BufferedOutputSink output2 = map2[name];
205 Expect.stringEquals(output1.text, output2.text); 206 Expect.stringEquals(output1.text, output2.text);
206 }); 207 });
207 }); 208 });
208 return ResultKind.success; 209 return ResultKind.success;
209 } 210 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | tests/compiler/dart2js/kernel/run_from_dill_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698