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

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

Issue 2954123002: Remove special casing of == null (Closed)
Patch Set: Updated cf. comments Created 3 years, 5 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 | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.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 // 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 main() { 43 main() {
44 foo(); 44 foo();
45 bar(true); 45 bar(true);
46 []; 46 [];
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;
53 var y2 = null == x;
54 var z1 = x?.toString();
55 var z2 = x ?? y1;
56 var z3 = x ??= y2;
57 var w = x == null ? null : x.toString();
52 for (int i = 0; i < 10; i++) { 58 for (int i = 0; i < 10; i++) {
53 x = i; 59 x = i;
54 if (i == 5) break; 60 if (i == 5) break;
55 } 61 }
62 print(x);
56 return x; 63 return x;
57 } 64 }
58 ''' 65 '''
59 }; 66 };
60 67
61 main(List<String> args) { 68 main(List<String> args) {
62 asyncTest(() async { 69 asyncTest(() async {
63 await mainInternal(args); 70 await mainInternal(args);
64 }); 71 });
65 } 72 }
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } 200 }
194 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType]; 201 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType];
195 checkSets(map1.keys, map2.keys, 'output', equality); 202 checkSets(map1.keys, map2.keys, 'output', equality);
196 map1.forEach((String name, BufferedOutputSink output1) { 203 map1.forEach((String name, BufferedOutputSink output1) {
197 BufferedOutputSink output2 = map2[name]; 204 BufferedOutputSink output2 = map2[name];
198 Expect.stringEquals(output1.text, output2.text); 205 Expect.stringEquals(output1.text, output2.text);
199 }); 206 });
200 }); 207 });
201 return ResultKind.success; 208 return ResultKind.success;
202 } 209 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698