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

Unified Diff: pkg/analysis_server/test/edit/refactoring_test.dart

Issue 793373004: Don't send a refactoring feedback in case of a fatal initial problem. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « pkg/analysis_server/lib/src/services/correction/statement_analyzer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/edit/refactoring_test.dart
diff --git a/pkg/analysis_server/test/edit/refactoring_test.dart b/pkg/analysis_server/test/edit/refactoring_test.dart
index cbfc511bbb3c923284cfe3443f31f54a8b3512ea..814e563b2dc68937e01fe9d2881296622ac8b869 100644
--- a/pkg/analysis_server/test/edit/refactoring_test.dart
+++ b/pkg/analysis_server/test/edit/refactoring_test.dart
@@ -437,6 +437,28 @@ int res(num bbb, int aaa) => aaa + bbb;
});
}
+ test_init_fatalError_invalidStatement() {
+ addTestFile('''
+main(bool b) {
+// start
+ if (b) {
+ print(1);
+// end
+ print(2);
+ }
+}
+''');
+ _setOffsetLengthForStartEnd();
+ return waitForTasksFinished().then((_) {
+ return _sendExtractRequest();
+ }).then((Response response) {
+ var result = new EditGetRefactoringResult.fromResponse(response);
+ assertResultProblemsFatal(result.initialProblems);
+ // ...there is no any feedback
+ expect(result.feedback, isNull);
+ });
+ }
+
test_names() {
addTestFile('''
class TreeItem {}
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/statement_analyzer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698