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

Unified Diff: pkg/analysis_server/test/integration/analysis/update_content_test.dart

Issue 2574843002: Add a failing integration test (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/integration/analysis/update_content_test.dart
diff --git a/pkg/analysis_server/test/integration/analysis/update_content_test.dart b/pkg/analysis_server/test/integration/analysis/update_content_test.dart
index 76a7f3b4cb594277d83db8fc0ca599bef9310bc9..e92bccc685516b11ea0545220d1aa126789a1119 100644
--- a/pkg/analysis_server/test/integration/analysis/update_content_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/update_content_test.dart
@@ -59,6 +59,53 @@ main() {
await analysisFinished;
expect(currentAnalysisErrors[path], isNotEmpty);
}
+
+ @failingTest
+ test_updateContent_multipleAdds() async {
+ String pathname = sourcePath('test.dart');
+ writeFile(
+ pathname,
+ r'''
+class Person {
+ String _name;
+ Person(this._name);
+ String get name => this._name;
+ String toString() => "Name: ${name}";
+}
+void main() {
+ var p = new Person("Skeletor");
+ p.xname = "Faker";
+ print(p);
+}
+''');
+ standardAnalysisSetup();
+ await analysisFinished;
+ expect(currentAnalysisErrors[pathname], isList);
+ List<AnalysisError> errors1 = currentAnalysisErrors[pathname];
+ expect(errors1, hasLength(1));
+ expect(errors1[0].location.file, equals(pathname));
+
+ await sendAnalysisUpdateContent({
+ pathname: new AddContentOverlay(r'''
+class Person {
+ String _name;
+ Person(this._name);
+ String get name => this._name;
+ String toString() => "Name: ${name}";
+}
+void main() {
+ var p = new Person("Skeletor");
+ p.name = "Faker";
+ print(p);
+}
+''')
+ });
+ await analysisFinished;
+ expect(currentAnalysisErrors[pathname], isList);
+ List<AnalysisError> errors2 = currentAnalysisErrors[pathname];
+ expect(errors2, hasLength(1));
+ expect(errors2[0].location.file, equals(pathname));
+ }
}
@reflectiveTest
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698