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

Unified Diff: pkg/analyzer/test/src/task/dart_test.dart

Issue 1113223006: Use IncrementalCompilationUnitElementBuilder in BuildCompilationUnitElementTask. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/dart_test.dart
diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart
index c2cfe5c370454c6d7e15d8da9ebc2b587a456296..3d549c5118a08b6a16dc7c77e3048cb3139c3163 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -205,6 +205,26 @@ class B = Object with A;
expect(outputs[RESOLVED_UNIT1], isNotNull);
}
+ test_perform_useMemento() {
+ String content = r'''
+library lib;
+import 'lib2.dart';
+export 'lib3.dart';
+part 'part.dart';
+class A {''';
+ Source source = newSource('/test.dart', content);
+ AnalysisTarget target = new LibrarySpecificUnit(source, source);
+ _computeResult(target, RESOLVED_UNIT1);
+ // update content
+ context.setContents(source, content);
+ assertIsInvalid(target, RESOLVED_UNIT1);
+ // recompute
+ _computeResult(target, RESOLVED_UNIT1);
+ assertIsValid(target, RESOLVED_UNIT1);
+ // values from the memento are returned
+ assertSameResults(ParseDartTask.DESCRIPTOR.results);
+ }
+
void _performBuildTask(String content) {
Source source = newSource('/test.dart', content);
AnalysisTarget target = new LibrarySpecificUnit(source, source);
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698