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

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

Issue 2551023005: Prepare for decoupling analyzer ASTs from element model. (Closed)
Patch Set: Created 4 years 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/ast/resolution_accessors.dart';
8 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
9 import 'package:analyzer/error/error.dart'; 10 import 'package:analyzer/error/error.dart';
10 import 'package:analyzer/src/error/codes.dart'; 11 import 'package:analyzer/src/error/codes.dart';
11 import 'package:analyzer/src/generated/engine.dart'; 12 import 'package:analyzer/src/generated/engine.dart';
12 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode; 13 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
13 import 'package:analyzer/src/generated/source_io.dart'; 14 import 'package:analyzer/src/generated/source_io.dart';
14 import 'package:test/test.dart'; 15 import 'package:test/test.dart';
15 import 'package:test_reflective_loader/test_reflective_loader.dart'; 16 import 'package:test_reflective_loader/test_reflective_loader.dart';
16 17
17 import 'resolver_test_case.dart'; 18 import 'resolver_test_case.dart';
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 */ 1032 */
1032 class C = D with E; 1033 class C = D with E;
1033 1034
1034 class D {} 1035 class D {}
1035 class E {}'''); 1036 class E {}''');
1036 computeLibrarySourceErrors(source); 1037 computeLibrarySourceErrors(source);
1037 computeLibrarySourceErrors(source); 1038 computeLibrarySourceErrors(source);
1038 assertNoErrors(source); 1039 assertNoErrors(source);
1039 verify([source]); 1040 verify([source]);
1040 CompilationUnit unit = _getResolvedLibraryUnit(source); 1041 CompilationUnit unit = _getResolvedLibraryUnit(source);
1041 ClassElement classC = unit.element.getType('C'); 1042 ClassElement classC = elementForCompilationUnit(unit).getType('C');
1042 expect(classC.documentationComment, isNotNull); 1043 expect(classC.documentationComment, isNotNull);
1043 } 1044 }
1044 1045
1045 void test_commentReference_beforeConstructor() { 1046 void test_commentReference_beforeConstructor() {
1046 String code = r''' 1047 String code = r'''
1047 abstract class A { 1048 abstract class A {
1048 /// [p] 1049 /// [p]
1049 A(int p) {} 1050 A(int p) {}
1050 }'''; 1051 }''';
1051 Source source = addSource(code); 1052 Source source = addSource(code);
(...skipping 5209 matching lines...) Expand 10 before | Expand all | Expand 10 after
6261 reset(); 6262 reset();
6262 } 6263 }
6263 6264
6264 void _check_wrongNumberOfParametersForOperator1(String name) { 6265 void _check_wrongNumberOfParametersForOperator1(String name) {
6265 _check_wrongNumberOfParametersForOperator(name, "a"); 6266 _check_wrongNumberOfParametersForOperator(name, "a");
6266 } 6267 }
6267 6268
6268 CompilationUnit _getResolvedLibraryUnit(Source source) => 6269 CompilationUnit _getResolvedLibraryUnit(Source source) =>
6269 analysisContext.getResolvedCompilationUnit2(source, source); 6270 analysisContext.getResolvedCompilationUnit2(source, source);
6270 } 6271 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698