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

Side by Side Diff: pkg/analyzer/test/generated/non_error_resolver_test.dart

Issue 1863103002: Add an UNUSED_SHOWN_NAMES hint to the analyzer (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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.generated.non_error_resolver_test; 5 library analyzer.test.generated.non_error_resolver_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/element/element.dart'; 8 import 'package:analyzer/dart/element/element.dart';
9 import 'package:analyzer/src/generated/engine.dart'; 9 import 'package:analyzer/src/generated/engine.dart';
10 import 'package:analyzer/src/generated/error.dart'; 10 import 'package:analyzer/src/generated/error.dart';
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 library lib1; 160 library lib1;
161 class N {} 161 class N {}
162 class N1 {}'''); 162 class N1 {}''');
163 addNamedSource( 163 addNamedSource(
164 "/lib2.dart", 164 "/lib2.dart",
165 r''' 165 r'''
166 library lib2; 166 library lib2;
167 class N {} 167 class N {}
168 class N2 {}'''); 168 class N2 {}''');
169 computeLibrarySourceErrors(source); 169 computeLibrarySourceErrors(source);
170 assertNoErrors(source); 170 assertErrors(source, [HintCode.UNUSED_SHOWN_NAME]);
171 } 171 }
172 172
173 void test_annotated_partOfDeclaration() { 173 void test_annotated_partOfDeclaration() {
174 Source source = addSource('library L; part "part.dart";'); 174 Source source = addSource('library L; part "part.dart";');
175 addNamedSource('/part.dart', '@deprecated part of L;'); 175 addNamedSource('/part.dart', '@deprecated part of L;');
176 computeLibrarySourceErrors(source); 176 computeLibrarySourceErrors(source);
177 assertNoErrors(source); 177 assertNoErrors(source);
178 verify([source]); 178 verify([source]);
179 } 179 }
180 180
(...skipping 5907 matching lines...) Expand 10 before | Expand all | Expand 10 after
6088 reset(); 6088 reset();
6089 } 6089 }
6090 6090
6091 void _check_wrongNumberOfParametersForOperator1(String name) { 6091 void _check_wrongNumberOfParametersForOperator1(String name) {
6092 _check_wrongNumberOfParametersForOperator(name, "a"); 6092 _check_wrongNumberOfParametersForOperator(name, "a");
6093 } 6093 }
6094 6094
6095 CompilationUnit _getResolvedLibraryUnit(Source source) => 6095 CompilationUnit _getResolvedLibraryUnit(Source source) =>
6096 analysisContext.getResolvedCompilationUnit2(source, source); 6096 analysisContext.getResolvedCompilationUnit2(source, source);
6097 } 6097 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698