| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 test.src.serialization.elements_test; | 5 library test.src.serialization.elements_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/standard_resolution_map.dart'; | 8 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; |
| 9 import 'package:analyzer/dart/constant/value.dart'; | 9 import 'package:analyzer/dart/constant/value.dart'; |
| 10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
| (...skipping 3651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3662 '''); | 3662 '''); |
| 3663 } else { | 3663 } else { |
| 3664 checkElementText( | 3664 checkElementText( |
| 3665 library, | 3665 library, |
| 3666 r''' | 3666 r''' |
| 3667 const dynamic V = const p.C.named(); | 3667 const dynamic V = const p.C.named(); |
| 3668 '''); | 3668 '''); |
| 3669 } | 3669 } |
| 3670 } | 3670 } |
| 3671 | 3671 |
| 3672 test_const_invokeConstructor_named_unresolved6() { |
| 3673 var library = checkLibrary( |
| 3674 r''' |
| 3675 class C<T> {} |
| 3676 const V = const C.named(); |
| 3677 ''', |
| 3678 allowErrors: true); |
| 3679 if (isStrongMode) { |
| 3680 checkElementText( |
| 3681 library, |
| 3682 r''' |
| 3683 class C<T> { |
| 3684 } |
| 3685 const C<dynamic> V = const C.named(); |
| 3686 '''); |
| 3687 } else { |
| 3688 checkElementText( |
| 3689 library, |
| 3690 r''' |
| 3691 class C<T> { |
| 3692 } |
| 3693 const dynamic V = const C.named(); |
| 3694 '''); |
| 3695 } |
| 3696 } |
| 3697 |
| 3672 test_const_invokeConstructor_unnamed() { | 3698 test_const_invokeConstructor_unnamed() { |
| 3673 var library = checkLibrary(r''' | 3699 var library = checkLibrary(r''' |
| 3674 class C { | 3700 class C { |
| 3675 const C(); | 3701 const C(); |
| 3676 } | 3702 } |
| 3677 const V = const C(); | 3703 const V = const C(); |
| 3678 '''); | 3704 '''); |
| 3679 if (isStrongMode) { | 3705 if (isStrongMode) { |
| 3680 checkElementText( | 3706 checkElementText( |
| 3681 library, | 3707 library, |
| (...skipping 10715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14397 fail('Unexpectedly tried to get unlinked summary for $uri'); | 14423 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 14398 } | 14424 } |
| 14399 return serializedUnit; | 14425 return serializedUnit; |
| 14400 } | 14426 } |
| 14401 | 14427 |
| 14402 @override | 14428 @override |
| 14403 bool hasLibrarySummary(String uri) { | 14429 bool hasLibrarySummary(String uri) { |
| 14404 return true; | 14430 return true; |
| 14405 } | 14431 } |
| 14406 } | 14432 } |
| OLD | NEW |