Use 'JVM_TARGET: 1.8' directive in codegen tests on 1.8 target

This commit is contained in:
Alexander Udalov
2016-06-15 17:23:38 +03:00
parent ac03d98cb2
commit b4f81d4bb5
18 changed files with 55 additions and 35 deletions

View File

@@ -1,4 +1,5 @@
// KOTLIN_CONFIGURATION_FLAGS: +JVM.JVM_8_TARGET
// JVM_TARGET: 1.8
interface Test<T> {
fun test(p: T): T {
return p
@@ -18,4 +19,3 @@ fun <T> execute(t: Test<T>, p: T): T {
fun box(): String {
return execute(TestClass(), "O")
}

View File

@@ -1,4 +1,5 @@
// KOTLIN_CONFIGURATION_FLAGS: +JVM.JVM_8_TARGET
// JVM_TARGET: 1.8
interface Test<T> {
fun test(p: T): T {
return p
@@ -21,4 +22,3 @@ fun <T> execute(t: Test<T>, p: T): T {
fun box(): String {
return execute(TestClass(), "O")
}

View File

@@ -1,6 +1,7 @@
// KOTLIN_CONFIGURATION_FLAGS: +JVM.JVM_8_TARGET
// JVM_TARGET: 1.8
// WITH_REFLECT
// FULL_JDK
interface Test {
fun test(): String {
return "Test"
@@ -30,6 +31,7 @@ class TestClass2 : TestClass(), Test3 {
fun box(): String {
val test = TestClass2().test()
if (test != "Test2") return "fail 1: $test"
// TODO: enable this test once the required behavior is specified
// checkNoMethod(TestClass::class.java, "test")
// checkNoMethod(Test3::class.java, "test")
// checkNoMethod(TestClass2::class.java, "test")
@@ -44,5 +46,5 @@ fun checkNoMethod(clazz: Class<*>, name: String) {
catch (e: NoSuchMethodException) {
return
}
throw java.lang.AssertionError("fail " + clazz)
}
throw AssertionError("fail " + clazz)
}

View File

@@ -1,4 +1,4 @@
// KOTLIN_CONFIGURATION_FLAGS: +JVM.JVM_8_TARGET
// JVM_TARGET: 1.8
// WITH_RUNTIME
// FULL_JDK
interface Test {
@@ -11,6 +11,7 @@ class TestClass : Test {
}
fun box(): String {
// TODO: enable this test once the required behavior is specified
// try {
// TestClass::class.java.getDeclaredMethod("test")
// }
@@ -19,4 +20,4 @@ fun box(): String {
// }
// return "fail"
return "OK"
}
}

View File

@@ -1,4 +1,4 @@
// KOTLIN_CONFIGURATION_FLAGS: +JVM.JVM_8_TARGET
// JVM_TARGET: 1.8
// WITH_RUNTIME
// FULL_JDK
interface Test {
@@ -11,6 +11,7 @@ interface Test2 : Test {
}
fun box(): String {
// TODO: enable this test once the required behavior is specified
// try {
// Test2::class.java.getDeclaredMethod("test")
// }
@@ -19,4 +20,4 @@ fun box(): String {
// }
// return "fail"
return "OK"
}
}

View File

@@ -1,6 +1,7 @@
// KOTLIN_CONFIGURATION_FLAGS: +JVM.JVM_8_TARGET
// JVM_TARGET: 1.8
// WITH_RUNTIME
// FULL_JDK
interface Test {
fun test() {
}
@@ -15,6 +16,7 @@ interface Test3 : Test2 {
}
fun box(): String {
// TODO: enable this test once the required behavior is specified
// try {
// Test3::class.java.getDeclaredMethod("test")
// }
@@ -23,4 +25,4 @@ fun box(): String {
// }
// return "fail"
return "OK"
}
}

View File

@@ -1,4 +1,5 @@
// KOTLIN_CONFIGURATION_FLAGS: +JVM.JVM_8_TARGET
// JVM_TARGET: 1.8
interface Test {
fun test(): String {
return "OK"
@@ -11,4 +12,4 @@ class TestClass : Test {
fun box(): String {
return TestClass().test()
}
}