| OLD | NEW |
| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 if (i == 5) continue; |
| 60 x = i; | 60 x = i; |
| 61 if (i == 5) break; | 61 if (i == 5) break; |
| 62 } | 62 } |
| 63 int i = 0; |
| 64 while (i < 10) { |
| 65 if (i == 5) continue; |
| 66 x = i; |
| 67 if (i == 5) break; |
| 68 } |
| 69 for (var v in [3, 5]) { |
| 70 if (v == 5) continue; |
| 71 x = v; |
| 72 if (v == 5) break; |
| 73 } |
| 63 print(x); | 74 print(x); |
| 64 return x; | 75 return x; |
| 65 } | 76 } |
| 66 ''' | 77 ''' |
| 67 }; | 78 }; |
| 68 | 79 |
| 69 main(List<String> args) { | 80 main(List<String> args) { |
| 70 asyncTest(() async { | 81 asyncTest(() async { |
| 71 await mainInternal(args); | 82 await mainInternal(args); |
| 72 }); | 83 }); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 } | 212 } |
| 202 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType]; | 213 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType]; |
| 203 checkSets(map1.keys, map2.keys, 'output', equality); | 214 checkSets(map1.keys, map2.keys, 'output', equality); |
| 204 map1.forEach((String name, BufferedOutputSink output1) { | 215 map1.forEach((String name, BufferedOutputSink output1) { |
| 205 BufferedOutputSink output2 = map2[name]; | 216 BufferedOutputSink output2 = map2[name]; |
| 206 Expect.stringEquals(output1.text, output2.text); | 217 Expect.stringEquals(output1.text, output2.text); |
| 207 }); | 218 }); |
| 208 }); | 219 }); |
| 209 return ResultKind.success; | 220 return ResultKind.success; |
| 210 } | 221 } |
| OLD | NEW |