Merge boxWithJava testData into box, delete BoxWithJava test
This commit is contained in:
committed by
Alexander Udalov
parent
16a0ddd2fb
commit
f8dfaf4599
@@ -0,0 +1,23 @@
|
||||
// FILE: FakePlatformName.java
|
||||
|
||||
import kotlin.jvm.JvmName;
|
||||
|
||||
public class FakePlatformName {
|
||||
@JvmName(name = "fake")
|
||||
public String foo() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
public String fake() {
|
||||
return "fake";
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: FakePlatformName.kt
|
||||
|
||||
fun box(): String {
|
||||
val test1 = FakePlatformName().foo()
|
||||
if (test1 != "foo") return "Failed: FakePlatformName().foo()==$test1"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// WITH_RUNTIME
|
||||
// FILE: Baz.java
|
||||
|
||||
public class Baz {
|
||||
public static String baz() {
|
||||
return Foo.foo() + Bar.bar();
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: bar.kt
|
||||
|
||||
@file:JvmName("Bar")
|
||||
public fun bar(): String = "K"
|
||||
|
||||
// FILE: foo.kt
|
||||
|
||||
@file:JvmName("Foo")
|
||||
public fun foo(): String = "O"
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun box(): String = Baz.baz()
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// WITH_RUNTIME
|
||||
// FILE: StringHolder.java
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface StringHolder {
|
||||
public String value();
|
||||
}
|
||||
|
||||
// FILE: fileFacade.kt
|
||||
|
||||
@file:StringHolder("OK")
|
||||
|
||||
fun box(): String =
|
||||
Class.forName("FileFacadeKt").getAnnotation(StringHolder::class.java)?.value ?: "null"
|
||||
@@ -0,0 +1,17 @@
|
||||
// WITH_RUNTIME
|
||||
// FILE: Bar.java
|
||||
|
||||
public class Bar {
|
||||
public static String bar() {
|
||||
return Foo.foo();
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: foo.kt
|
||||
|
||||
@file:JvmName("Foo")
|
||||
public fun foo(): String = "OK"
|
||||
|
||||
// FILE: simple.kt
|
||||
|
||||
fun box(): String = Bar.bar()
|
||||
Reference in New Issue
Block a user