| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 {} |
| OLD | NEW |