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

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

Issue 1983293002: Delay resynthesizing metadata to Impl classes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fixes for review comments. Created 4 years, 7 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
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/constant/value.dart'; 10 import 'package:analyzer/dart/constant/value.dart';
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 } 667 }
668 expect(resynthesized.kind, original.kind); 668 expect(resynthesized.kind, original.kind);
669 expect(resynthesized.location, original.location, reason: desc); 669 expect(resynthesized.location, original.location, reason: desc);
670 expect(resynthesized.name, original.name); 670 expect(resynthesized.name, original.name);
671 expect(resynthesized.nameOffset, original.nameOffset, reason: desc); 671 expect(resynthesized.nameOffset, original.nameOffset, reason: desc);
672 expect(rImpl.codeOffset, oImpl.codeOffset, reason: desc); 672 expect(rImpl.codeOffset, oImpl.codeOffset, reason: desc);
673 expect(rImpl.codeLength, oImpl.codeLength, reason: desc); 673 expect(rImpl.codeLength, oImpl.codeLength, reason: desc);
674 expect(resynthesized.documentationComment, original.documentationComment, 674 expect(resynthesized.documentationComment, original.documentationComment,
675 reason: desc); 675 reason: desc);
676 expect(resynthesized.docRange, original.docRange, reason: desc); 676 expect(resynthesized.docRange, original.docRange, reason: desc);
677 // TODO(scheglov) restore testing annotations for type parameters 677 compareMetadata(resynthesized.metadata, original.metadata, desc);
678 // after finishing moving resynthesizing to Impl.
679 if (original is! TypeParameterElement) {
680 compareMetadata(resynthesized.metadata, original.metadata, desc);
681 }
682 678
683 // Validate modifiers. 679 // Validate modifiers.
684 for (Modifier modifier in Modifier.persistedValues) { 680 for (Modifier modifier in Modifier.persistedValues) {
685 bool got = _hasModifier(resynthesized, modifier); 681 bool got = _hasModifier(resynthesized, modifier);
686 bool want = _hasModifier(original, modifier); 682 bool want = _hasModifier(original, modifier);
687 expect(got, want, 683 expect(got, want,
688 reason: 'Mismatch in $desc.$modifier: got $got, want $want'); 684 reason: 'Mismatch in $desc.$modifier: got $got, want $want');
689 } 685 }
690 for (Modifier modifier in Modifier.transientValues) { 686 for (Modifier modifier in Modifier.transientValues) {
691 bool got = rImpl.hasModifier(modifier); 687 bool got = rImpl.hasModifier(modifier);
(...skipping 3834 matching lines...) Expand 10 before | Expand all | Expand 10 after
4526 fail('Unexpectedly tried to get unlinked summary for $uri'); 4522 fail('Unexpectedly tried to get unlinked summary for $uri');
4527 } 4523 }
4528 return serializedUnit; 4524 return serializedUnit;
4529 } 4525 }
4530 4526
4531 @override 4527 @override
4532 bool hasLibrarySummary(String uri) { 4528 bool hasLibrarySummary(String uri) {
4533 return true; 4529 return true;
4534 } 4530 }
4535 } 4531 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698