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

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

Issue 2669863003: Handle invalid URIs in summaries. (Closed)
Patch Set: Remove uri.dart, tweak for summarize_ast_test. Created 3 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 '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
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
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 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_ast_test.dart ('k') | pkg/analyzer/test/src/summary/summarize_ast_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698