Files
kotlin/compiler/testData/codegen/box/reflection/multifileClasses/callFunctionsInMultifileClass.kt
Ilya Matveev a5e4e0284e Mute some box tests for native backend
This patch mutes the following test categories:
   * Tests with java dependencies (System class,
     java stdlib, jvm-oriented annotations etc).
   * Coroutines tests.
   * Reflection tests.
   * Tests with an inheritance from the standard
     collections.
2017-03-10 19:59:37 +03:00

36 lines
698 B
Kotlin
Vendored

// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
// WITH_REFLECT
// FILE: Test1.kt
@file:kotlin.jvm.JvmName("Test")
@file:kotlin.jvm.JvmMultifileClass
package test
import kotlin.test.assertEquals
fun getX() = 1
fun box(): String {
assertEquals("getX", ::getX.name)
assertEquals("getY", ::getY.name)
assertEquals("getZ", ::getZ.name)
assertEquals(1, ::getX.call())
assertEquals(239, ::getY.call())
assertEquals(42, ::getZ.callBy(emptyMap()))
return "OK"
}
// FILE: Test2.kt
@file:kotlin.jvm.JvmName("Test")
@file:kotlin.jvm.JvmMultifileClass
package test
fun getY() = 239
fun getZ(value: Int = 42) = value