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

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

Issue 2965063002: Add a quick fix for missing new (issue 30077) (Closed)
Patch Set: Created 3 years, 5 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/fix_internal.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/fix_test.dart
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index 4aa6942c214cb79f239329b972fa7fd6b70c9c2c..18b6a7ad658bde8ae57e384d41420c2758c5bd5e 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -4097,6 +4097,27 @@ main() {
''');
}
+ test_invokeConstructorUsingNew() async {
+ await resolveTestUnit('''
+class C {
+ C.c();
+}
+main() {
+ C c = C.c();
+}
+''');
+ await assertHasFix(
+ DartFixKind.INVOKE_CONSTRUCTOR_USING_NEW,
+ '''
+class C {
+ C.c();
+}
+main() {
+ C c = new C.c();
+}
+''');
+ }
+
test_isNotNull() async {
await resolveTestUnit('''
main(p) {
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698