test case for KT-2655 which duplicates KT-2786

This commit is contained in:
Alex Tkachman
2012-09-20 16:44:46 +03:00
parent 242ee38606
commit 00d7a0a8ae
2 changed files with 25 additions and 0 deletions
@@ -0,0 +1,20 @@
trait TextField {
fun getText(): String
fun setText(text: String)
}
class SimpleTextField : TextField {
private var text = ""
override fun getText() = text
override fun setText(text: String) {
this.text = text
}
}
class TextFieldWrapper(textField: TextField) : TextField by textField
fun box() : String {
val textField = TextFieldWrapper(SimpleTextField())
textField.setText("OK")
return textField.getText()
}
@@ -282,6 +282,11 @@ public class PropertyGenTest extends CodegenTestCase {
blackBoxFile("regressions/kt2786.kt");
}
public void testKt2655() throws Exception {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxFile("regressions/kt2655.kt");
}
public void testKt1528() throws Exception {
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
blackBoxMultiFile("regressions/kt1528_1.kt", "regressions/kt1528_3.kt");