Fix KotlinJpsBuildTest, run J+K tests with runtime
Otherwise javac is not able to find class KotlinClass$Kind, which is used in annotation argument and for some reason this leads to an exception (in javac) which gets swallowed and unresolved reference is reported in Java code. java:INFO:com.sun.tools.javac.code.Symbol$CompletionFailure: class file for kotlin.jvm.internal.KotlinClass$Kind not found java:INFO:Errors occurred while compiling module 'm1'
This commit is contained in:
@@ -324,19 +324,19 @@ public class KotlinJpsBuildTest extends AbstractKotlinJpsBuildTestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testKotlinJavaProject() {
|
public void testKotlinJavaProject() {
|
||||||
doTest();
|
doTestWithRuntime();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testJKJProject() {
|
public void testJKJProject() {
|
||||||
doTest();
|
doTestWithRuntime();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testKJKProject() {
|
public void testKJKProject() {
|
||||||
doTest();
|
doTestWithRuntime();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testKJCircularProject() {
|
public void testKJCircularProject() {
|
||||||
doTest();
|
doTestWithRuntime();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testJKJInheritanceProject() {
|
public void testJKJInheritanceProject() {
|
||||||
|
|||||||
@@ -16,21 +16,10 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.jps.build
|
package org.jetbrains.kotlin.jps.build
|
||||||
|
|
||||||
import org.jetbrains.jps.builders.JpsBuildTestCase
|
|
||||||
import com.intellij.util.PathUtil
|
import com.intellij.util.PathUtil
|
||||||
import org.jetbrains.jps.model.java.JpsJavaExtensionService
|
import org.jetbrains.jps.model.java.JpsJavaExtensionService
|
||||||
|
|
||||||
public class SimpleKotlinJpsBuildTest : JpsBuildTestCase() {
|
public class SimpleKotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
|
||||||
override fun setUp() {
|
|
||||||
super.setUp()
|
|
||||||
System.setProperty("kotlin.jps.tests", "true")
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun tearDown() {
|
|
||||||
System.clearProperty("kotlin.jps.tests")
|
|
||||||
super.tearDown()
|
|
||||||
}
|
|
||||||
|
|
||||||
public fun testThreeModulesNoReexport() {
|
public fun testThreeModulesNoReexport() {
|
||||||
val aFile = createFile("a/a.kt",
|
val aFile = createFile("a/a.kt",
|
||||||
"""
|
"""
|
||||||
@@ -69,6 +58,7 @@ public class SimpleKotlinJpsBuildTest : JpsBuildTestCase() {
|
|||||||
val c = addModule("c", PathUtil.getParentPath(cFile))
|
val c = addModule("c", PathUtil.getParentPath(cFile))
|
||||||
c.getDependenciesList().addModuleDependency(b)
|
c.getDependenciesList().addModuleDependency(b)
|
||||||
|
|
||||||
|
addKotlinRuntimeDependency()
|
||||||
rebuildAll()
|
rebuildAll()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,6 +94,7 @@ public class SimpleKotlinJpsBuildTest : JpsBuildTestCase() {
|
|||||||
b.getDependenciesList().addModuleDependency(a)
|
b.getDependenciesList().addModuleDependency(a)
|
||||||
).setExported(false)
|
).setExported(false)
|
||||||
|
|
||||||
|
addKotlinRuntimeDependency()
|
||||||
rebuildAll()
|
rebuildAll()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user