Files
kotlin/compiler/testData/codegen/boxAgainstJava/reflection/properties/equalsHashCodeToString.kt
Alexander Udalov 2564a2f91f Do not include kotlin-reflect at runtime by default in codegen tests
Change some tests to either include reflection or to avoid using it
2016-03-09 10:25:38 +03:00

34 lines
577 B
Kotlin
Vendored

// WITH_REFLECT
// FILE: test/J.java
package test;
public class J {
public final boolean b;
public char c;
public J() {
this.b = false;
this.c = '0';
}
}
// FILE: 1.kt
package test
import kotlin.test.*
fun box(): String {
assertEquals("val test.J.b: kotlin.Boolean", (J::b).toString())
assertEquals("var test.J.c: kotlin.Char", (J::c).toString())
assertTrue(J::b == J::b)
assertFalse(J::c == J::b)
assertTrue(J::b.hashCode() == J::b.hashCode())
assertFalse(J::b.hashCode() == J::c.hashCode())
return "OK"
}