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

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

Issue 1581803002: Resynth importElement.prefixOffset. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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/resynthesize.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/src/generated/element.dart'; 7 import 'package:analyzer/src/generated/element.dart';
8 import 'package:analyzer/src/generated/engine.dart'; 8 import 'package:analyzer/src/generated/engine.dart';
9 import 'package:analyzer/src/generated/resolver.dart' show Namespace; 9 import 'package:analyzer/src/generated/resolver.dart' show Namespace;
10 import 'package:analyzer/src/generated/source.dart'; 10 import 'package:analyzer/src/generated/source.dart';
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 original.typeParameters[i], 279 original.typeParameters[i],
280 '$desc type parameter ${original.typeParameters[i].name}'); 280 '$desc type parameter ${original.typeParameters[i].name}');
281 } 281 }
282 } 282 }
283 283
284 void compareImportElements(ImportElementImpl resynthesized, 284 void compareImportElements(ImportElementImpl resynthesized,
285 ImportElementImpl original, String desc) { 285 ImportElementImpl original, String desc) {
286 compareUriReferencedElements(resynthesized, original, desc); 286 compareUriReferencedElements(resynthesized, original, desc);
287 expect(resynthesized.importedLibrary.location, 287 expect(resynthesized.importedLibrary.location,
288 original.importedLibrary.location); 288 original.importedLibrary.location);
289 expect(resynthesized.prefixOffset, original.prefixOffset);
289 if (original.prefix == null) { 290 if (original.prefix == null) {
290 expect(resynthesized.prefix, isNull); 291 expect(resynthesized.prefix, isNull);
291 } else { 292 } else {
292 comparePrefixElements( 293 comparePrefixElements(
293 resynthesized.prefix, original.prefix, original.prefix.name); 294 resynthesized.prefix, original.prefix, original.prefix.name);
294 } 295 }
295 expect(resynthesized.combinators.length, original.combinators.length); 296 expect(resynthesized.combinators.length, original.combinators.length);
296 for (int i = 0; i < resynthesized.combinators.length; i++) { 297 for (int i = 0; i < resynthesized.combinators.length; i++) {
297 compareNamespaceCombinators( 298 compareNamespaceCombinators(
298 resynthesized.combinators[i], original.combinators[i]); 299 resynthesized.combinators[i], original.combinators[i]);
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 } 1388 }
1388 1389
1389 test_variable_implicit_type() { 1390 test_variable_implicit_type() {
1390 checkLibrary('var x;'); 1391 checkLibrary('var x;');
1391 } 1392 }
1392 1393
1393 test_variables() { 1394 test_variables() {
1394 checkLibrary('int i; int j;'); 1395 checkLibrary('int i; int j;');
1395 } 1396 }
1396 } 1397 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698