mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
Migrate boxWithJava tests to multi-file framework
This commit is contained in:
28
compiler/testData/codegen/boxWithJava/javaProperty/boxedSetter.kt
vendored
Normal file
28
compiler/testData/codegen/boxWithJava/javaProperty/boxedSetter.kt
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
// FILE: JavaClass.java
|
||||
|
||||
public class JavaClass {
|
||||
|
||||
private boolean value;
|
||||
|
||||
public boolean isValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(Boolean value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: kotlin.kt
|
||||
|
||||
fun box(): String {
|
||||
val javaClass = JavaClass()
|
||||
|
||||
if (javaClass.isValue != false) return "fail 1"
|
||||
|
||||
javaClass.isValue = true
|
||||
|
||||
if (javaClass.isValue != true) return "fail 2"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user