@@ -75,31 +75,13 @@ public void testDoNotCompleteFullPackagesForRelativeImports() throws IOException
7575 assertSameElements (lookupElementStrings , "package1" , "package2" );
7676 }
7777
78- private void doTestCompleteOwnPath ( String existingFile , String existingText , String newFile , String newText , String result )
79- throws IOException {
80- myFixture .getTempDirFixture (). createFile ( existingFile , existingText );
81- VirtualFile testFile = myFixture . getTempDirFixture (). createFile (newFile , newText );
78+ public void testDoNotCompleteOwnImportPath () throws IOException {
79+ myFixture . getTempDirFixture (). createFile ( "package/long/long/path/test.go" , "package pack" );
80+ VirtualFile testFile = myFixture .getTempDirFixture ()
81+ . createFile ("package/very/long/path/but/same/package/test.go" , "package pack; import `package/<caret>`" );
8282 myFixture .configureFromExistingVirtualFile (testFile );
8383 myFixture .completeBasic ();
84- myFixture .checkResult (result );
85- }
86-
87- public void testDoNotCompleteOwnImportPath () throws IOException {
88- doTestCompleteOwnPath ("package/long/long/path/test.go" , "package pack" ,
89- "package/very/long/path/but/same/package/test.go" , "package pack; import `package/<caret>`" ,
90- "package pack; import `package/long/long/path`" );
91- }
92-
93- public void testCompleteOwnImportPathFromTest () throws IOException {
94- doTestCompleteOwnPath ("pack/a.go" , "package myPack; func Func() {}" ,
95- "pack/a_test.go" , "package myPack_test; func TestFunc() { myPack.Fun<caret> }" ,
96- "package myPack_test;\n import \" pack\" func TestFunc() { myPack.Func() }" );
97- }
98-
99- public void testDoNotCompleteDifferentPackageInSamePathFromTest () throws IOException {
100- String text = "package foo_test; func TestFunc() { bar.Fun<caret> }" ;
101- doTestCompleteOwnPath ("pack/a.go" , "package bar; func Func() {}" ,
102- "pack/a_test.go" , text , text );
84+ myFixture .checkResult ("package pack; import `package/long/long/path`" );
10385 }
10486
10587 public void testImportsPriority () throws IOException {
0 commit comments