Add CLI test for K/javac project with K/J interdependency

Yet this test fails if JavacWrapper does not add Kotlin output dir to classpath
This commit is contained in:
Mikhail Glukhikh
2019-10-10 14:39:27 +03:00
parent 9f3d834b2a
commit 87e2f9d96b
6 changed files with 43 additions and 5 deletions
@@ -0,0 +1,6 @@
$TESTDATA_DIR$/javacKotlinJavaInterdependency/test/ClassWithTypeParameter.kt
$TESTDATA_DIR$/javacKotlinJavaInterdependency/test/ClassWithTypeParameter.java
-Xuse-javac
-Xcompile-java
-d
$TEMP_DIR$
@@ -0,0 +1,2 @@
info: compiling 1 Java source files to [test directory]
OK
@@ -0,0 +1,7 @@
package test;
public class ClassWithTypeParameter<T extends KotlinInterface> {
public ClassWithTypeParameter(T kotlinInterface) {}
}
@@ -0,0 +1,15 @@
package test
interface KotlinInterface
class Impl1 : KotlinInterface
class Impl2 : KotlinInterface
class Impl3 : KotlinInterface
fun getProducer1() = Impl1().let(::ClassWithTypeParameter)
fun getProducer2() = Impl2().let(::ClassWithTypeParameter)
fun getProducer3() = Impl3().let(::ClassWithTypeParameter)