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

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

Issue 1125613003: Make sure to visit function annotations in ElementBuilder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 | Annotate | Revision Log
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 engine.non_error_resolver_test; 5 library engine.non_error_resolver_test;
6 6
7 import 'package:analyzer/src/generated/ast.dart'; 7 import 'package:analyzer/src/generated/ast.dart';
8 import 'package:analyzer/src/generated/element.dart'; 8 import 'package:analyzer/src/generated/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 2090 matching lines...) Expand 10 before | Expand all | Expand 10 after
2101 Source source = addSource(r''' 2101 Source source = addSource(r'''
2102 class A { 2102 class A {
2103 int x; 2103 int x;
2104 A(this.x) {} 2104 A(this.x) {}
2105 }'''); 2105 }''');
2106 resolve(source); 2106 resolve(source);
2107 assertNoErrors(source); 2107 assertNoErrors(source);
2108 verify([source]); 2108 verify([source]);
2109 } 2109 }
2110 2110
2111 void test_instance_creation_inside_annotation() {
2112 Source source = addSource('''
2113 class C {
2114 const C();
2115 }
2116 class D {
2117 final C c;
2118 const D(this.c);
2119 }
2120 @D(const C())
2121 f() {}
2122 ''');
2123 resolve(source);
2124 assertNoErrors(source);
2125 verify([source]);
2126 }
2127
2111 void test_instanceAccessToStaticMember_fromComment() { 2128 void test_instanceAccessToStaticMember_fromComment() {
2112 Source source = addSource(r''' 2129 Source source = addSource(r'''
2113 class A { 2130 class A {
2114 static m() {} 2131 static m() {}
2115 } 2132 }
2116 /// [A.m] 2133 /// [A.m]
2117 main() { 2134 main() {
2118 }'''); 2135 }''');
2119 resolve(source); 2136 resolve(source);
2120 assertNoErrors(source); 2137 assertNoErrors(source);
(...skipping 3331 matching lines...) Expand 10 before | Expand all | Expand 10 after
5452 resolve(source); 5469 resolve(source);
5453 assertNoErrors(source); 5470 assertNoErrors(source);
5454 verify([source]); 5471 verify([source]);
5455 reset(); 5472 reset();
5456 } 5473 }
5457 5474
5458 void _check_wrongNumberOfParametersForOperator1(String name) { 5475 void _check_wrongNumberOfParametersForOperator1(String name) {
5459 _check_wrongNumberOfParametersForOperator(name, "a"); 5476 _check_wrongNumberOfParametersForOperator(name, "a");
5460 } 5477 }
5461 } 5478 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | tests/language/instance_creation_in_function_annotation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698