@@ -25,6 +25,15 @@ class CreateClassLowercaseTest extends FixProcessorTest {
25
25
@override
26
26
FixKind get kind => DartFixKind .CREATE_CLASS_LOWERCASE ;
27
27
28
+ Future <void > test_instanceMethod_noFix () async {
29
+ await resolveTestCode ('''
30
+ class C {}
31
+
32
+ String? f(C c) => c.foo();
33
+ ''' );
34
+ await assertNoFix ();
35
+ }
36
+
28
37
Future <void > test_lowercaseAssignment () async {
29
38
await resolveTestCode ('''
30
39
void f() {
@@ -73,6 +82,20 @@ class _0newName {
73
82
''' );
74
83
}
75
84
85
+ Future <void > test_prefix () async {
86
+ newFile ('$testPackageLibPath /lib.dart' , '' );
87
+ await resolveTestCode ('''
88
+ import 'lib.dart' as lib;
89
+
90
+ String? f() => lib.foo();
91
+ ''' );
92
+ await assertHasFix ('''
93
+
94
+ class foo {
95
+ }
96
+ ''' , target: '$testPackageLibPath /lib.dart' );
97
+ }
98
+
76
99
Future <void > test_startWithDollarSign () async {
77
100
await resolveTestCode (r'''
78
101
void f() {
@@ -454,6 +477,15 @@ class Test {
454
477
assertLinkedGroup (change.linkedEditGroups[0 ], ['Test ()' , 'Test {' ]);
455
478
}
456
479
480
+ Future <void > test_instanceMethod_noFix () async {
481
+ await resolveTestCode ('''
482
+ class C {}
483
+
484
+ String? f(C c) => c.Foo();
485
+ ''' );
486
+ await assertNoFix ();
487
+ }
488
+
457
489
Future <void > test_itemOfList () async {
458
490
await resolveTestCode ('''
459
491
void f() {
@@ -500,6 +532,20 @@ class Test {
500
532
assertLinkedGroup (change.linkedEditGroups[0 ], ['Test])' , 'Test {' ]);
501
533
}
502
534
535
+ Future <void > test_prefix () async {
536
+ newFile ('$testPackageLibPath /lib.dart' , '' );
537
+ await resolveTestCode ('''
538
+ import 'lib.dart' as lib;
539
+
540
+ String? f() => lib.Foo();
541
+ ''' );
542
+ await assertHasFix ('''
543
+
544
+ class Foo {
545
+ }
546
+ ''' , target: '$testPackageLibPath /lib.dart' );
547
+ }
548
+
503
549
Future <void > test_simple () async {
504
550
await resolveTestCode ('''
505
551
void f() {
0 commit comments