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

Side by Side Diff: pkg/analysis_server/test/analysis/reanalyze_test.dart

Issue 1047733004: Support refresh of individual analysis roots (issue 22254) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address more comments Created 5 years, 8 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
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 test.analysis.reanalyze; 5 library test.analysis.reanalyze;
6 6
7 import 'package:analysis_server/src/constants.dart'; 7 import 'package:analysis_server/src/constants.dart';
8 import 'package:analysis_server/src/protocol.dart'; 8 import 'package:analysis_server/src/protocol.dart';
9 import 'package:analyzer/src/generated/engine.dart'; 9 import 'package:analyzer/src/generated/engine.dart';
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 server.updateContent('1', {testFile: new AddContentOverlay('main() {')}); 52 server.updateContent('1', {testFile: new AddContentOverlay('main() {')});
53 return waitForTasksFinished(); 53 return waitForTasksFinished();
54 }).then((_) { 54 }).then((_) {
55 // Verify that the syntax error was detected. 55 // Verify that the syntax error was detected.
56 List<AnalysisError> errors = filesErrors[testFile]; 56 List<AnalysisError> errors = filesErrors[testFile];
57 expect(errors, hasLength(1)); 57 expect(errors, hasLength(1));
58 // Remove testFile from filesErrors so that we'll notice when the file is 58 // Remove testFile from filesErrors so that we'll notice when the file is
59 // re-analyzed. 59 // re-analyzed.
60 filesErrors.remove(testFile); 60 filesErrors.remove(testFile);
61 // Reanalyze. 61 // Reanalyze.
62 server.reanalyze(); 62 server.reanalyze(null);
63 return waitForTasksFinished(); 63 return waitForTasksFinished();
64 }).then((_) { 64 }).then((_) {
65 // The file should have been reanalyzed. 65 // The file should have been reanalyzed.
66 expect(filesErrors, contains(testFile)); 66 expect(filesErrors, contains(testFile));
67 // Verify that the syntax error is present (this indicates that the 67 // Verify that the syntax error is present (this indicates that the
68 // content introduced by the call to updateContent is still in effect). 68 // content introduced by the call to updateContent is still in effect).
69 List<AnalysisError> errors = filesErrors[testFile]; 69 List<AnalysisError> errors = filesErrors[testFile];
70 expect(errors, hasLength(1)); 70 expect(errors, hasLength(1));
71 }); 71 });
72 } 72 }
73 } 73 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/protocol.dart ('k') | pkg/analysis_server/test/context_manager_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698