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

Side by Side Diff: tests/compiler/dart2js/metadata_test.dart

Issue 1417323005: Rename Compiler.runCompiler -> runInternal. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 import 'package:async_helper/async_helper.dart'; 5 import 'package:async_helper/async_helper.dart';
6 import 'package:compiler/src/constants/values.dart' 6 import 'package:compiler/src/constants/values.dart'
7 show PrimitiveConstantValue; 7 show PrimitiveConstantValue;
8 import 'package:expect/expect.dart'; 8 import 'package:expect/expect.dart';
9 import 'compiler_helper.dart'; 9 import 'compiler_helper.dart';
10 import 'package:compiler/src/parser/partial_elements.dart' show 10 import 'package:compiler/src/parser/partial_elements.dart' show
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 Uri libUri = new Uri(scheme: 'source', path: 'lib.dart'); 170 Uri libUri = new Uri(scheme: 'source', path: 'lib.dart');
171 String libSource = 'library lib;'; 171 String libSource = 'library lib;';
172 172
173 Uri uri = new Uri(scheme: 'source', path: 'main.dart'); 173 Uri uri = new Uri(scheme: 'source', path: 'main.dart');
174 174
175 var compiler = compilerFor(source, uri) 175 var compiler = compilerFor(source, uri)
176 ..registerSource(partUri, partSource) 176 ..registerSource(partUri, partSource)
177 ..registerSource(libUri, libSource); 177 ..registerSource(libUri, libSource);
178 178
179 asyncTest(() => compiler.runCompiler(uri).then((_) { 179 asyncTest(() => compiler.run(uri).then((_) {
180 compiler.enqueuer.resolution.queueIsClosed = false; 180 compiler.enqueuer.resolution.queueIsClosed = false;
181 LibraryElement element = compiler.libraryLoader.lookupLibrary(uri); 181 LibraryElement element = compiler.libraryLoader.lookupLibrary(uri);
182 Expect.isNotNull(element, 'Cannot find $uri'); 182 Expect.isNotNull(element, 'Cannot find $uri');
183 183
184 List<MetadataAnnotation> metadata = extractMetadata(element); 184 List<MetadataAnnotation> metadata = extractMetadata(element);
185 Expect.equals(1, metadata.length); 185 Expect.equals(1, metadata.length);
186 186
187 PartialMetadataAnnotation annotation = metadata.first; 187 PartialMetadataAnnotation annotation = metadata.first;
188 annotation.ensureResolved(compiler.resolution); 188 annotation.ensureResolved(compiler.resolution);
189 PrimitiveConstantValue value = 189 PrimitiveConstantValue value =
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 compileAndCheckLibrary(source, 228 compileAndCheckLibrary(source,
229 (e) => e.compilationUnits.first.partTag.metadata); 229 (e) => e.compilationUnits.first.partTag.metadata);
230 } 230 }
231 231
232 void main() { 232 void main() {
233 testClassMetadata(); 233 testClassMetadata();
234 testTopLevelMethodMetadata(); 234 testTopLevelMethodMetadata();
235 testTopLevelFieldMetadata(); 235 testTopLevelFieldMetadata();
236 testLibraryTags(); 236 testLibraryTags();
237 } 237 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698