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

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

Issue 1718603002: Add summary support for ConstructorElement.nameEnd and .periodOffset. (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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 compareConstAstLists(resynthesizedImpl.constantInitializers, 485 compareConstAstLists(resynthesizedImpl.constantInitializers,
486 originalImpl.constantInitializers, desc); 486 originalImpl.constantInitializers, desc);
487 } 487 }
488 if (original.redirectedConstructor == null) { 488 if (original.redirectedConstructor == null) {
489 expect(resynthesized.redirectedConstructor, isNull, reason: desc); 489 expect(resynthesized.redirectedConstructor, isNull, reason: desc);
490 } else { 490 } else {
491 compareConstructorElements(resynthesized.redirectedConstructor, 491 compareConstructorElements(resynthesized.redirectedConstructor,
492 original.redirectedConstructor, '$desc redirectedConstructor'); 492 original.redirectedConstructor, '$desc redirectedConstructor');
493 } 493 }
494 checkPossibleMember(resynthesized, original, desc); 494 checkPossibleMember(resynthesized, original, desc);
495 expect(resynthesized.nameEnd, original.nameEnd, reason: desc);
496 expect(resynthesized.periodOffset, original.periodOffset, reason: desc);
495 } 497 }
496 498
497 void compareConstValues( 499 void compareConstValues(
498 DartObject resynthesized, DartObject original, String desc) { 500 DartObject resynthesized, DartObject original, String desc) {
499 if (original == null) { 501 if (original == null) {
500 expect(resynthesized, isNull, reason: desc); 502 expect(resynthesized, isNull, reason: desc);
501 } else { 503 } else {
502 expect(resynthesized, isNotNull, reason: desc); 504 expect(resynthesized, isNotNull, reason: desc);
503 compareTypes(resynthesized.type, original.type, desc); 505 compareTypes(resynthesized.type, original.type, desc);
504 expect(resynthesized.hasKnownValue, original.hasKnownValue, reason: desc); 506 expect(resynthesized.hasKnownValue, original.hasKnownValue, reason: desc);
(...skipping 3446 matching lines...) Expand 10 before | Expand all | Expand 10 after
3951 fail('Unexpectedly tried to get unlinked summary for $uri'); 3953 fail('Unexpectedly tried to get unlinked summary for $uri');
3952 } 3954 }
3953 return serializedUnit; 3955 return serializedUnit;
3954 } 3956 }
3955 3957
3956 @override 3958 @override
3957 bool hasLibrarySummary(String uri) { 3959 bool hasLibrarySummary(String uri) {
3958 return true; 3960 return true;
3959 } 3961 }
3960 } 3962 }
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