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

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

Issue 1382403002: Clean up hints (Closed) Base URL: https://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 2869 matching lines...) Expand 10 before | Expand all | Expand 10 after
2880 '''); 2880 ''');
2881 computeResult( 2881 computeResult(
2882 new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT8); 2882 new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT8);
2883 CompilationUnit unit1 = outputs[RESOLVED_UNIT8]; 2883 CompilationUnit unit1 = outputs[RESOLVED_UNIT8];
2884 computeResult( 2884 computeResult(
2885 new LibrarySpecificUnit(secondSource, secondSource), RESOLVED_UNIT8); 2885 new LibrarySpecificUnit(secondSource, secondSource), RESOLVED_UNIT8);
2886 CompilationUnit unit2 = outputs[RESOLVED_UNIT8]; 2886 CompilationUnit unit2 = outputs[RESOLVED_UNIT8];
2887 2887
2888 InterfaceType intType = context.typeProvider.intType; 2888 InterfaceType intType = context.typeProvider.intType;
2889 InterfaceType stringType = context.typeProvider.stringType; 2889 InterfaceType stringType = context.typeProvider.stringType;
2890 DartType dynamicType = context.typeProvider.dynamicType;
2891 2890
2892 assertVariableDeclarationTypes( 2891 assertVariableDeclarationTypes(
2893 getTopLevelVariable(unit1, "x"), intType, intType); 2892 getTopLevelVariable(unit1, "x"), intType, intType);
2894 assertVariableDeclarationTypes( 2893 assertVariableDeclarationTypes(
2895 getFieldInClass(unit1, "A", "x"), intType, intType); 2894 getFieldInClass(unit1, "A", "x"), intType, intType);
2896 2895
2897 assertVariableDeclarationTypes( 2896 assertVariableDeclarationTypes(
2898 getTopLevelVariable(unit2, "y"), intType, intType); 2897 getTopLevelVariable(unit2, "y"), intType, intType);
2899 assertVariableDeclarationTypes( 2898 assertVariableDeclarationTypes(
2900 getFieldInClass(unit2, "B", "y"), intType, intType); 2899 getFieldInClass(unit2, "B", "y"), intType, intType);
(...skipping 30 matching lines...) Expand all
2931 } 2930 }
2932 '''); 2931 ''');
2933 computeResult( 2932 computeResult(
2934 new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT8); 2933 new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT8);
2935 CompilationUnit unit1 = outputs[RESOLVED_UNIT8]; 2934 CompilationUnit unit1 = outputs[RESOLVED_UNIT8];
2936 computeResult( 2935 computeResult(
2937 new LibrarySpecificUnit(secondSource, secondSource), RESOLVED_UNIT8); 2936 new LibrarySpecificUnit(secondSource, secondSource), RESOLVED_UNIT8);
2938 CompilationUnit unit2 = outputs[RESOLVED_UNIT8]; 2937 CompilationUnit unit2 = outputs[RESOLVED_UNIT8];
2939 2938
2940 InterfaceType intType = context.typeProvider.intType; 2939 InterfaceType intType = context.typeProvider.intType;
2941 InterfaceType stringType = context.typeProvider.stringType;
2942 2940
2943 assertVariableDeclarationTypes( 2941 assertVariableDeclarationTypes(
2944 getTopLevelVariable(unit1, "x"), intType, intType); 2942 getTopLevelVariable(unit1, "x"), intType, intType);
2945 assertVariableDeclarationTypes( 2943 assertVariableDeclarationTypes(
2946 getFieldInClass(unit1, "A", "x"), intType, intType); 2944 getFieldInClass(unit1, "A", "x"), intType, intType);
2947 2945
2948 assertVariableDeclarationTypes( 2946 assertVariableDeclarationTypes(
2949 getTopLevelVariable(unit2, "y"), intType, intType); 2947 getTopLevelVariable(unit2, "y"), intType, intType);
2950 assertVariableDeclarationTypes( 2948 assertVariableDeclarationTypes(
2951 getFieldInClass(unit2, "B", "y"), intType, intType); 2949 getFieldInClass(unit2, "B", "y"), intType, intType);
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
3585 /** 3583 /**
3586 * Fill [errorListener] with [result] errors in the current [task]. 3584 * Fill [errorListener] with [result] errors in the current [task].
3587 */ 3585 */
3588 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) { 3586 void _fillErrorListener(ResultDescriptor<List<AnalysisError>> result) {
3589 List<AnalysisError> errors = task.outputs[result]; 3587 List<AnalysisError> errors = task.outputs[result];
3590 expect(errors, isNotNull, reason: result.name); 3588 expect(errors, isNotNull, reason: result.name);
3591 errorListener = new GatheringErrorListener(); 3589 errorListener = new GatheringErrorListener();
3592 errorListener.addAll(errors); 3590 errorListener.addAll(errors);
3593 } 3591 }
3594 } 3592 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/source/analysis_options_provider_test.dart ('k') | pkg/analyzer/test/src/task/strong_mode_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698