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

Unified Diff: pkg/analysis_server/test/analysis/update_content_test.dart

Issue 2912883003: Clean-up several warnings (Closed)
Patch Set: Created 3 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 | « no previous file | pkg/analyzer/test/generated/all_the_rest_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/analysis/update_content_test.dart
diff --git a/pkg/analysis_server/test/analysis/update_content_test.dart b/pkg/analysis_server/test/analysis/update_content_test.dart
index 36ca580f693f915de456516003853cfd2ee90e54..aab6fc87d6cc1f7d0c9541f64a1501fc6876f786 100644
--- a/pkg/analysis_server/test/analysis/update_content_test.dart
+++ b/pkg/analysis_server/test/analysis/update_content_test.dart
@@ -4,7 +4,6 @@
import 'package:analysis_server/protocol/protocol.dart';
import 'package:analysis_server/protocol/protocol_generated.dart';
-import 'package:analysis_server/src/analysis_server.dart';
import 'package:analysis_server/src/constants.dart';
import 'package:analysis_server/src/services/index/index.dart';
import 'package:analyzer/dart/ast/ast.dart';
@@ -103,23 +102,23 @@ class UpdateContentTest extends AbstractAnalysisTest {
if (!enableNewAnalysisDriver) return;
throw 'is this test used by the new analysis driver?';
- var testUnitMatcher = compilationUnitMatcher(testFile) as dynamic;
- createProject();
- addTestFile('main() { print(1); }');
- await server.onAnalysisComplete;
- verify(server.index.indexUnit(testUnitMatcher)).times(1);
- // add an overlay
- server.updateContent(
- '1', {testFile: new AddContentOverlay('main() { print(2); }')});
- // Perform the next single operation: analysis.
- // It will schedule an indexing operation.
- await server.test_onOperationPerformed;
- // Update the file and remove an overlay.
- resourceProvider.updateFile(testFile, 'main() { print(2); }');
- server.updateContent('2', {testFile: new RemoveContentOverlay()});
- // Validate that at the end the unit was indexed.
- await server.onAnalysisComplete;
- verify(server.index.indexUnit(testUnitMatcher)).times(3);
+// var testUnitMatcher = compilationUnitMatcher(testFile) as dynamic;
+// createProject();
+// addTestFile('main() { print(1); }');
+// await server.onAnalysisComplete;
+// verify(server.index.indexUnit(testUnitMatcher)).times(1);
+// // add an overlay
+// server.updateContent(
+// '1', {testFile: new AddContentOverlay('main() { print(2); }')});
+// // Perform the next single operation: analysis.
+// // It will schedule an indexing operation.
+// await server.test_onOperationPerformed;
+// // Update the file and remove an overlay.
+// resourceProvider.updateFile(testFile, 'main() { print(2); }');
+// server.updateContent('2', {testFile: new RemoveContentOverlay()});
+// // Validate that at the end the unit was indexed.
+// await server.onAnalysisComplete;
+// verify(server.index.indexUnit(testUnitMatcher)).times(3);
}
test_multiple_contexts() async {
@@ -228,21 +227,21 @@ f() {}
if (!enableNewAnalysisDriver) return;
throw 'is this test used by the new analysis driver?';
- createProject();
- addTestFile('main() { print(1); }');
- await server.onAnalysisComplete;
- CompilationUnit unit = _getTestUnit();
- // add an overlay
- server.updateContent(
- '1', {testFile: new AddContentOverlay('main() { print(2); }')});
- // it was an incremental change
- await server.onAnalysisComplete;
- expect(_getTestUnit(), same(unit));
- // remove overlay
- server.updateContent('2', {testFile: new RemoveContentOverlay()});
- // it was an incremental change
- await server.onAnalysisComplete;
- expect(_getTestUnit(), same(unit));
+// createProject();
+// addTestFile('main() { print(1); }');
+// await server.onAnalysisComplete;
+// CompilationUnit unit = _getTestUnit();
+// // add an overlay
+// server.updateContent(
+// '1', {testFile: new AddContentOverlay('main() { print(2); }')});
+// // it was an incremental change
+// await server.onAnalysisComplete;
+// expect(_getTestUnit(), same(unit));
+// // remove overlay
+// server.updateContent('2', {testFile: new RemoveContentOverlay()});
+// // it was an incremental change
+// await server.onAnalysisComplete;
+// expect(_getTestUnit(), same(unit));
}
test_sendNoticesAfterNopChange() async {
@@ -331,12 +330,12 @@ f() {}
expect(overlay, new isInstanceOf<plugin.RemoveContentOverlay>());
}
- CompilationUnit _getTestUnit() {
- ContextSourcePair pair = server.getContextSourcePair(testFile);
- AnalysisContext context = pair.context;
- Source source = pair.source;
- return context.getResolvedCompilationUnit2(source, source);
- }
+// CompilationUnit _getTestUnit() {
+// ContextSourcePair pair = server.getContextSourcePair(testFile);
+// AnalysisContext context = pair.context;
+// Source source = pair.source;
+// return context.getResolvedCompilationUnit2(source, source);
+// }
List<Source> _getUserSources(AnalysisContext context) {
List<Source> sources = <Source>[];
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/all_the_rest_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698