[Test] Add diagnostics and codegen tests with hmpp module structure

This commit is contained in:
Dmitriy Novozhilov
2021-05-13 15:23:12 +03:00
committed by TeamCityServer
parent 73a63359df
commit e08df2c530
18 changed files with 450 additions and 0 deletions
@@ -0,0 +1,36 @@
/*
* This test is used for general testing of how compiler BB tests for HMPP projects works
* Js backend is ignored because they use old test infrastructure which doesn't support HMPP
*/
// !LANGUAGE: +MultiPlatformProjects
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// MODULE: common
// TARGET_PLATFORM: Common
// FILE: common.kt
expect open class A()
// MODULE: intermediate()()(common)
// TARGET_PLATFORM: JVM, JS
// FILE: intermediate.kt
class B : A() {
fun foo(): String = "O"
}
fun getB(): B = B()
// MODULE: main()()(intermediate)
// FILE: main.kt
actual open class A actual constructor() {
fun bar(): String = "K"
}
fun box(): String {
val b = getB()
return b.foo() + b.bar()
}