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

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

Issue 3007783004: Handle switch continue (Closed)
Patch Set: Updated cf. comment Created 3 years, 3 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
« no previous file with comments | « tests/compiler/dart2js/jumps/jump_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Helper to test compilation equivalence between source and .dill based 5 // Helper to test compilation equivalence between source and .dill based
6 // compilation. 6 // compilation.
7 library dart2js.kernel.compile_from_dill_test_helper; 7 library dart2js.kernel.compile_from_dill_test_helper;
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 10
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 if (a == b) break outer3; 179 if (a == b) break outer3;
180 if (a != b) continue outer3; 180 if (a != b) continue outer3;
181 } 181 }
182 } 182 }
183 print(x); 183 print(x);
184 } 184 }
185 ''' 185 '''
186 }, expectIdenticalOutput: false), 186 }, expectIdenticalOutput: false),
187 const Test(const { 187 const Test(const {
188 'main.dart': ''' 188 'main.dart': '''
189 main() {
190 var x = 42;
191 int i = 0;
192 switch (i) {
193 case 0:
194 print(x);
195 continue label1;
196 label1:
197 case 1:
198 print(x);
199 break;
200 }
201 }
202 '''
203 }, expectIdenticalOutput: false),
204 const Test(const {
205 'main.dart': '''
189 class A<U,V> { 206 class A<U,V> {
190 var a = U; 207 var a = U;
191 var b = V; 208 var b = V;
192 } 209 }
193 class B<Q, R> extends A<R, W<Q>> { 210 class B<Q, R> extends A<R, W<Q>> {
194 } 211 }
195 class C<Y> extends B<Y, W<Y>> { 212 class C<Y> extends B<Y, W<Y>> {
196 } 213 }
197 class W<Z> {} 214 class W<Z> {}
198 main() { 215 main() {
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType]; 439 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType];
423 checkSets(map1.keys, map2.keys, 'output', equality); 440 checkSets(map1.keys, map2.keys, 'output', equality);
424 map1.forEach((String name, BufferedOutputSink output1) { 441 map1.forEach((String name, BufferedOutputSink output1) {
425 BufferedOutputSink output2 = map2[name]; 442 BufferedOutputSink output2 = map2[name];
426 Expect.stringEquals(output1.text, output2.text); 443 Expect.stringEquals(output1.text, output2.text);
427 }); 444 });
428 }); 445 });
429 } 446 }
430 return ResultKind.success; 447 return ResultKind.success;
431 } 448 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/jumps/jump_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698