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

Side by Side Diff: pkg/analyzer/test/generated/incremental_resolver_test.dart

Issue 881463004: Rename ChangeNotice resolved Dart/Html unit fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 engine.incremental_resolver_test; 5 library engine.incremental_resolver_test;
6 6
7 import 'package:analyzer/src/generated/ast.dart'; 7 import 'package:analyzer/src/generated/ast.dart';
8 import 'package:analyzer/src/generated/element.dart'; 8 import 'package:analyzer/src/generated/element.dart';
9 import 'package:analyzer/src/generated/engine.dart'; 9 import 'package:analyzer/src/generated/engine.dart';
10 import 'package:analyzer/src/generated/error.dart'; 10 import 'package:analyzer/src/generated/error.dart';
(...skipping 3360 matching lines...) Expand 10 before | Expand all | Expand 10 after
3371 if (!expectedSuccess) { 3371 if (!expectedSuccess) {
3372 expect(newUnit.element, isNot(same(oldUnitElement))); 3372 expect(newUnit.element, isNot(same(oldUnitElement)));
3373 return; 3373 return;
3374 } 3374 }
3375 // The existing CompilationUnitElement should be updated. 3375 // The existing CompilationUnitElement should be updated.
3376 expect(newUnit.element, same(oldUnitElement)); 3376 expect(newUnit.element, same(oldUnitElement));
3377 // The only expected pending task should return the same resolved 3377 // The only expected pending task should return the same resolved
3378 // "newUnit", so all clients will get it using the usual way. 3378 // "newUnit", so all clients will get it using the usual way.
3379 AnalysisResult analysisResult = analysisContext.performAnalysisTask(); 3379 AnalysisResult analysisResult = analysisContext.performAnalysisTask();
3380 ChangeNotice notice = analysisResult.changeNotices[0]; 3380 ChangeNotice notice = analysisResult.changeNotices[0];
3381 expect(notice.compilationUnit, same(newUnit)); 3381 expect(notice.resolvedDartUnit, same(newUnit));
3382 // Resolve "newCode" from scratch. 3382 // Resolve "newCode" from scratch.
3383 if (compareWithFull) { 3383 if (compareWithFull) {
3384 _resetWithIncremental(false); 3384 _resetWithIncremental(false);
3385 source = addSource(newCode + ' '); 3385 source = addSource(newCode + ' ');
3386 source = addSource(newCode); 3386 source = addSource(newCode);
3387 _runTasks(); 3387 _runTasks();
3388 LibraryElement library = resolve(source); 3388 LibraryElement library = resolve(source);
3389 CompilationUnit fullNewUnit = resolveCompilationUnit(source, library); 3389 CompilationUnit fullNewUnit = resolveCompilationUnit(source, library);
3390 // Validate tokens. 3390 // Validate tokens.
3391 _assertEqualTokens(newUnit, fullNewUnit); 3391 _assertEqualTokens(newUnit, fullNewUnit);
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
3678 } 3678 }
3679 } 3679 }
3680 3680
3681 3681
3682 class _Edit { 3682 class _Edit {
3683 final int offset; 3683 final int offset;
3684 final int length; 3684 final int length;
3685 final String replacement; 3685 final String replacement;
3686 _Edit(this.offset, this.length, this.replacement); 3686 _Edit(this.offset, this.length, this.replacement);
3687 } 3687 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698