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

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

Issue 2162053004: Separate gathering Delta changes and validation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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/src/context/cache_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 c0a9b318cab0574a00ad4e75d9463d7307543eb3..06c5922e0207e3fc22ad02fe2f71ae0a2c1ba91e 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -3470,6 +3470,46 @@ class A {
expect(context.getErrors(b).errors, hasLength(1));
}
+ void test_sequence_dependenciesWithCycles() {
+ Source a = addSource(
+ '/a.dart',
+ r'''
+const A = 1;
+''');
+ Source b = addSource(
+ '/b.dart',
+ r'''
+import 'c.dart';
+const B = C1 + 1;
+''');
+ Source c = addSource(
+ '/c.dart',
+ r'''
+import 'a.dart';
+import 'b.dart';
+const C1 = A + 1;
+const C2 = B + 2;
+''');
+ Source d = addSource(
+ '/d.dart',
+ r'''
+import 'c.dart';
+const D = C2 + 1;
+''');
+ _performPendingAnalysisTasks();
+ // Update "A" constant.
+ // This should invalidate results in all sources.
+ context.setContents(
+ a,
+ r'''
+const A = 2;
+''');
+ _assertInvalid(a, LIBRARY_ERRORS_READY);
+ _assertInvalid(b, LIBRARY_ERRORS_READY);
+ _assertInvalid(c, LIBRARY_ERRORS_READY);
+ _assertInvalid(d, LIBRARY_ERRORS_READY);
+ }
+
void test_sequence_inBodyChange_addRef_deltaChange() {
Source a = addSource(
'/a.dart',
« no previous file with comments | « pkg/analyzer/test/src/context/cache_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698