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

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

Issue 1124003007: In the new task model, use explicit dependencies on the type provider. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reformat Created 5 years, 7 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 | Annotate | Revision Log
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 2349 matching lines...) Expand 10 before | Expand all | Expand 10 after
2360 } 2360 }
2361 2361
2362 void setUp() { 2362 void setUp() {
2363 super.setUp(); 2363 super.setUp();
2364 emptySource = newSource('/test.dart'); 2364 emptySource = newSource('/test.dart');
2365 } 2365 }
2366 2366
2367 void _computeResult(AnalysisTarget target, ResultDescriptor result) { 2367 void _computeResult(AnalysisTarget target, ResultDescriptor result) {
2368 oldOutputs = outputs; 2368 oldOutputs = outputs;
2369 task = analysisDriver.computeResult(target, result); 2369 task = analysisDriver.computeResult(target, result);
2370 expect(task, isNotNull);
2370 expect(task.caughtException, isNull); 2371 expect(task.caughtException, isNull);
2371 outputs = task.outputs; 2372 outputs = task.outputs;
2372 } 2373 }
2373 2374
2374 /** 2375 /**
2375 * Fill [errorListener] with [result] errors in the current [task]. 2376 * Fill [errorListener] with [result] errors in the current [task].
2376 */ 2377 */
2377 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) { 2378 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) {
2378 List<AnalysisError> errors = task.outputs[result]; 2379 List<AnalysisError> errors = task.outputs[result];
2379 expect(errors, isNotNull, reason: result.name); 2380 expect(errors, isNotNull, reason: result.name);
2380 errorListener = new GatheringErrorListener(); 2381 errorListener = new GatheringErrorListener();
2381 errorListener.addAll(errors); 2382 errorListener.addAll(errors);
2382 } 2383 }
2383 } 2384 }
OLDNEW
« pkg/analyzer/lib/src/task/manager.dart ('K') | « pkg/analyzer/lib/src/task/manager.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698