| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |