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

Unified Diff: pkg/analysis_server/test/domain_analysis_test.dart

Issue 332383006: Trigger re-analysis when a file changes on disk. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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
Index: pkg/analysis_server/test/domain_analysis_test.dart
diff --git a/pkg/analysis_server/test/domain_analysis_test.dart b/pkg/analysis_server/test/domain_analysis_test.dart
index 97e6cb982421fa58fb9565712f6cdcc6ab4d7478..db5730a7a8df86efb9222f399b5bc39851dfb856 100644
--- a/pkg/analysis_server/test/domain_analysis_test.dart
+++ b/pkg/analysis_server/test/domain_analysis_test.dart
@@ -1586,7 +1586,24 @@ testUpdateContent() {
});
});
- test('change on disk', () {
+ test('change on disk, normal', () {
+ AnalysisTestHelper helper = new AnalysisTestHelper();
+ helper.createSingleFileProject('library A;');
+ return helper.waitForOperationsFinished().then((_) {
+ // There should be no errors
+ expect(helper.getTestErrors(), hasLength(0));
+ // Change file on disk, adding a syntax error.
+ helper.resourceProvider.modifyFile(helper.testFile, 'library lib');
+ // There should be errors now.
+ return pumpEventQueue().then((_) {
+ return helper.waitForOperationsFinished().then((_) {
+ expect(helper.getTestErrors(), hasLength(1));
+ });
+ });
+ });
+ });
+
+ test('change on disk, during override', () {
AnalysisTestHelper helper = new AnalysisTestHelper();
helper.createSingleFileProject('library A;');
return helper.waitForOperationsFinished().then((_) {

Powered by Google App Engine
This is Rietveld 408576698