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

Side by Side Diff: pkg/analyzer/test/src/task/dart_test.dart

Issue 1405963005: Create `loadLibrary` function element eagerly. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library test.src.task.dart_test; 5 library test.src.task.dart_test;
6 6
7 import 'package:analyzer/src/context/cache.dart'; 7 import 'package:analyzer/src/context/cache.dart';
8 import 'package:analyzer/src/generated/ast.dart'; 8 import 'package:analyzer/src/generated/ast.dart';
9 import 'package:analyzer/src/generated/constant.dart'; 9 import 'package:analyzer/src/generated/constant.dart';
10 import 'package:analyzer/src/generated/element.dart'; 10 import 'package:analyzer/src/generated/element.dart';
(...skipping 3190 matching lines...) Expand 10 before | Expand all | Expand 10 after
3201 // validate 3201 // validate
3202 LibraryElement library = outputs[LIBRARY_ELEMENT5]; 3202 LibraryElement library = outputs[LIBRARY_ELEMENT5];
3203 { 3203 {
3204 ClassElement classB = library.getType('B'); 3204 ClassElement classB = library.getType('B');
3205 expect(classB.supertype.displayName, 'A'); 3205 expect(classB.supertype.displayName, 'A');
3206 } 3206 }
3207 { 3207 {
3208 ClassElement classC = library.getType('C'); 3208 ClassElement classC = library.getType('C');
3209 expect(classC.supertype.displayName, 'A'); 3209 expect(classC.supertype.displayName, 'A');
3210 } 3210 }
3211 expect(library.loadLibraryFunction, isNotNull);
3211 } 3212 }
3212 3213
3213 test_perform_external() { 3214 test_perform_external() {
3214 Source sourceA = newSource( 3215 Source sourceA = newSource(
3215 '/a.dart', 3216 '/a.dart',
3216 ''' 3217 '''
3217 library a; 3218 library a;
3218 import 'b.dart'; 3219 import 'b.dart';
3219 class A extends B {} 3220 class A extends B {}
3220 '''); 3221 ''');
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
4308 /** 4309 /**
4309 * Fill [errorListener] with [result] errors in the current [task]. 4310 * Fill [errorListener] with [result] errors in the current [task].
4310 */ 4311 */
4311 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) { 4312 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) {
4312 List<AnalysisError> errors = task.outputs[result]; 4313 List<AnalysisError> errors = task.outputs[result];
4313 expect(errors, isNotNull, reason: result.name); 4314 expect(errors, isNotNull, reason: result.name);
4314 errorListener = new GatheringErrorListener(); 4315 errorListener = new GatheringErrorListener();
4315 errorListener.addAll(errors); 4316 errorListener.addAll(errors);
4316 } 4317 }
4317 } 4318 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698