| OLD | NEW |
| 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 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; | 8 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; |
| 9 import 'package:analyzer/dart/constant/value.dart'; | 9 import 'package:analyzer/dart/constant/value.dart'; |
| 10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
| (...skipping 3899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3910 } | 3910 } |
| 3911 | 3911 |
| 3912 test_invalid_setterParameter_fieldFormalParameter_self() { | 3912 test_invalid_setterParameter_fieldFormalParameter_self() { |
| 3913 checkLibrary(''' | 3913 checkLibrary(''' |
| 3914 class C { | 3914 class C { |
| 3915 set x(this.x) {} | 3915 set x(this.x) {} |
| 3916 } | 3916 } |
| 3917 '''); | 3917 '''); |
| 3918 } | 3918 } |
| 3919 | 3919 |
| 3920 test_invalidUris() { |
| 3921 allowMissingFiles = true; |
| 3922 checkLibrary(r''' |
| 3923 import '[invalid uri]'; |
| 3924 import '[invalid uri]:foo.dart'; |
| 3925 import 'a1.dart'; |
| 3926 import '[invalid uri]'; |
| 3927 import '[invalid uri]:foo.dart'; |
| 3928 |
| 3929 export '[invalid uri]'; |
| 3930 export '[invalid uri]:foo.dart'; |
| 3931 export 'a2.dart'; |
| 3932 export '[invalid uri]'; |
| 3933 export '[invalid uri]:foo.dart'; |
| 3934 |
| 3935 part '[invalid uri]'; |
| 3936 part 'a3.dart'; |
| 3937 part '[invalid uri]'; |
| 3938 '''); |
| 3939 } |
| 3940 |
| 3920 test_library() { | 3941 test_library() { |
| 3921 checkLibrary(''); | 3942 checkLibrary(''); |
| 3922 } | 3943 } |
| 3923 | 3944 |
| 3924 test_library_documented() { | 3945 test_library_documented() { |
| 3925 checkLibrary(''' | 3946 checkLibrary(''' |
| 3926 // Extra comment so doc comment offset != 0 | 3947 // Extra comment so doc comment offset != 0 |
| 3927 /** | 3948 /** |
| 3928 * Docs | 3949 * Docs |
| 3929 */ | 3950 */ |
| (...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5134 fail('Unexpectedly tried to get unlinked summary for $uri'); | 5155 fail('Unexpectedly tried to get unlinked summary for $uri'); |
| 5135 } | 5156 } |
| 5136 return serializedUnit; | 5157 return serializedUnit; |
| 5137 } | 5158 } |
| 5138 | 5159 |
| 5139 @override | 5160 @override |
| 5140 bool hasLibrarySummary(String uri) { | 5161 bool hasLibrarySummary(String uri) { |
| 5141 return true; | 5162 return true; |
| 5142 } | 5163 } |
| 5143 } | 5164 } |
| OLD | NEW |