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

Unified Diff: pkg/analysis_server/test/services/correction/assist_test.dart

Issue 1009833002: Quick Assist for creating a constructor for selected final fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/util.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/services/correction/assist_test.dart
diff --git a/pkg/analysis_server/test/services/correction/assist_test.dart b/pkg/analysis_server/test/services/correction/assist_test.dart
index d3c11d0ddfd3e3c08d7d2994c5f8f8e3824436f0..316f0a5cf515ef19f7f0457a125561bbae27389b 100644
--- a/pkg/analysis_server/test/services/correction/assist_test.dart
+++ b/pkg/analysis_server/test/services/correction/assist_test.dart
@@ -1089,6 +1089,32 @@ main(A a) {
assertNoAssistAt('isEmpty;', AssistKind.CONVERT_INTO_IS_NOT_EMPTY);
}
+ void test_createFinalFieldsConstructor() {
Brian Wilkerson 2015/03/15 23:43:22 What happens with the following test input: class
+ resolveTestUnit('''
+class A {
+ final int a;
+// start
+ final int b;
+ final int c;
+// end
+ final int d;
+}
+''');
+ _setStartEndSelection();
+ assertHasAssist(AssistKind.CREATE_FINAL_FIELD_CONSTRUCTOR, '''
+class A {
+ final int a;
+// start
+ final int b;
+ final int c;
+// end
+ final int d;
+
+ A(this.b, this.c);
+}
+''');
+ }
+
void test_exchangeBinaryExpressionArguments_OK_compare() {
Map<String, String> operatorMap = {
'<': '>',
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/util.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698