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

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

Issue 2402883002: More test clean-up (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
« no previous file with comments | « pkg/analyzer/test/src/dart/sdk/sdk_test.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 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 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 part 'part.dart'; 920 part 'part.dart';
921 ''', 921 ''',
922 '/part.dart': ''' 922 '/part.dart': '''
923 // no part of 923 // no part of
924 ''' 924 '''
925 }); 925 });
926 _assertErrorsWithCodes([CompileTimeErrorCode.PART_OF_NON_PART]); 926 _assertErrorsWithCodes([CompileTimeErrorCode.PART_OF_NON_PART]);
927 } 927 }
928 928
929 test_perform_invalidUri_part() { 929 test_perform_invalidUri_part() {
930 String invalidUri = resourceProvider.pathContext.separator == '/'
931 ? '//////////'
932 : '\\\\\\\\\\\\';
930 _performBuildTask({ 933 _performBuildTask({
931 '/lib.dart': ''' 934 '/lib.dart': '''
932 library lib; 935 library lib;
933 part '//////////'; 936 part '$invalidUri';
934 ''' 937 '''
935 }); 938 });
936 expect(libraryElement.parts, isEmpty); 939 expect(libraryElement.parts, isEmpty);
937 } 940 }
938 941
939 test_perform_isLaunchable_inDefiningUnit() { 942 test_perform_isLaunchable_inDefiningUnit() {
940 _performBuildTask({ 943 _performBuildTask({
941 '/lib.dart': ''' 944 '/lib.dart': '''
942 library lib; 945 library lib;
943 main() { 946 main() {
(...skipping 4711 matching lines...) Expand 10 before | Expand all | Expand 10 after
5655 /** 5658 /**
5656 * Fill [errorListener] with [result] errors in the current [task]. 5659 * Fill [errorListener] with [result] errors in the current [task].
5657 */ 5660 */
5658 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) { 5661 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) {
5659 List<AnalysisError> errors = task.outputs[result] as List<AnalysisError>; 5662 List<AnalysisError> errors = task.outputs[result] as List<AnalysisError>;
5660 expect(errors, isNotNull, reason: result.name); 5663 expect(errors, isNotNull, reason: result.name);
5661 errorListener = new GatheringErrorListener(); 5664 errorListener = new GatheringErrorListener();
5662 errorListener.addAll(errors); 5665 errorListener.addAll(errors);
5663 } 5666 }
5664 } 5667 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/dart/sdk/sdk_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698