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

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

Issue 1838933003: Format code in analysis_server (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/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 6ea46cf51457606275c233f298c3915ea38d475b..b451396ffdb6e77405a632f3b4043db371376b4f 100644
--- a/pkg/analysis_server/test/integration/analysis/update_content_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/update_content_test.dart
@@ -27,36 +27,44 @@ main() {
String badText = goodText.replaceAll(';', '');
writeFile(pathname, badText);
standardAnalysisSetup();
- return analysisFinished.then((_) {
- // The contents on disk (badText) are missing a semicolon.
- expect(currentAnalysisErrors[pathname], isNotEmpty);
- })
+ return analysisFinished
+ .then((_) {
+ // The contents on disk (badText) are missing a semicolon.
+ expect(currentAnalysisErrors[pathname], isNotEmpty);
+ })
.then((_) => sendAnalysisUpdateContent(
{pathname: new AddContentOverlay(goodText)}))
.then((result) => analysisFinished)
.then((_) {
- // There should be no errors now because the contents on disk have been
- // overriden with goodText.
- expect(currentAnalysisErrors[pathname], isEmpty);
- return sendAnalysisUpdateContent({
- pathname: new ChangeContentOverlay(
- [new SourceEdit(goodText.indexOf(';'), 1, '')])
- });
- }).then((result) => analysisFinished).then((_) {
- // There should be errors now because we've removed the semicolon.
- expect(currentAnalysisErrors[pathname], isNotEmpty);
- return sendAnalysisUpdateContent({
- pathname: new ChangeContentOverlay(
- [new SourceEdit(goodText.indexOf(';'), 0, ';')])
- });
- }).then((result) => analysisFinished).then((_) {
- // There should be no errors now because we've added the semicolon back.
- expect(currentAnalysisErrors[pathname], isEmpty);
- return sendAnalysisUpdateContent({pathname: new RemoveContentOverlay()});
- }).then((result) => analysisFinished).then((_) {
- // Now there should be errors again, because the contents on disk are no
- // longer overridden.
- expect(currentAnalysisErrors[pathname], isNotEmpty);
- });
+ // There should be no errors now because the contents on disk have been
+ // overriden with goodText.
+ expect(currentAnalysisErrors[pathname], isEmpty);
+ return sendAnalysisUpdateContent({
+ pathname: new ChangeContentOverlay(
+ [new SourceEdit(goodText.indexOf(';'), 1, '')])
+ });
+ })
+ .then((result) => analysisFinished)
+ .then((_) {
+ // There should be errors now because we've removed the semicolon.
+ expect(currentAnalysisErrors[pathname], isNotEmpty);
+ return sendAnalysisUpdateContent({
+ pathname: new ChangeContentOverlay(
+ [new SourceEdit(goodText.indexOf(';'), 0, ';')])
+ });
+ })
+ .then((result) => analysisFinished)
+ .then((_) {
+ // There should be no errors now because we've added the semicolon back.
+ expect(currentAnalysisErrors[pathname], isEmpty);
+ return sendAnalysisUpdateContent(
+ {pathname: new RemoveContentOverlay()});
+ })
+ .then((result) => analysisFinished)
+ .then((_) {
+ // Now there should be errors again, because the contents on disk are no
+ // longer overridden.
+ expect(currentAnalysisErrors[pathname], isNotEmpty);
+ });
}
}
« no previous file with comments | « pkg/analysis_server/test/edit/format_test.dart ('k') | pkg/analysis_server/test/services/refactoring/inline_local_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698