@@ -79,7 +79,7 @@ void foo() {
7979 }
8080
8181 Future <void > test_import_double () async {
82- newFile ('/home/my_project/ lib/ other.dart' , '''
82+ newFile (join (projectFolderPath, ' lib' , ' other.dart') , '''
8383export 'dart:math';
8484''' );
8585 await _verifyGoToImports (
@@ -93,10 +93,10 @@ Rando^m? r;
9393 }
9494
9595 Future <void > test_import_double_ambiguous () async {
96- newFile ('/home/my_project/ lib/ a1.dart' , '''
96+ newFile (join (projectFolderPath, ' lib' , ' a1.dart') , '''
9797class A {}
9898''' );
99- newFile ('/home/my_project/ lib/ a2.dart' , '''
99+ newFile (join (projectFolderPath, ' lib' , ' a2.dart') , '''
100100class A {}
101101''' );
102102 await _verifyGoToImports (
@@ -111,10 +111,10 @@ class A {}
111111 }
112112
113113 Future <void > test_import_double_hide () async {
114- newFile ('/home/my_project/ lib/ a1.dart' , '''
114+ newFile (join (projectFolderPath, ' lib' , ' a1.dart') , '''
115115class A {}
116116''' );
117- newFile ('/home/my_project/ lib/ a2.dart' , '''
117+ newFile (join (projectFolderPath, ' lib' , ' a2.dart') , '''
118118class A {}
119119''' );
120120 await _verifyGoToImports (
@@ -128,7 +128,7 @@ import 'a1.dart' hide A;
128128 }
129129
130130 Future <void > test_import_double_same_different_alias () async {
131- newFile ('/home/my_project/ lib/ other.dart' , '''
131+ newFile (join (projectFolderPath, ' lib' , ' other.dart') , '''
132132export 'dart:math';
133133''' );
134134 await _verifyGoToImports (
@@ -142,7 +142,7 @@ other.Rando^m? r;
142142 }
143143
144144 Future <void > test_import_double_same_different_alias_prefix () async {
145- newFile ('/home/my_project/ lib/ other.dart' , '''
145+ newFile (join (projectFolderPath, ' lib' , ' other.dart') , '''
146146export 'dart:math';
147147''' );
148148 await _verifyGoToImports (
@@ -156,12 +156,12 @@ other.Ran^dom? r;
156156 }
157157
158158 Future <void > test_import_double_show () async {
159- newFile ('/home/my_project/ lib/ a1.dart' , '''
159+ newFile (join (projectFolderPath, ' lib' , ' a1.dart') , '''
160160class A {}
161161
162162class B {}
163163''' );
164- newFile ('/home/my_project/ lib/ a2.dart' , '''
164+ newFile (join (projectFolderPath, ' lib' , ' a2.dart') , '''
165165class A {}
166166''' );
167167 await _verifyGoToImports (
@@ -175,10 +175,10 @@ import 'a1.dart' show B;
175175 }
176176
177177 Future <void > test_import_double_unambiguous_aliased () async {
178- newFile ('/home/my_project/ lib/ a1.dart' , '''
178+ newFile (join (projectFolderPath, ' lib' , ' a1.dart') , '''
179179class A {}
180180''' );
181- newFile ('/home/my_project/ lib/ a2.dart' , '''
181+ newFile (join (projectFolderPath, ' lib' , ' a2.dart') , '''
182182class A {}
183183''' );
184184 await _verifyGoToImports (
@@ -371,7 +371,7 @@ math.Rando^m? r;
371371 }
372372
373373 Future <void > test_import_single_exported () async {
374- newFile ('/home/my_project/ lib/ other.dart' , '''
374+ newFile (join (projectFolderPath, ' lib' , ' other.dart') , '''
375375export 'dart:math';
376376''' );
377377 await _verifyGoToImports (
@@ -397,7 +397,7 @@ class LocalClass {}
397397 }
398398
399399 Future <void > test_nestedInvocations () async {
400- newFile ('/home/my_project/ lib/ other.dart' , '''
400+ newFile (join (projectFolderPath, ' lib' , ' other.dart') , '''
401401class A {
402402 const A();
403403 A foo() => A();
@@ -414,7 +414,7 @@ var a = A().foo().ba^r();
414414 }
415415
416416 Future <void > test_nestedInvocations_extension () async {
417- newFile ('/home/my_project/ lib/ other.dart' , '''
417+ newFile (join (projectFolderPath, ' lib' , ' other.dart') , '''
418418extension E on int {
419419 void bar() {}
420420}
@@ -428,6 +428,36 @@ var a = 1.abs().ba^r();
428428 );
429429 }
430430
431+ Future <void > test_staticDeclarations () async {
432+ newFile (join (projectFolderPath, 'lib' , 'other.dart' ), '''
433+ class A {
434+ static const a = 1;
435+ }
436+ ''' );
437+ await _verifyGoToImports (
438+ TestCode .parse ('''
439+ [!import 'other.dart';!]
440+
441+ var a = A^.a;
442+ ''' ),
443+ );
444+ }
445+
446+ Future <void > test_staticDeclarations_prefixed () async {
447+ newFile (join (projectFolderPath, 'lib' , 'other.dart' ), '''
448+ class A {
449+ static const a = 1;
450+ }
451+ ''' );
452+ await _verifyGoToImports (
453+ TestCode .parse ('''
454+ [!import 'other.dart' as o;!]
455+
456+ var a = o.A^.a;
457+ ''' ),
458+ );
459+ }
460+
431461 Future <void > _verifyGoToImports (
432462 TestCode code, {
433463 Uri ? fileUri,
0 commit comments