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

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

Issue 3001233002: Handle labelled breaks (Closed)
Patch Set: Cleanup 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 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 // 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 main() { 158 main() {
159 var x; 159 var x;
160 int i = 0; 160 int i = 0;
161 do { 161 do {
162 if (i == 5) continue; 162 if (i == 5) continue;
163 x = i; 163 x = i;
164 if (i == 7) break; 164 if (i == 7) break;
165 i++; 165 i++;
166 } while (i < 10); 166 } while (i < 10);
167 outer: for (var a in [3, 5]) {
168 for (var b in [2, 4]) {
169 if (a == b) break outer;
170 }
171 }
167 print(x); 172 print(x);
168 } 173 }
169 ''' 174 '''
170 }, expectIdenticalOutput: false), 175 }, expectIdenticalOutput: false),
171 const Test(const { 176 const Test(const {
172 'main.dart': ''' 177 'main.dart': '''
173 class A<U,V> { 178 class A<U,V> {
174 var a = U; 179 var a = U;
175 var b = V; 180 var b = V;
176 } 181 }
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType]; 374 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType];
370 checkSets(map1.keys, map2.keys, 'output', equality); 375 checkSets(map1.keys, map2.keys, 'output', equality);
371 map1.forEach((String name, BufferedOutputSink output1) { 376 map1.forEach((String name, BufferedOutputSink output1) {
372 BufferedOutputSink output2 = map2[name]; 377 BufferedOutputSink output2 = map2[name];
373 Expect.stringEquals(output1.text, output2.text); 378 Expect.stringEquals(output1.text, output2.text);
374 }); 379 });
375 }); 380 });
376 } 381 }
377 return ResultKind.success; 382 return ResultKind.success;
378 } 383 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698