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

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

Issue 2608533002: Make analyzer happy about CompilerImpl use of setupSdk. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 /// Test that the dart2js copy of [KernelVisitor] generates the expected IR as 5 /// Test that the dart2js copy of [KernelVisitor] generates the expected IR as
6 /// defined by kernel spec-mode test files. 6 /// defined by kernel spec-mode test files.
7 7
8 import 'dart:io'; 8 import 'dart:io';
9 import 'dart:async'; 9 import 'dart:async';
10 import 'package:compiler/src/compiler.dart' show Compiler; 10 import 'package:compiler/src/compiler.dart' show Compiler;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 print('--actual----------------------------------------------------'); 66 print('--actual----------------------------------------------------');
67 print(actual); 67 print(actual);
68 } 68 }
69 expect(actual, equals(expected)); 69 expect(actual, equals(expected));
70 }); 70 });
71 } 71 }
72 } 72 }
73 } 73 }
74 74
75 Future<Compiler> newCompiler() async { 75 Future<Compiler> newCompiler() async {
76 Compiler compiler = compilerFor( 76 var compiler = compilerFor(
77 options: [Flags.analyzeOnly, Flags.analyzeAll, Flags.useKernel]); 77 options: [Flags.analyzeOnly, Flags.analyzeAll, Flags.useKernel]);
78 await compiler.setupSdk(); 78 await compiler.setupSdk();
79 79
80 // The visitor no longer enqueues elements that are not reachable from the 80 // The visitor no longer enqueues elements that are not reachable from the
81 // program. The mixin-full resolution transform run by the test expects to 81 // program. The mixin-full resolution transform run by the test expects to
82 // find dart.core::Iterator. 82 // find dart.core::Iterator.
83 var core = await compiler.libraryLoader.loadLibrary(Uri.parse('dart:core')); 83 var core = await compiler.libraryLoader.loadLibrary(Uri.parse('dart:core'));
84 var cls = core.implementation.localLookup('Iterator'); 84 var cls = core.implementation.localLookup('Iterator');
85 cls.ensureResolved(compiler.resolution); 85 cls.ensureResolved(compiler.resolution);
86 return compiler; 86 return compiler;
87 } 87 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698