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

Unified Diff: pkg/analyzer/test/src/context/context_test.dart

Issue 1236013003: Fixed bug in implicit analysis notification and renamed tests (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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/generated/engine_test.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/context/context_test.dart
diff --git a/pkg/analyzer/test/src/context/context_test.dart b/pkg/analyzer/test/src/context/context_test.dart
index 8f960348427ad4e451274a5a426c00c22bd5bec5..908f08e1ffea0e63a15d6ef9e3ba1ba4ee7ebbb4 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -55,7 +55,7 @@ main() {
@reflectiveTest
class AnalysisContextImplTest extends AbstractContextTest {
- Future fail_analyzedSources_removed() async {
+ Future fail_implicitAnalysisEvents_removed() async {
AnalyzedSourcesListener listener = new AnalyzedSourcesListener();
context.implicitAnalysisEvents.listen(listener.onData);
//
@@ -116,24 +116,6 @@ class AnalysisContextImplTest extends AbstractContextTest {
super.tearDown();
}
- Future test_analyzedSources_added() async {
- AnalyzedSourcesListener listener = new AnalyzedSourcesListener();
- context.implicitAnalysisEvents.listen(listener.onData);
- //
- // Create a file that references an file that is not explicitly being
- // analyzed and fully analyze it. Ensure that the listener is told about
- // the implicitly analyzed file.
- //
- Source sourceA = newSource('/a.dart', "library a; import 'b.dart';");
- Source sourceB = newSource('/b.dart', "library b;");
- ChangeSet changeSet = new ChangeSet();
- changeSet.addedSource(sourceA);
- context.applyChanges(changeSet);
- context.computeErrors(sourceA);
- await pumpEventQueue();
- listener.expectAnalyzed(sourceB);
- }
-
Future test_applyChanges_add() {
SourcesChangedListener listener = new SourcesChangedListener();
context.onSourcesChanged.listen(listener.onData);
@@ -1250,6 +1232,24 @@ main() {}''');
expect(analysisResult.changeNotices, isNotNull);
}
+ Future test_implicitAnalysisEvents_added() async {
+ AnalyzedSourcesListener listener = new AnalyzedSourcesListener();
+ context.implicitAnalysisEvents.listen(listener.onData);
+ //
+ // Create a file that references an file that is not explicitly being
+ // analyzed and fully analyze it. Ensure that the listener is told about
+ // the implicitly analyzed file.
+ //
+ Source sourceA = newSource('/a.dart', "library a; import 'b.dart';");
+ Source sourceB = newSource('/b.dart', "library b;");
+ ChangeSet changeSet = new ChangeSet();
+ changeSet.addedSource(sourceA);
+ context.applyChanges(changeSet);
+ context.computeErrors(sourceA);
+ await pumpEventQueue();
+ listener.expectAnalyzed(sourceB);
+ }
+
void test_isClientLibrary_dart() {
Source source = addSource("/test.dart", r'''
import 'dart:html';
« no previous file with comments | « pkg/analyzer/test/generated/engine_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698