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

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

Issue 1714173002: Add summary support for ShowElementCombinator.end and .offset. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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:convert'; 7 import 'dart:convert';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 // TODO(paulberry): do we need to deal with 738 // TODO(paulberry): do we need to deal with
739 // MultiplyInheritedMethodElementImpl? 739 // MultiplyInheritedMethodElementImpl?
740 compareExecutableElements(resynthesized, original, desc); 740 compareExecutableElements(resynthesized, original, desc);
741 } 741 }
742 742
743 void compareNamespaceCombinators( 743 void compareNamespaceCombinators(
744 NamespaceCombinator resynthesized, NamespaceCombinator original) { 744 NamespaceCombinator resynthesized, NamespaceCombinator original) {
745 if (original is ShowElementCombinatorImpl && 745 if (original is ShowElementCombinatorImpl &&
746 resynthesized is ShowElementCombinatorImpl) { 746 resynthesized is ShowElementCombinatorImpl) {
747 expect(resynthesized.shownNames, original.shownNames); 747 expect(resynthesized.shownNames, original.shownNames);
748 expect(resynthesized.offset, original.offset);
749 expect(resynthesized.end, original.end);
748 } else if (original is HideElementCombinatorImpl && 750 } else if (original is HideElementCombinatorImpl &&
749 resynthesized is HideElementCombinatorImpl) { 751 resynthesized is HideElementCombinatorImpl) {
750 expect(resynthesized.hiddenNames, original.hiddenNames); 752 expect(resynthesized.hiddenNames, original.hiddenNames);
751 } else if (resynthesized.runtimeType != original.runtimeType) { 753 } else if (resynthesized.runtimeType != original.runtimeType) {
752 fail( 754 fail(
753 'Type mismatch: expected ${original.runtimeType}, got ${resynthesized. runtimeType}'); 755 'Type mismatch: expected ${original.runtimeType}, got ${resynthesized. runtimeType}');
754 } else { 756 } else {
755 fail('Unimplemented comparison for ${original.runtimeType}'); 757 fail('Unimplemented comparison for ${original.runtimeType}');
756 } 758 }
757 } 759 }
(...skipping 3195 matching lines...) Expand 10 before | Expand all | Expand 10 after
3953 fail('Unexpectedly tried to get unlinked summary for $uri'); 3955 fail('Unexpectedly tried to get unlinked summary for $uri');
3954 } 3956 }
3955 return serializedUnit; 3957 return serializedUnit;
3956 } 3958 }
3957 3959
3958 @override 3960 @override
3959 bool hasLibrarySummary(String uri) { 3961 bool hasLibrarySummary(String uri) {
3960 return true; 3962 return true;
3961 } 3963 }
3962 } 3964 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_elements.dart ('k') | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698