Move: Convert AbstractMoveTest to light fixture test case

Extract multi-module move test to a separate class
This commit is contained in:
Alexey Sedunov
2017-03-28 20:50:03 +03:00
parent 691322e406
commit 2eb912a30c
99 changed files with 269 additions and 147 deletions
@@ -0,0 +1,11 @@
<?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" />
</component>
</module>
@@ -0,0 +1,3 @@
package packJvm
class Foo
@@ -0,0 +1,11 @@
<?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" />
</component>
</module>
@@ -0,0 +1,15 @@
package packJs
class ClassUsageJvm {
init {
listOf("example")
arrayOf("another")
Pair(1, "2")
}
companion object {
@JvmStatic fun foo() {
}
}
}
@@ -0,0 +1,16 @@
package packJs
class ClassUsageJs {
init {
listOf("example")
arrayOf("another")
Pair(1, "2")
}
@JsName("bar")
fun foo() {
}
}
class Foo
@@ -0,0 +1,11 @@
<?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" />
</component>
</module>
@@ -0,0 +1,17 @@
package packJvm
class <caret>ClassUsageJvm {
init {
listOf("example")
arrayOf("another")
Pair(1, "2")
}
companion object {
@JvmStatic fun foo() {
}
}
}
class Foo
@@ -0,0 +1,11 @@
<?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" />
</component>
</module>
@@ -0,0 +1,16 @@
package packJs
class ClassUsageJs {
init {
listOf("example")
arrayOf("another")
Pair(1, "2")
}
@JsName("bar")
fun foo() {
}
}
class Foo
@@ -0,0 +1 @@
Constructor JvmStatic(), referenced in function packJvm.ClassUsageJvm.Companion.foo(), will not be accessible in module B
@@ -0,0 +1,9 @@
{
"mainFile": "A/src/packJvm/testJvm.kt",
"type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS",
"targetPackage": "packJs",
"targetSourceRoot": "B/src",
"withRuntime": "true",
"modulesWithRuntime": ["A"],
"modulesWithJsRuntime": ["B"]
}