| OLD | NEW |
| 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 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 Source source = addSource(r''' | 983 Source source = addSource(r''' |
| 984 class A { | 984 class A { |
| 985 static x() {} | 985 static x() {} |
| 986 static set x(int p) {} | 986 static set x(int p) {} |
| 987 }'''); | 987 }'''); |
| 988 resolve(source); | 988 resolve(source); |
| 989 assertNoErrors(source); | 989 assertNoErrors(source); |
| 990 verify([source]); | 990 verify([source]); |
| 991 } | 991 } |
| 992 | 992 |
| 993 void test_const_constructor_with_named_generic_parameter() { |
| 994 Source source = addSource(''' |
| 995 class C<T> { |
| 996 const C({T t}); |
| 997 } |
| 998 const c = const C(t: 1); |
| 999 '''); |
| 1000 resolve(source); |
| 1001 assertNoErrors(source); |
| 1002 verify([source]); |
| 1003 } |
| 1004 |
| 993 void test_const_dynamic() { | 1005 void test_const_dynamic() { |
| 994 Source source = addSource(''' | 1006 Source source = addSource(''' |
| 995 const Type d = dynamic; | 1007 const Type d = dynamic; |
| 996 '''); | 1008 '''); |
| 997 resolve(source); | 1009 resolve(source); |
| 998 assertNoErrors(source); | 1010 assertNoErrors(source); |
| 999 verify([source]); | 1011 verify([source]); |
| 1000 } | 1012 } |
| 1001 | 1013 |
| 1002 void test_constConstructorWithNonConstSuper_explicit() { | 1014 void test_constConstructorWithNonConstSuper_explicit() { |
| (...skipping 4547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5550 reset(); | 5562 reset(); |
| 5551 } | 5563 } |
| 5552 | 5564 |
| 5553 void _check_wrongNumberOfParametersForOperator1(String name) { | 5565 void _check_wrongNumberOfParametersForOperator1(String name) { |
| 5554 _check_wrongNumberOfParametersForOperator(name, "a"); | 5566 _check_wrongNumberOfParametersForOperator(name, "a"); |
| 5555 } | 5567 } |
| 5556 | 5568 |
| 5557 CompilationUnit _getResolvedLibraryUnit(Source source) => | 5569 CompilationUnit _getResolvedLibraryUnit(Source source) => |
| 5558 analysisContext.getResolvedCompilationUnit2(source, source); | 5570 analysisContext.getResolvedCompilationUnit2(source, source); |
| 5559 } | 5571 } |
| OLD | NEW |