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

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

Issue 1132103002: Remove memento. (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/test/src/context/cache_test.dart ('k') | pkg/analyzer/test/src/task/driver_test.dart » ('j') | 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 70e76f97260613aa096368c431a3716fc3d0beca..b18b60562d7f6d4407cfb5dc0416db1aa7f078cb 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -208,34 +208,6 @@ class B = Object with A;
expect(outputs[RESOLVED_UNIT1], isNotNull);
}
- test_perform_useMemento() {
- Source source = newSource('/test.dart', r'''
-class A {}
-class B {}
-class C {}
-''');
- AnalysisTarget target = new LibrarySpecificUnit(source, source);
- _computeResult(target, RESOLVED_UNIT1);
- // update content
- context.setContents(source, r'''
-class C {}
-class A {}
-class B {}
-''');
- assertIsInvalid(target, RESOLVED_UNIT1);
- // recompute
- _computeResult(target, RESOLVED_UNIT1);
- assertIsValid(target, RESOLVED_UNIT1);
- // values are produced using memento
- List<ClassElement> newClassElements = outputs[CLASS_ELEMENTS];
- CompilationUnit newUnit = outputs[RESOLVED_UNIT1];
- CompilationUnitElement newUnitElement = outputs[COMPILATION_UNIT_ELEMENT];
- expect(
- newClassElements.map((_) => _.name), unorderedEquals(['A', 'B', 'C']));
- expect(newUnitElement, same(oldOutputs[COMPILATION_UNIT_ELEMENT]));
- expect(newUnit.element, newUnitElement);
- }
-
void _performBuildTask(String content) {
Source source = newSource('/test.dart', content);
AnalysisTarget target = new LibrarySpecificUnit(source, source);
@@ -1754,25 +1726,6 @@ class A {''');
expect(outputs[UNITS], hasLength(2));
}
- test_perform_useMemento() {
- String content = r'''
-library lib;
-import 'lib2.dart';
-export 'lib3.dart';
-part 'part.dart';
-class A {''';
- AnalysisTarget target = newSource('/test.dart', content);
- _computeResult(target, PARSED_UNIT);
- // update content
- context.setContents(target, content);
- assertIsInvalid(target, PARSED_UNIT);
- // recompute
- _computeResult(target, PARSED_UNIT);
- assertIsValid(target, PARSED_UNIT);
- // values from the memento are returned
- assertSameResults(ParseDartTask.DESCRIPTOR.results);
- }
-
void _performParseTask(String content) {
AnalysisTarget target = newSource('/test.dart', content);
_computeResult(target, PARSED_UNIT);
@@ -2062,19 +2015,6 @@ class ScanDartTaskTest extends _AbstractDartTaskTest {
expect(outputs[TOKEN_STREAM], isNotNull);
}
- test_perform_useMemento() {
- AnalysisTarget target = newSource('/test.dart', 'main() {}');
- _computeResult(target, TOKEN_STREAM);
- // update content
- context.setContents(target, 'main() {}');
- assertIsInvalid(target, TOKEN_STREAM);
- // recompute
- _computeResult(target, TOKEN_STREAM);
- assertIsValid(target, TOKEN_STREAM);
- // values from the memento are returned
- assertSameResults(ScanDartTask.DESCRIPTOR.results);
- }
-
void _performScanTask(String content) {
AnalysisTarget target = newSource('/test.dart', content);
_computeResult(target, TOKEN_STREAM);
« no previous file with comments | « pkg/analyzer/test/src/context/cache_test.dart ('k') | pkg/analyzer/test/src/task/driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698