| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 {}; | 47 {}; |
| 48 new Object(); | 48 new Object(); |
| 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 z = x?.toString(); | 54 var z = x?.toString(); |
| 55 var w = x == null ? null : x.toString(); | 55 var w = x == null ? null : x.toString(); |
| 56 for (int i = 0; i < 10; i++) { | 56 for (int i = 0; i < 10; i++) { |
| 57 if (i == 5) continue; |
| 57 x = i; | 58 x = i; |
| 58 if (i == 5) break; | 59 if (i == 5) break; |
| 59 } | 60 } |
| 60 print(x); | 61 print(x); |
| 61 return x; | 62 return x; |
| 62 } | 63 } |
| 63 ''' | 64 ''' |
| 64 }; | 65 }; |
| 65 | 66 |
| 66 main(List<String> args) { | 67 main(List<String> args) { |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 } | 199 } |
| 199 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType]; | 200 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType]; |
| 200 checkSets(map1.keys, map2.keys, 'output', equality); | 201 checkSets(map1.keys, map2.keys, 'output', equality); |
| 201 map1.forEach((String name, BufferedOutputSink output1) { | 202 map1.forEach((String name, BufferedOutputSink output1) { |
| 202 BufferedOutputSink output2 = map2[name]; | 203 BufferedOutputSink output2 = map2[name]; |
| 203 Expect.stringEquals(output1.text, output2.text); | 204 Expect.stringEquals(output1.text, output2.text); |
| 204 }); | 205 }); |
| 205 }); | 206 }); |
| 206 return ResultKind.success; | 207 return ResultKind.success; |
| 207 } | 208 } |
| OLD | NEW |