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

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

Issue 1139473003: Removed CLASS_ELEMENTS from BuildCompilationUnitElementTask and cleaned up comments (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « pkg/analyzer/lib/task/general.dart ('k') | 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) 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 test_perform_library() { 199 test_perform_library() {
200 _performBuildTask(r''' 200 _performBuildTask(r'''
201 library lib; 201 library lib;
202 import 'lib2.dart'; 202 import 'lib2.dart';
203 export 'lib3.dart'; 203 export 'lib3.dart';
204 part 'part.dart'; 204 part 'part.dart';
205 class A {} 205 class A {}
206 class B = Object with A; 206 class B = Object with A;
207 '''); 207 ''');
208 expect(outputs, hasLength(3)); 208 expect(outputs, hasLength(2));
209 expect(outputs[CLASS_ELEMENTS], hasLength(2));
210 expect(outputs[COMPILATION_UNIT_ELEMENT], isNotNull); 209 expect(outputs[COMPILATION_UNIT_ELEMENT], isNotNull);
211 expect(outputs[RESOLVED_UNIT1], isNotNull); 210 expect(outputs[RESOLVED_UNIT1], isNotNull);
212 } 211 }
213 212
214 void _performBuildTask(String content) { 213 void _performBuildTask(String content) {
215 Source source = newSource('/test.dart', content); 214 Source source = newSource('/test.dart', content);
216 AnalysisTarget target = new LibrarySpecificUnit(source, source); 215 AnalysisTarget target = new LibrarySpecificUnit(source, source);
217 _computeResult(target, RESOLVED_UNIT1); 216 _computeResult(target, RESOLVED_UNIT1);
218 expect(task, new isInstanceOf<BuildCompilationUnitElementTask>()); 217 expect(task, new isInstanceOf<BuildCompilationUnitElementTask>());
219 } 218 }
(...skipping 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after
2168 /** 2167 /**
2169 * Fill [errorListener] with [result] errors in the current [task]. 2168 * Fill [errorListener] with [result] errors in the current [task].
2170 */ 2169 */
2171 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) { 2170 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) {
2172 List<AnalysisError> errors = task.outputs[result]; 2171 List<AnalysisError> errors = task.outputs[result];
2173 expect(errors, isNotNull, reason: result.name); 2172 expect(errors, isNotNull, reason: result.name);
2174 errorListener = new GatheringErrorListener(); 2173 errorListener = new GatheringErrorListener();
2175 errorListener.addAll(errors); 2174 errorListener.addAll(errors);
2176 } 2175 }
2177 } 2176 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/task/general.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698