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

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

Issue 2409473002: Fix more tests on windows bots (Closed)
Patch Set: Created 4 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 analyzer.test.src.task.dart_test; 5 library analyzer.test.src.task.dart_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/token.dart'; 8 import 'package:analyzer/dart/ast/token.dart';
9 import 'package:analyzer/dart/ast/visitor.dart'; 9 import 'package:analyzer/dart/ast/visitor.dart';
10 import 'package:analyzer/dart/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
(...skipping 3358 matching lines...) Expand 10 before | Expand all | Expand 10 after
3369 Iterable<String> shortNames = sources.map((s) => s.shortName); 3369 Iterable<String> shortNames = sources.map((s) => s.shortName);
3370 if (shortNames.length == 2) { 3370 if (shortNames.length == 2) {
3371 expect(shortNames, unorderedEquals(['core.dart', expectedShortName])); 3371 expect(shortNames, unorderedEquals(['core.dart', expectedShortName]));
3372 } else { 3372 } else {
3373 expect(shortNames, unorderedEquals([expectedShortName])); 3373 expect(shortNames, unorderedEquals([expectedShortName]));
3374 } 3374 }
3375 } 3375 }
3376 3376
3377 void _performParseTask(String content) { 3377 void _performParseTask(String content) {
3378 if (content == null) { 3378 if (content == null) {
3379 source = resourceProvider.getFile('/test.dart').createSource(); 3379 source = resourceProvider
3380 .getFile(resourceProvider.convertPath('/test.dart'))
3381 .createSource();
3380 } else { 3382 } else {
3381 source = newSource('/test.dart', content); 3383 source = newSource('/test.dart', content);
3382 } 3384 }
3383 computeResult(source, PARSED_UNIT, matcher: isParseDartTask); 3385 computeResult(source, PARSED_UNIT, matcher: isParseDartTask);
3384 } 3386 }
3385 3387
3386 static void _assertHasCore(dynamic sourceList, int lenght) { 3388 static void _assertHasCore(dynamic sourceList, int lenght) {
3387 List<Source> sources = sourceList as List<Source>; 3389 List<Source> sources = sourceList as List<Source>;
3388 expect(sources, hasLength(lenght)); 3390 expect(sources, hasLength(lenght));
3389 expect(sources, contains(predicate((Source s) { 3391 expect(sources, contains(predicate((Source s) {
(...skipping 2263 matching lines...) Expand 10 before | Expand all | Expand 10 after
5653 /** 5655 /**
5654 * Fill [errorListener] with [result] errors in the current [task]. 5656 * Fill [errorListener] with [result] errors in the current [task].
5655 */ 5657 */
5656 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) { 5658 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) {
5657 List<AnalysisError> errors = task.outputs[result] as List<AnalysisError>; 5659 List<AnalysisError> errors = task.outputs[result] as List<AnalysisError>;
5658 expect(errors, isNotNull, reason: result.name); 5660 expect(errors, isNotNull, reason: result.name);
5659 errorListener = new GatheringErrorListener(); 5661 errorListener = new GatheringErrorListener();
5660 errorListener.addAll(errors); 5662 errorListener.addAll(errors);
5661 } 5663 }
5662 } 5664 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/dart/sdk/sdk_test.dart ('k') | pkg/analyzer/test/src/task/strong/strong_test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698