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

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

Issue 2789113005: Fix for resynthesis when a part URI is empty. (Closed)
Patch Set: Created 3 years, 8 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/link.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 '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 10084 matching lines...) Expand 10 before | Expand all | Expand 10 after
10095 checkElementText( 10095 checkElementText(
10096 library, 10096 library,
10097 r''' 10097 r'''
10098 class C { 10098 class C {
10099 dynamic set x(dynamic this.x) {} 10099 dynamic set x(dynamic this.x) {}
10100 } 10100 }
10101 '''); 10101 ''');
10102 } 10102 }
10103 } 10103 }
10104 10104
10105 test_invalidUri_part_emptyUri() {
10106 allowMissingFiles = true;
10107 var library = checkLibrary(r'''
10108 part '';
10109 class B extends A {}
10110 ''');
10111 if (isStrongMode) {
10112 checkElementText(
10113 library,
10114 r'''
10115 class B {
10116 }
10117 ''');
10118 } else {
10119 checkElementText(
10120 library,
10121 r'''
10122 class B {
10123 }
10124 ''');
10125 }
10126 }
10127
10105 test_invalidUris() { 10128 test_invalidUris() {
10106 allowMissingFiles = true; 10129 allowMissingFiles = true;
10107 var library = checkLibrary(r''' 10130 var library = checkLibrary(r'''
10108 import '[invalid uri]'; 10131 import '[invalid uri]';
10109 import '[invalid uri]:foo.dart'; 10132 import '[invalid uri]:foo.dart';
10110 import 'a1.dart'; 10133 import 'a1.dart';
10111 import '[invalid uri]'; 10134 import '[invalid uri]';
10112 import '[invalid uri]:foo.dart'; 10135 import '[invalid uri]:foo.dart';
10113 10136
10114 export '[invalid uri]'; 10137 export '[invalid uri]';
(...skipping 4919 matching lines...) Expand 10 before | Expand all | Expand 10 after
15034 fail('Unexpectedly tried to get unlinked summary for $uri'); 15057 fail('Unexpectedly tried to get unlinked summary for $uri');
15035 } 15058 }
15036 return serializedUnit; 15059 return serializedUnit;
15037 } 15060 }
15038 15061
15039 @override 15062 @override
15040 bool hasLibrarySummary(String uri) { 15063 bool hasLibrarySummary(String uri) {
15041 return true; 15064 return true;
15042 } 15065 }
15043 } 15066 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/link.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698