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

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

Issue 2954123002: Remove special casing of == null (Closed)
Patch Set: 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
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 z = x?.toString();
55 var w = x == null ? null : x.toString();
Siggi Cherem (dart-lang) 2017/06/23 20:43:37 with your change, is `x ?? y` and `x ??= y` handle
Johnni Winther 2017/06/26 10:47:40 Yes. Tests added.
52 for (int i = 0; i < 10; i++) { 56 for (int i = 0; i < 10; i++) {
53 x = i; 57 x = i;
54 if (i == 5) break; 58 if (i == 5) break;
55 } 59 }
60 print(x);
56 return x; 61 return x;
57 } 62 }
58 ''' 63 '''
59 }; 64 };
60 65
61 main(List<String> args) { 66 main(List<String> args) {
62 asyncTest(() async { 67 asyncTest(() async {
63 await mainInternal(args); 68 await mainInternal(args);
64 }); 69 });
65 } 70 }
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } 198 }
194 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType]; 199 Map<String, BufferedOutputSink> map2 = collector2.outputMap[outputType];
195 checkSets(map1.keys, map2.keys, 'output', equality); 200 checkSets(map1.keys, map2.keys, 'output', equality);
196 map1.forEach((String name, BufferedOutputSink output1) { 201 map1.forEach((String name, BufferedOutputSink output1) {
197 BufferedOutputSink output2 = map2[name]; 202 BufferedOutputSink output2 = map2[name];
198 Expect.stringEquals(output1.text, output2.text); 203 Expect.stringEquals(output1.text, output2.text);
199 }); 204 });
200 }); 205 });
201 return ResultKind.success; 206 return ResultKind.success;
202 } 207 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698