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

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

Issue 1901923002: Add UNDEFINED_HIDDEN_NAME, UNDEFINED_SHOWN_NAME (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 5563 matching lines...) Expand 10 before | Expand all | Expand 10 after
5574 class B extends A<List> { 5574 class B extends A<List> {
5575 m() { 5575 m() {
5576 element.last; 5576 element.last;
5577 } 5577 }
5578 }'''); 5578 }''');
5579 computeLibrarySourceErrors(source); 5579 computeLibrarySourceErrors(source);
5580 assertNoErrors(source); 5580 assertNoErrors(source);
5581 verify([source]); 5581 verify([source]);
5582 } 5582 }
5583 5583
5584 void test_undefinedIdentifier_hide() {
5585 Source source = addSource(r'''
5586 library L;
5587 export 'lib1.dart' hide a;''');
5588 addNamedSource("/lib1.dart", "library lib1;");
5589 computeLibrarySourceErrors(source);
5590 assertNoErrors(source);
5591 verify([source]);
5592 }
5593
5594 void test_undefinedIdentifier_show() {
5595 Source source = addSource(r'''
5596 library L;
5597 export 'lib1.dart' show a;''');
5598 addNamedSource("/lib1.dart", "library lib1;");
5599 computeLibrarySourceErrors(source);
5600 assertNoErrors(source);
5601 verify([source]);
5602 }
5603
5604 void test_undefinedIdentifier_synthetic_whenExpression() { 5584 void test_undefinedIdentifier_synthetic_whenExpression() {
5605 Source source = addSource(r''' 5585 Source source = addSource(r'''
5606 print(x) {} 5586 print(x) {}
5607 main() { 5587 main() {
5608 print(is String); 5588 print(is String);
5609 }'''); 5589 }''');
5610 computeLibrarySourceErrors(source); 5590 computeLibrarySourceErrors(source);
5611 assertErrors(source, [ParserErrorCode.MISSING_IDENTIFIER]); 5591 assertErrors(source, [ParserErrorCode.MISSING_IDENTIFIER]);
5612 } 5592 }
5613 5593
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
6088 reset(); 6068 reset();
6089 } 6069 }
6090 6070
6091 void _check_wrongNumberOfParametersForOperator1(String name) { 6071 void _check_wrongNumberOfParametersForOperator1(String name) {
6092 _check_wrongNumberOfParametersForOperator(name, "a"); 6072 _check_wrongNumberOfParametersForOperator(name, "a");
6093 } 6073 }
6094 6074
6095 CompilationUnit _getResolvedLibraryUnit(Source source) => 6075 CompilationUnit _getResolvedLibraryUnit(Source source) =>
6096 analysisContext.getResolvedCompilationUnit2(source, source); 6076 analysisContext.getResolvedCompilationUnit2(source, source);
6097 } 6077 }
OLDNEW
« pkg/analyzer/lib/src/generated/error.dart ('K') | « pkg/analyzer/test/generated/hint_code_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698