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

Side by Side Diff: pkg/analyzer/test/src/summary/resynthesize_common.dart

Issue 2977983002: Resynthesize InterfaceType, class type parameters and supertype. (Closed)
Patch Set: Created 3 years, 5 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
OLDNEW
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 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; 10 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
(...skipping 2729 matching lines...) Expand 10 before | Expand all | Expand 10 after
2740 checkElementText(library, r''' 2740 checkElementText(library, r'''
2741 class C { 2741 class C {
2742 void set x(int value) {} 2742 void set x(int value) {}
2743 dynamic set y(dynamic value) {} 2743 dynamic set y(dynamic value) {}
2744 } 2744 }
2745 '''); 2745 ''');
2746 } 2746 }
2747 } 2747 }
2748 2748
2749 test_class_supertype() async { 2749 test_class_supertype() async {
2750 var library = await checkLibrary('class C extends D {} class D {}'); 2750 var library = await checkLibrary('''
2751 if (isStrongMode) { 2751 class C extends D {}
2752 checkElementText(library, r''' 2752 class D {}
2753 ''');
2754 checkElementText(library, r'''
2753 class C extends D { 2755 class C extends D {
2754 } 2756 }
2755 class D { 2757 class D {
2756 } 2758 }
2757 '''); 2759 ''');
2758 } else { 2760 }
2759 checkElementText(library, r''' 2761
2760 class C extends D { 2762 test_class_supertype_typeArguments() async {
2763 var library = await checkLibrary('''
2764 class C extends D<int, double> {}
2765 class D<T1, T2> {}
2766 ''');
2767 checkElementText(library, r'''
2768 class C extends D<int, double> {
2761 } 2769 }
2762 class D { 2770 class D<T1, T2> {
2763 } 2771 }
2764 '''); 2772 ''');
2765 }
2766 } 2773 }
2767 2774
2768 test_class_supertype_unresolved() async { 2775 test_class_supertype_unresolved() async {
2769 var library = await checkLibrary('class C extends D {}', allowErrors: true); 2776 var library = await checkLibrary('class C extends D {}', allowErrors: true);
2770 if (isStrongMode) { 2777 if (isStrongMode) {
2771 checkElementText(library, r''' 2778 checkElementText(library, r'''
2772 class C { 2779 class C {
2773 } 2780 }
2774 '''); 2781 ''');
2775 } else { 2782 } else {
(...skipping 10337 matching lines...) Expand 10 before | Expand all | Expand 10 after
13113 fail('Unexpectedly tried to get unlinked summary for $uri'); 13120 fail('Unexpectedly tried to get unlinked summary for $uri');
13114 } 13121 }
13115 return serializedUnit; 13122 return serializedUnit;
13116 } 13123 }
13117 13124
13118 @override 13125 @override
13119 bool hasLibrarySummary(String uri) { 13126 bool hasLibrarySummary(String uri) {
13120 return true; 13127 return true;
13121 } 13128 }
13122 } 13129 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698