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

Side by Side Diff: pkg/analyzer/test/src/dart/analysis/file_state_test.dart

Issue 2955163002: Store subtyped names in Analysis Driver unlinked units. (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
« no previous file with comments | « pkg/analyzer/lib/src/summary/idl.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:convert'; 6 import 'dart:convert';
7 import 'dart:typed_data'; 7 import 'dart:typed_data';
8 8
9 import 'package:analyzer/file_system/file_system.dart'; 9 import 'package:analyzer/file_system/file_system.dart';
10 import 'package:analyzer/file_system/memory_file_system.dart'; 10 import 'package:analyzer/file_system/memory_file_system.dart';
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 print(222); 666 print(222);
667 } 667 }
668 } 668 }
669 '''); 669 ''');
670 bool apiSignatureChanged = file.refresh(); 670 bool apiSignatureChanged = file.refresh();
671 expect(apiSignatureChanged, isFalse); 671 expect(apiSignatureChanged, isFalse);
672 672
673 expect(file.apiSignature, signature); 673 expect(file.apiSignature, signature);
674 } 674 }
675 675
676 test_subtypedNames() {
677 String path = _p('/test.dart');
678 provider.newFile(
679 path,
680 r'''
681 class X extends A {}
682 class Y extends A with B {}
683 class Z implements C, D {}
684 ''');
685 FileState file = fileSystemState.getFileForPath(path);
686 expect(file.referencedNames, unorderedEquals(['A', 'B', 'C', 'D']));
687 }
688
676 test_topLevelDeclarations() { 689 test_topLevelDeclarations() {
677 String path = _p('/aaa/lib/a.dart'); 690 String path = _p('/aaa/lib/a.dart');
678 provider.newFile( 691 provider.newFile(
679 path, 692 path,
680 r''' 693 r'''
681 class C {} 694 class C {}
682 typedef F(); 695 typedef F();
683 enum E {E1, E2} 696 enum E {E1, E2}
684 void f() {} 697 void f() {}
685 var V1; 698 var V1;
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 String _p(String path) => provider.convertPath(path); 886 String _p(String path) => provider.convertPath(path);
874 887
875 static String _md5(String content) { 888 static String _md5(String content) {
876 return hex.encode(md5.convert(UTF8.encode(content)).bytes); 889 return hex.encode(md5.convert(UTF8.encode(content)).bytes);
877 } 890 }
878 } 891 }
879 892
880 class _GeneratedUriResolverMock extends TypedMock implements UriResolver {} 893 class _GeneratedUriResolverMock extends TypedMock implements UriResolver {}
881 894
882 class _SourceMock extends TypedMock implements Source {} 895 class _SourceMock extends TypedMock implements Source {}
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/idl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698