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

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

Issue 1001063002: Correctly compute whether a class subclasses Function (issue 22805) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/error_verifier.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/error.dart'; 9 import 'package:analyzer/src/generated/error.dart';
10 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode; 10 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 964
965 void test_constConstructorWithNonConstSuper_unresolved() { 965 void test_constConstructorWithNonConstSuper_unresolved() {
966 Source source = addSource(r''' 966 Source source = addSource(r'''
967 class A { 967 class A {
968 A.a(); 968 A.a();
969 } 969 }
970 class B extends A { 970 class B extends A {
971 const B(): super(); 971 const B(): super();
972 }'''); 972 }''');
973 resolve(source); 973 resolve(source);
974 assertErrors(source, [ 974 assertErrors(source,
975 CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT 975 [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
976 ]);
977 verify([source]); 976 verify([source]);
978 } 977 }
979 978
980 void test_constConstructorWithNonFinalField_finalInstanceVar() { 979 void test_constConstructorWithNonFinalField_finalInstanceVar() {
981 Source source = addSource(r''' 980 Source source = addSource(r'''
982 class A { 981 class A {
983 final int x = 0; 982 final int x = 0;
984 const A(); 983 const A();
985 }'''); 984 }''');
986 resolve(source); 985 resolve(source);
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
1661 verify([source]); 1660 verify([source]);
1662 } 1661 }
1663 1662
1664 void test_functionWithoutCall_doesNotImplementFunction() { 1663 void test_functionWithoutCall_doesNotImplementFunction() {
1665 Source source = addSource("class A {}"); 1664 Source source = addSource("class A {}");
1666 resolve(source); 1665 resolve(source);
1667 assertNoErrors(source); 1666 assertNoErrors(source);
1668 verify([source]); 1667 verify([source]);
1669 } 1668 }
1670 1669
1670 void test_functionWithoutCall_staticCallMethod() {
1671 Source source = addSource(r'''
1672 class A { }
1673 class B extends A {
1674 static call() { }
1675 }
1676 ''');
1677 resolve(source);
1678 assertNoErrors(source);
1679 verify([source]);
1680 }
1681
1671 void test_functionWithoutCall_withNoSuchMethod() { 1682 void test_functionWithoutCall_withNoSuchMethod() {
1672 // 16078 1683 // 16078
1673 Source source = addSource(r''' 1684 Source source = addSource(r'''
1674 class A implements Function { 1685 class A implements Function {
1675 noSuchMethod(inv) { 1686 noSuchMethod(inv) {
1676 return 42; 1687 return 42;
1677 } 1688 }
1678 }'''); 1689 }''');
1679 resolve(source); 1690 resolve(source);
1680 assertNoErrors(source); 1691 assertNoErrors(source);
(...skipping 3690 matching lines...) Expand 10 before | Expand all | Expand 10 after
5371 resolve(source); 5382 resolve(source);
5372 assertNoErrors(source); 5383 assertNoErrors(source);
5373 verify([source]); 5384 verify([source]);
5374 reset(); 5385 reset();
5375 } 5386 }
5376 5387
5377 void _check_wrongNumberOfParametersForOperator1(String name) { 5388 void _check_wrongNumberOfParametersForOperator1(String name) {
5378 _check_wrongNumberOfParametersForOperator(name, "a"); 5389 _check_wrongNumberOfParametersForOperator(name, "a");
5379 } 5390 }
5380 } 5391 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/error_verifier.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698