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

Unified Diff: pkg/analyzer/test/src/dart/analysis/driver_test.dart

Issue 2703983002: Don't sent errors for general files if the file has the same signature. (Closed)
Patch Set: Created 3 years, 10 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/analyzer/test/src/dart/analysis/driver_test.dart
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
index 7fcf61d0c0a8c2c4a1a8748a420da85e2c235425..7bd4dcec793f05dacf52c28ee11f55b33fe7ca3a 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
@@ -2213,6 +2213,28 @@ var A = B;
expect(result.errors, hasLength(0));
}
+ test_results_skipNotAffected() async {
+ var a = _p('/test/lib/a.dart');
+ var b = _p('/test/lib/b.dart');
+ provider.newFile(a, 'class A {}');
+ provider.newFile(b, 'class B {}');
+
+ driver.addFile(a);
+ driver.addFile(b);
+ await scheduler.waitForIdle();
+
+ expect(allResults, hasLength(2));
+ allResults.clear();
+
+ // Update a.dart and notify.
+ provider.updateFile(a, 'class A2 {}');
+ driver.changeFile(a);
+
+ // Only result for a.dart should be produced, b.dart is not affected.
+ await scheduler.waitForIdle();
+ expect(allResults, hasLength(1));
+ }
+
test_results_status() async {
addTestFile('int f() => 42;');
await scheduler.waitForIdle();

Powered by Google App Engine
This is Rietveld 408576698