Add different black box tests around KT-52338
This commit is contained in:
committed by
Space Team
parent
f6bd4d5e15
commit
bf090cdc6d
+17
-1
@@ -6,6 +6,10 @@
|
||||
// FILE: Base.java
|
||||
public class Base {
|
||||
protected String TAG = "OK";
|
||||
|
||||
public String foo() {
|
||||
return TAG;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Sub.kt
|
||||
@@ -16,6 +20,18 @@ class Sub : Base() {
|
||||
}
|
||||
|
||||
fun log() = TAG
|
||||
|
||||
fun logReference() = this::TAG.get()
|
||||
|
||||
fun logAssignment(): String {
|
||||
TAG = "12"
|
||||
if (foo() != "12") return "Error writing: ${foo()}"
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun box() = Sub().log()
|
||||
fun box(): String {
|
||||
if (Sub().log() != "OK") return Sub().log()
|
||||
if (Sub().logReference() != "OK") return Sub().logReference()
|
||||
return Sub().logAssignment()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user