[K/N][tests] Added a bunch of tests on incremental compilation
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
package test1
|
||||
|
||||
interface I {
|
||||
fun baz(): String
|
||||
fun foo(): Int
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package test1
|
||||
|
||||
interface I {
|
||||
fun foo(): Int
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package test1
|
||||
|
||||
interface J : I {
|
||||
fun bar(): String
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package test2
|
||||
|
||||
import test1.*
|
||||
|
||||
fun bar(x: J) = x.bar()
|
||||
@@ -0,0 +1,14 @@
|
||||
import kotlin.test.*
|
||||
import test1.*
|
||||
import test2.*
|
||||
|
||||
class JImpl : J {
|
||||
override fun baz() = "qxx"
|
||||
override fun foo() = 42
|
||||
override fun bar() = "zzz"
|
||||
}
|
||||
|
||||
@Test
|
||||
fun runTest() {
|
||||
assertEquals("zzz", bar(JImpl()))
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import kotlin.test.*
|
||||
import test1.*
|
||||
import test2.*
|
||||
|
||||
class JImpl : J {
|
||||
override fun foo() = 42
|
||||
override fun bar() = "zzz"
|
||||
}
|
||||
|
||||
@Test
|
||||
fun runTest() {
|
||||
assertEquals("zzz", bar(JImpl()))
|
||||
}
|
||||
Reference in New Issue
Block a user