[Test] KT-61360: add tests for the IrFakeOverrideBuilder
Add tests for fake overrides with focus on java interoperability Co-authored-by: Aleksandra Arsenteva <aleksandra.arsenteva@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
30aae741a6
commit
82255d5ee8
+177
@@ -0,0 +1,177 @@
|
||||
class A : Java5 {
|
||||
constructor() /* primary */ {
|
||||
super/*Java5*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class B : Java6 {
|
||||
constructor() /* primary */ {
|
||||
super/*Java6*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class C : Java7 {
|
||||
constructor() /* primary */ {
|
||||
super/*Java7*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class D : Java8 {
|
||||
constructor() /* primary */ {
|
||||
super/*Java8*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class E : Java9 {
|
||||
constructor() /* primary */ {
|
||||
super/*Java9*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class F : Java10 {
|
||||
constructor() /* primary */ {
|
||||
super/*Java10*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class G : Java11 {
|
||||
constructor() /* primary */ {
|
||||
super/*Java11*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class H : Java5 {
|
||||
constructor() /* primary */ {
|
||||
super/*Java5*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class I : Java6 {
|
||||
constructor() /* primary */ {
|
||||
super/*Java6*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class J : Java7 {
|
||||
constructor() /* primary */ {
|
||||
super/*Java7*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class K : Java8 {
|
||||
constructor() /* primary */ {
|
||||
super/*Java8*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class L : Java9 {
|
||||
constructor() /* primary */ {
|
||||
super/*Java9*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class M : Java10 {
|
||||
constructor() /* primary */ {
|
||||
super/*Java10*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class N : Java11 {
|
||||
constructor() /* primary */ {
|
||||
super/*Java11*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
internal override fun foo() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun test(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H, i: I, j: J, k: K, l: L, m: M, n: N) {
|
||||
a.#a /*~> Unit */
|
||||
a.foo()
|
||||
b.#a /*~> Unit */
|
||||
b.foo()
|
||||
c.#a /*~> Unit */
|
||||
c.foo()
|
||||
d.#a /*~> Unit */
|
||||
d.foo()
|
||||
e.#a /*~> Unit */
|
||||
e.foo()
|
||||
f.#a /*~> Unit */
|
||||
f.foo()
|
||||
g.#a /*~> Unit */
|
||||
g.foo()
|
||||
h.#a /*~> Unit */
|
||||
h.foo()
|
||||
i.#a /*~> Unit */
|
||||
i.foo()
|
||||
j.#a /*~> Unit */
|
||||
j.foo()
|
||||
k.#a /*~> Unit */
|
||||
k.foo()
|
||||
l.#a /*~> Unit */
|
||||
l.foo()
|
||||
m.#a /*~> Unit */
|
||||
m.foo()
|
||||
n.#a /*~> Unit */
|
||||
n.foo()
|
||||
}
|
||||
Reference in New Issue
Block a user