Move: Convert AbstractMoveTest to light fixture test case
Extract multi-module move test to a separate class
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
|
||||
<orderEntry type="module" module-name="B" />
|
||||
</component>
|
||||
</module>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package packA1
|
||||
|
||||
import packA2.InternalContentUser
|
||||
|
||||
class More
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package packA2
|
||||
|
||||
import packA1.InternalContent
|
||||
|
||||
class InternalContentUser {
|
||||
fun useInternal(p: InternalContent) = p.internalFun()
|
||||
|
||||
internal fun internalFun() {
|
||||
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package packB
|
||||
|
||||
class InternalContent {
|
||||
internal fun internalFun() {}
|
||||
|
||||
fun useInternalInside() {
|
||||
internalFun()
|
||||
}
|
||||
|
||||
fun useInternal() {
|
||||
InternalContentUser().internalFun()
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
This file is needed to ensure that containing directory is under version control
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
|
||||
<orderEntry type="module" module-name="B" />
|
||||
</component>
|
||||
</module>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package packA1
|
||||
|
||||
import packA2.InternalContentUser
|
||||
|
||||
class <caret>InternalContent {
|
||||
internal fun internalFun() {}
|
||||
|
||||
fun useInternalInside() {
|
||||
internalFun()
|
||||
}
|
||||
|
||||
fun useInternal() {
|
||||
InternalContentUser().internalFun()
|
||||
}
|
||||
}
|
||||
|
||||
class More
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package packA2
|
||||
|
||||
import packA1.InternalContent
|
||||
|
||||
class InternalContentUser {
|
||||
fun useInternal(p: InternalContent) = p.internalFun()
|
||||
|
||||
internal fun internalFun() {
|
||||
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
This file is needed to ensure that containing directory is under version control
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
Class InternalContent uses function internalFun() which will be inaccessible after move
|
||||
Class packA1.InternalContent, referenced in file InternalSource.kt, will not be accessible from module A
|
||||
Class packA1.InternalContent, referenced in file InternalSource.kt, will not be accessible from module A
|
||||
Class packA2.InternalContentUser, referenced in function packA1.InternalContent.useInternal(), will not be accessible in module B
|
||||
Function packA2.InternalContentUser.internalFun(), referenced in function packA1.InternalContent.useInternal(), will not be accessible in module B
|
||||
Function useInternal(InternalContent) uses internal function internalFun() which will be inaccessible after move
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"mainFile": "A/src/packA1/InternalTarget.kt",
|
||||
"type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS",
|
||||
"targetPackage": "packB",
|
||||
"targetSourceRoot": "B/src",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
Reference in New Issue
Block a user